File CVE-2024-47834.patch of Package gstreamer-plugins-good.36929
From 474eb62d85b65de1f4a9389d28e4a380a0bf1d7b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Wed, 9 Oct 2024 11:52:52 -0400
Subject: [PATCH 7/7] matroskademux: Put a copy of the codec data into the
A_MS/ACM caps
The original codec data buffer is owned by matroskademux and does not
necessarily live as long as the caps.
Thanks to Antonio Morales for finding and reporting the issue.
Fixes GHSL-2024-280
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3894
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057>
---
diff -urp gst-plugins-good-1.24.7.orig/gst/matroska/matroska-demux.c gst-plugins-good-1.24.7/gst/matroska/matroska-demux.c
--- gst-plugins-good-1.24.7.orig/gst/matroska/matroska-demux.c 2024-12-16 03:55:28.730102201 -0500
+++ gst-plugins-good-1.24.7/gst/matroska/matroska-demux.c 2024-12-16 04:13:36.301879434 -0500
@@ -7171,8 +7171,7 @@ gst_matroska_demux_audio_caps (GstMatros
/* 18 is the waveformatex size */
if (size > 18) {
- codec_data = gst_buffer_new_wrapped_full (GST_MEMORY_FLAG_READONLY,
- data + 18, size - 18, 0, size - 18, NULL, NULL);
+ codec_data = gst_buffer_new_memdup (data + 18, size - 18);
}
if (riff_audio_fmt)