From: Steve Sakoman <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][scarthgap 09/25] gstreamer1.0-plugins-good: patch CVE-2024-47599
Date: Sat, 4 Jan 2025 05:41:33 -0800 [thread overview]
Message-ID: <ba5545302daee0fb5ac2f3ca45cf8524cee278dc.1735997984.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1735997984.git.steve@sakoman.com>
From: Peter Marko <peter.marko@siemens.com>
Pick commits from:
* https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8040
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
...ly-error-out-on-negotiation-failures.patch | 99 +++++++++++++++++++
.../gstreamer1.0-plugins-good_1.22.12.bb | 1 +
2 files changed, 100 insertions(+)
create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0022-jpegdec-Directly-error-out-on-negotiation-failures.patch
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0022-jpegdec-Directly-error-out-on-negotiation-failures.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0022-jpegdec-Directly-error-out-on-negotiation-failures.patch
new file mode 100644
index 0000000000..037afdc4ee
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0022-jpegdec-Directly-error-out-on-negotiation-failures.patch
@@ -0,0 +1,99 @@
+From 3cdf206f4fc5a9860bfe1437ed3d01e7d23c6c3e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
+Date: Mon, 30 Sep 2024 16:22:19 +0300
+Subject: [PATCH] jpegdec: Directly error out on negotiation failures
+
+Thanks to Antonio Morales for finding and reporting the issue.
+
+Fixes GHSL-2024-247
+Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3862
+
+Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8040>
+
+CVE: CVE-2024-47599
+Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/3cdf206f4fc5a9860bfe1437ed3d01e7d23c6c3e]
+Signed-off-by: Peter Marko <peter.marko@siemens.com>
+---
+ .../gst-plugins-good/ext/jpeg/gstjpegdec.c | 22 ++++++++++++++-----
+ 1 file changed, 17 insertions(+), 5 deletions(-)
+
+diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c
+index 51bc2d14bf..7523419835 100644
+--- a/ext/jpeg/gstjpegdec.c
++++ b/ext/jpeg/gstjpegdec.c
+@@ -1068,13 +1068,14 @@ gst_jpeg_turbo_parse_ext_fmt_convert (GstJpegDec * dec, gint * clrspc)
+ }
+ #endif
+
+-static void
++static gboolean
+ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
+ gboolean interlaced)
+ {
+ GstVideoCodecState *outstate;
+ GstVideoInfo *info;
+ GstVideoFormat format;
++ gboolean res;
+
+ #ifdef JCS_EXTENSIONS
+ if (dec->format_convert) {
+@@ -1104,7 +1105,7 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
+ height == GST_VIDEO_INFO_HEIGHT (info) &&
+ format == GST_VIDEO_INFO_FORMAT (info)) {
+ gst_video_codec_state_unref (outstate);
+- return;
++ return TRUE;
+ }
+ gst_video_codec_state_unref (outstate);
+ }
+@@ -1118,6 +1119,8 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
+ outstate =
+ gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), format,
+ width, height, dec->input_state);
++ if (!outstate)
++ return FALSE;
+
+ switch (clrspc) {
+ case JCS_RGB:
+@@ -1142,10 +1145,12 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
+
+ gst_video_codec_state_unref (outstate);
+
+- gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
++ res = gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
+
+ GST_DEBUG_OBJECT (dec, "max_v_samp_factor=%d", dec->cinfo.max_v_samp_factor);
+ GST_DEBUG_OBJECT (dec, "max_h_samp_factor=%d", dec->cinfo.max_h_samp_factor);
++
++ return res;
+ }
+
+ static GstFlowReturn
+@@ -1425,8 +1430,9 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame)
+ num_fields = 1;
+ }
+
+- gst_jpeg_dec_negotiate (dec, width, output_height,
+- dec->cinfo.jpeg_color_space, num_fields == 2);
++ if (!gst_jpeg_dec_negotiate (dec, width, output_height,
++ dec->cinfo.jpeg_color_space, num_fields == 2))
++ goto negotiation_failed;
+
+ state = gst_video_decoder_get_output_state (bdec);
+ ret = gst_video_decoder_allocate_output_frame (bdec, frame);
+@@ -1558,6 +1564,12 @@ map_failed:
+ ret = GST_FLOW_ERROR;
+ goto exit;
+ }
++negotiation_failed:
++ {
++ GST_ELEMENT_ERROR (dec, CORE, NEGOTIATION, (NULL), ("failed to negotiate"));
++ ret = GST_FLOW_NOT_NEGOTIATED;
++ goto exit;
++ }
+ decode_error:
+ {
+ gchar err_msg[JMSG_LENGTH_MAX];
+--
+2.30.2
+
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 96dd6f7228..85c9a20a2d 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
@@ -28,6 +28,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-go
file://0019-matroskademux-Skip-over-laces-directly-when-postproc.patch \
file://0020-matroskademux-Skip-over-zero-sized-Xiph-stream-heade.patch \
file://0021-matroskademux-Put-a-copy-of-the-codec-data-into-the-.patch \
+ file://0022-jpegdec-Directly-error-out-on-negotiation-failures.patch \
"
SRC_URI[sha256sum] = "9c1913f981900bd8867182639b20907b28ed78ef7a222cfbf2d8ba9dab992fa7"
--
2.43.0
next prev parent reply other threads:[~2025-01-04 13:42 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 13:41 [OE-core][scarthgap 00/25] Patch review Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 01/25] gstreamer1.0-plugins-good: fix several CVEs Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 02/25] gstreamer1.0-plugins-base: patch CVE-2024-47538 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 03/25] gstreamer1.0-plugins-base: patch CVE-2024-47607 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 04/25] gstreamer1.0-plugins-base: patch CVE-2024-47615 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 05/25] gstreamer1.0-plugins-good: patch CVE-2024-47613 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 06/25] gstreamer1.0-plugins-good: patch several CVEs Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 07/25] gstreamer1.0-plugins-base: patch CVE-2024-47541 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 08/25] gstreamer1.0-plugins-base: patch CVE-2024-47542 Steve Sakoman
2025-01-04 13:41 ` Steve Sakoman [this message]
2025-01-04 13:41 ` [OE-core][scarthgap 10/25] gstreamer1.0-plugins-base: patch CVE-2024-47600 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 11/25] gstreamer1.0-plugins-good: patch CVE-2024-47606 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 12/25] " Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 13/25] gstreamer1.0-plugins-good: patch CVE-2024-47774 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 14/25] gstreamer1.0-plugins-good: patch several CVEs Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 15/25] gstreamer1.0-plugins-base: patch CVE-2024-47835 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 16/25] gstreamer1.0: ignore CVEs fixed in plugins recipes Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 17/25] libarchive: Fix CVE-2024-20696 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 18/25] python3: upgrade 3.12.6 -> 3.12.7 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 19/25] python3: upgrade 3.12.7 -> 3.12.8 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 20/25] libxml2: Upgrade 2.12.8 -> 2.12.9 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 21/25] python3-requests: upgrade 2.32.0 -> 2.32.3 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 22/25] populate_sdk_ext: write_local_conf add shutil import Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 23/25] lttng-modules: fix sched_stat_runtime changed in Linux 6.6.66 Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 24/25] ovmf-native: remove .pyc files from install Steve Sakoman
2025-01-04 13:41 ` [OE-core][scarthgap 25/25] sanity.bbclass: skip check_userns for non-local uid Steve Sakoman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba5545302daee0fb5ac2f3ca45cf8524cee278dc.1735997984.git.steve@sakoman.com \
--to=steve@sakoman.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox