gstrtpbuffer: fix header extension length validation
authorWill Miller <will.miller@pexip.com>
Mon, 12 Oct 2020 11:21:17 +0000 (12:21 +0100)
committerWill Miller <will.miller@pexip.com>
Mon, 12 Oct 2020 14:01:22 +0000 (15:01 +0100)
commitac72a6adaa08a013a52c62a2009c5ca67e47b21a
treee695309a3243cd7bc3cb81561a7efeaf5a7e3ceb
parent57a23786f3b5817fd739d33d5005b4780effaf2b
gstrtpbuffer: fix header extension length validation

We validate the header extensions length of an RTP buffer by comparing
it against the block size. Since we multiply the length in words by 4 to
get the length in bytes, a suitably large length could cause a wrapround
of the uint16, giving a lower length which erroneously passes the check
and allows the buffer to be mapped.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/864>
gst-libs/gst/rtp/gstrtpbuffer.c
tests/check/libs/rtp.c