matroskademux: Avoid integer-overflow resulting in heap corruption in WavPack header...
authorSebastian Dröge <sebastian@centricular.com>
Wed, 18 May 2022 07:23:15 +0000 (10:23 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 15 Jun 2022 18:35:12 +0000 (18:35 +0000)
commitcf887f1b8e228bff6e19829e6d03995d70ad739d
tree0c15693fd0183f71d9cdc0bee5f3a4e6d6bb058b
parent14d306da6da51a762c4dc701d161bb52ab66d774
matroskademux: Avoid integer-overflow resulting in heap corruption in WavPack header handling code

blocksize + WAVPACK4_HEADER_SIZE might overflow gsize, which then
results in allocating a very small buffer. Into that buffer blocksize
data is memcpy'd later which then causes out of bound writes and can
potentially lead to anything from crashes to remote code execution.

Thanks to Adam Doupe for analyzing and reporting the issue.

CVE: CVE-2022-1920

https://gstreamer.freedesktop.org/security/sa-2022-0004.html

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

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2612>
subprojects/gst-plugins-good/gst/matroska/matroska-demux.c