mxfdemux: Check number of channels for AES3 audio
authorSebastian Dröge <sebastian@centricular.com>
Thu, 10 Aug 2023 12:47:03 +0000 (15:47 +0300)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 20 Sep 2023 14:14:27 +0000 (15:14 +0100)
commit1edd1c38dcc5d27e7c5649d999ee8278872a16d4
tree080bd2bb5b51ac5f021ecce5d0deb102e1477c1e
parentf73fc41f2ca6a0cd4e883aee64bf8e1c15ff68ce
mxfdemux: Check number of channels for AES3 audio

Only up to 8 channels are allowed and using a higher number would cause
integer overflows when copying the data, and lead to out of bound
writes.

Also check that each buffer is at least 4 bytes long to avoid another
overflow.

Fixes ZDI-CAN-21661, CVE-2023-40475

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2897

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5365>
subprojects/gst-plugins-bad/gst/mxf/mxfd10.c