Travis Cross aa4261d11f Avoid buffer-overflow on short RTCP/SRTCP packets
In `srtp_unprotect_rtcp()` we are not validating that the packet
length is as long as the minimum required.  This would cause
`enc_octet_len` to underflow, which would cause us to try to decrypt
data past the end of the packet in memory -- a buffer over-read and
buffer overflow.

In `srtp_protect_rtcp()`, we were similarly not validating the packet
length.  Here we were also polluting the address of the SRTCP
encrypted flag and index (the `trailer`), causing us to write one word
to a bogus memory address before getting to the encryption where we
would also overflow.

In this commit we add checks to appropriately validate the RTCP/SRTCP
packet lengths.

`srtp_unprotect_rtcp_aead()` (but not protect) did correctly validate
the packet length; this check would now be redundant as the check in
`srtcp_unprotect_rtcp()` will also run first, so it has been removed.
2014-06-30 19:00:35 +00:00
..
2014-03-09 14:46:06 -04:00
2014-03-08 08:51:58 -06:00
2014-03-07 18:36:26 -05:00
2014-03-07 19:19:53 -05:00
2013-12-16 11:54:15 -05:00
2014-04-30 10:34:08 -04:00
2014-03-07 19:35:51 -05:00
2014-02-12 12:08:56 -06:00
2014-03-19 17:37:02 +00:00
2014-05-21 17:25:32 +00:00
2014-03-19 14:17:09 -04:00
2014-03-07 18:36:26 -05:00
2014-03-17 08:32:17 -04:00
2014-06-29 02:11:25 +08:00
2014-06-15 13:51:56 +02:00