From bee2d55c97b8cf26f80deb009b0bcc0ca48c21f5 Mon Sep 17 00:00:00 2001 From: RHEL Packaging Agent Date: Tue, 25 Aug 2026 07:32:57 +0000 Subject: [PATCH] Fix CVE-2026-18297: opusdec channel position bounds check Backport upstream commit 178ae5ac20db to fix CVE-2026-18297. The patch adds a bounds check in gst_opus_dec_negotiate() to set pos = NULL when n_channels > 64, preventing a buffer overflow in the memcpy into the fixed-size opus_pos array. CVE: CVE-2026-18297 Upstream patches: - https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/178ae5ac20db75e56d65e4c4bc142bb234387807.patch Resolves: RHEL-246584 This commit was backported by Ymir, a Red Hat Enterprise Linux software maintenance AI agent. Assisted-by: Ymir --- ...e-any-channel-positions-for-64-chann.patch | 27 +++++++++++++++++++ gstreamer1-plugins-base.spec | 9 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 0001-opusdec-Don-t-use-any-channel-positions-for-64-chann.patch diff --git a/0001-opusdec-Don-t-use-any-channel-positions-for-64-chann.patch b/0001-opusdec-Don-t-use-any-channel-positions-for-64-chann.patch new file mode 100644 index 0000000..d9f7581 --- /dev/null +++ b/0001-opusdec-Don-t-use-any-channel-positions-for-64-chann.patch @@ -0,0 +1,27 @@ +From a8f51eaa18a0a3c5a4ace173b8724c73c8b1646d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Fri, 19 Jun 2026 13:48:16 +0300 +Subject: [PATCH] opusdec: Don't use any channel positions for >64 channels + +We don't support this. + +Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/work_items/5122 + +Part-of: +--- + subprojects/gst-plugins-base/ext/opus/gstopusdec.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/subprojects/gst-plugins-base/ext/opus/gstopusdec.c b/subprojects/gst-plugins-base/ext/opus/gstopusdec.c +index 03d061a..c3bfe2f 100644 +--- a/subprojects/gst-plugins-base/ext/opus/gstopusdec.c ++++ b/subprojects/gst-plugins-base/ext/opus/gstopusdec.c +@@ -359,6 +359,8 @@ gst_opus_dec_negotiate (GstOpusDec * dec, const GstAudioChannelPosition * pos) + GST_DEBUG_OBJECT (dec, "Using a default of 2 channels"); + dec->n_channels = 2; + pos = NULL; ++ } else if (dec->n_channels > 64) { ++ pos = NULL; + } + + if (dec->sample_rate == 0) { diff --git a/gstreamer1-plugins-base.spec b/gstreamer1-plugins-base.spec index bd4e681..8c83335 100644 --- a/gstreamer1-plugins-base.spec +++ b/gstreamer1-plugins-base.spec @@ -9,7 +9,7 @@ Name: gstreamer1-plugins-base Version: 1.22.12 -Release: 8%{?dist} +Release: 9%{?dist} Summary: GStreamer streaming media framework base plugins License: LGPL-2.1-or-later @@ -33,6 +33,9 @@ Patch008: 0008-ssaparse-Search-for-closing-brace-after-opening-brac.patch Patch009: 0009-ssaparse-Don-t-use-strstr-on-strings-that-are-potent.patch Patch010: 0010-subparse-Check-for-NULL-return-of-strchr-when-parsin.patch Patch011: 0001-riff-Correctly-check-that-enough-RGB-palette-data-is.patch +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/12044 +# https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/178ae5ac20db75e56d65e4c4bc142bb234387807 +Patch012: 0001-opusdec-Don-t-use-any-channel-positions-for-64-chann.patch BuildRequires: meson >= 0.48.0 @@ -147,6 +150,7 @@ for the GStreamer Base Plugins library. %patch -P 9 -p3 %patch -P 10 -p3 %patch -P 11 -p3 +%patch -P 12 -p3 %build %meson \ @@ -522,6 +526,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-play-1.0 %endif %changelog +* Tue Aug 25 2026 RHEL Packaging Agent - 1.22.12-9 +- Apply patch for CVE-2026-18297 + * Wed Apr 01 2026 Tomas Pelka - 1.22.12-8 - Rebuild again -7 was build in wrong target