diff options
2 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0023-qtdemux-Avoid-integer-overflow-when-parsing-Theora-e.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0023-qtdemux-Avoid-integer-overflow-when-parsing-Theora-e.patch new file mode 100644 index 0000000000..37f133a493 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0023-qtdemux-Avoid-integer-overflow-when-parsing-Theora-e.patch | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | From f8e398c46fc074f266edb3f20479c0ca31b52448 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com> | ||
| 3 | Date: Thu, 26 Sep 2024 22:16:06 +0300 | ||
| 4 | Subject: [PATCH] qtdemux: Avoid integer overflow when parsing Theora extension | ||
| 5 | |||
| 6 | Thanks to Antonio Morales for finding and reporting the issue. | ||
| 7 | |||
| 8 | Fixes GHSL-2024-166 | ||
| 9 | Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851 | ||
| 10 | |||
| 11 | Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8032> | ||
| 12 | |||
| 13 | CVE: CVE-2024-47606 | ||
| 14 | Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/f8e398c46fc074f266edb3f20479c0ca31b52448] | ||
| 15 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 16 | --- | ||
| 17 | gst/isomp4/qtdemux.c | 4 ++-- | ||
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c | ||
| 21 | index 5e3cb1b9e6..c2d8b5e0f1 100644 | ||
| 22 | --- a/gst/isomp4/qtdemux.c | ||
| 23 | +++ b/gst/isomp4/qtdemux.c | ||
| 24 | @@ -8279,7 +8279,7 @@ qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream, | ||
| 25 | end -= 8; | ||
| 26 | |||
| 27 | while (buf < end) { | ||
| 28 | - gint size; | ||
| 29 | + guint32 size; | ||
| 30 | guint32 type; | ||
| 31 | |||
| 32 | size = QT_UINT32 (buf); | ||
| 33 | @@ -8287,7 +8287,7 @@ qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream, | ||
| 34 | |||
| 35 | GST_LOG_OBJECT (qtdemux, "%p %p", buf, end); | ||
| 36 | |||
| 37 | - if (buf + size > end || size <= 0) | ||
| 38 | + if (end - buf < size || size < 8) | ||
| 39 | break; | ||
| 40 | |||
| 41 | buf += 8; | ||
| 42 | -- | ||
| 43 | 2.30.2 | ||
| 44 | |||
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.12.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.12.bb index 85c9a20a2d..7f8cd7c96c 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.12.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.22.12.bb | |||
| @@ -29,6 +29,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-go | |||
| 29 | file://0020-matroskademux-Skip-over-zero-sized-Xiph-stream-heade.patch \ | 29 | file://0020-matroskademux-Skip-over-zero-sized-Xiph-stream-heade.patch \ |
| 30 | file://0021-matroskademux-Put-a-copy-of-the-codec-data-into-the-.patch \ | 30 | file://0021-matroskademux-Put-a-copy-of-the-codec-data-into-the-.patch \ |
| 31 | file://0022-jpegdec-Directly-error-out-on-negotiation-failures.patch \ | 31 | file://0022-jpegdec-Directly-error-out-on-negotiation-failures.patch \ |
| 32 | file://0023-qtdemux-Avoid-integer-overflow-when-parsing-Theora-e.patch \ | ||
| 32 | " | 33 | " |
| 33 | 34 | ||
| 34 | SRC_URI[sha256sum] = "9c1913f981900bd8867182639b20907b28ed78ef7a222cfbf2d8ba9dab992fa7" | 35 | SRC_URI[sha256sum] = "9c1913f981900bd8867182639b20907b28ed78ef7a222cfbf2d8ba9dab992fa7" |
