Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-bounds access in DecryptRTCP #10

Closed
thinkski opened this issue Feb 22, 2019 · 1 comment · Fixed by #11
Closed

Out-of-bounds access in DecryptRTCP #10

thinkski opened this issue Feb 22, 2019 · 1 comment · Fixed by #11
Assignees

Comments

@thinkski
Copy link
Member

On line 14, out is truncated to length tailOffset:
https://github.com/pions/srtp/blob/bc58b55b1a0d101267701ae3ea00412cb77bc918/srtcp.go#L14

However, on line 21, access of out[tailOffset:] is attempted, which results in an out-of-bounds panic:
https://github.com/pions/srtp/blob/bc58b55b1a0d101267701ae3ea00412cb77bc918/srtcp.go#L21

Believe line 21 should be:

srtcpIndexBuffer := encrypted[tailOffset : tailOffset+srtcpIndexSize]
@Sean-Der
Copy link
Member

Oof nice catch @thinkski

It’s a bummer that none of the tests caught this. I will have to figure out why, I guess we only test unencrypted RTCP?

You up for opening a PR for this? I can grab instead if you are busy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants