summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2025-01-05 11:13:13 +0530
committerSteve Sakoman <steve@sakoman.com>2025-01-09 08:41:04 -0800
commit063675114d511748dafeb786e5cb767f5986c453 (patch)
tree6771f6c08e4f87c19b68b447b591460f6cc8fef3
parent9bc81ff4a1912c1cbfdbd0f8e974995017324565 (diff)
downloadpoky-063675114d511748dafeb786e5cb767f5986c453.tar.gz
gstreamer1.0-plugins-good: Fix for CVE-2024-47599
Upstream: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8040 (From OE-Core rev: 2fe3b2846bd65a44e4823f04693a4579a71a862a) Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/CVE-2024-47599.patch99
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.7.bb1
2 files changed, 100 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/CVE-2024-47599.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/CVE-2024-47599.patch
new file mode 100644
index 0000000000..8dde992bcb
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/CVE-2024-47599.patch
@@ -0,0 +1,99 @@
1From 3cdf206f4fc5a9860bfe1437ed3d01e7d23c6c3e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
3Date: Mon, 30 Sep 2024 16:22:19 +0300
4Subject: [PATCH] jpegdec: Directly error out on negotiation failures
5
6Thanks to Antonio Morales for finding and reporting the issue.
7
8Fixes GHSL-2024-247
9Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3862
10
11Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8040>
12
13Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/3cdf206f4fc5a9860bfe1437ed3d01e7d23c6c3e]
14CVE: CVE-2024-47599
15Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
16---
17 .../gst-plugins-good/ext/jpeg/gstjpegdec.c | 22 ++++++++++++++-----
18 1 file changed, 17 insertions(+), 5 deletions(-)
19
20diff --git a/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c b/subprojects/gst-plugins-good/ext/jpeg/gstjpegdec.c
21index 51bc2d14bf0e..7523419835ee 100644
22--- a/ext/jpeg/gstjpegdec.c
23+++ b/ext/jpeg/gstjpegdec.c
24@@ -1068,13 +1068,14 @@ gst_jpeg_turbo_parse_ext_fmt_convert (GstJpegDec * dec, gint * clrspc)
25 }
26 #endif
27
28-static void
29+static gboolean
30 gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
31 gboolean interlaced)
32 {
33 GstVideoCodecState *outstate;
34 GstVideoInfo *info;
35 GstVideoFormat format;
36+ gboolean res;
37
38 #ifdef JCS_EXTENSIONS
39 if (dec->format_convert) {
40@@ -1104,7 +1105,7 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
41 height == GST_VIDEO_INFO_HEIGHT (info) &&
42 format == GST_VIDEO_INFO_FORMAT (info)) {
43 gst_video_codec_state_unref (outstate);
44- return;
45+ return TRUE;
46 }
47 gst_video_codec_state_unref (outstate);
48 }
49@@ -1118,6 +1119,8 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
50 outstate =
51 gst_video_decoder_set_output_state (GST_VIDEO_DECODER (dec), format,
52 width, height, dec->input_state);
53+ if (!outstate)
54+ return FALSE;
55
56 switch (clrspc) {
57 case JCS_RGB:
58@@ -1142,10 +1145,12 @@ gst_jpeg_dec_negotiate (GstJpegDec * dec, gint width, gint height, gint clrspc,
59
60 gst_video_codec_state_unref (outstate);
61
62- gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
63+ res = gst_video_decoder_negotiate (GST_VIDEO_DECODER (dec));
64
65 GST_DEBUG_OBJECT (dec, "max_v_samp_factor=%d", dec->cinfo.max_v_samp_factor);
66 GST_DEBUG_OBJECT (dec, "max_h_samp_factor=%d", dec->cinfo.max_h_samp_factor);
67+
68+ return res;
69 }
70
71 static GstFlowReturn
72@@ -1425,8 +1430,9 @@ gst_jpeg_dec_handle_frame (GstVideoDecoder * bdec, GstVideoCodecFrame * frame)
73 num_fields = 1;
74 }
75
76- gst_jpeg_dec_negotiate (dec, width, output_height,
77- dec->cinfo.jpeg_color_space, num_fields == 2);
78+ if (!gst_jpeg_dec_negotiate (dec, width, output_height,
79+ dec->cinfo.jpeg_color_space, num_fields == 2))
80+ goto negotiation_failed;
81
82 state = gst_video_decoder_get_output_state (bdec);
83 ret = gst_video_decoder_allocate_output_frame (bdec, frame);
84@@ -1558,6 +1564,12 @@ map_failed:
85 ret = GST_FLOW_ERROR;
86 goto exit;
87 }
88+negotiation_failed:
89+ {
90+ GST_ELEMENT_ERROR (dec, CORE, NEGOTIATION, (NULL), ("failed to negotiate"));
91+ ret = GST_FLOW_NOT_NEGOTIATED;
92+ goto exit;
93+ }
94 decode_error:
95 {
96 gchar err_msg[JMSG_LENGTH_MAX];
97--
98GitLab
99
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.7.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.7.bb
index 98cef84081..0daae0b519 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.7.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.20.7.bb
@@ -19,6 +19,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-go
19 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-10.patch \ 19 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-10.patch \
20 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-11.patch \ 20 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-11.patch \
21 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-12.patch \ 21 file://CVE-2024-47537_47539_47543_47544_47545_47546_47596_47597_47598-12.patch \
22 file://CVE-2024-47599.patch \
22 " 23 "
23 24
24SRC_URI[sha256sum] = "599f093cc833a1e346939ab6e78a3f8046855b6da13520aae80dd385434f4ab2" 25SRC_URI[sha256sum] = "599f093cc833a1e346939ab6e78a3f8046855b6da13520aae80dd385434f4ab2"