summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Anusuri <vanusuri@mvista.com>2024-05-10 17:23:44 +0530
committerSteve Sakoman <steve@sakoman.com>2024-05-16 05:22:09 -0700
commitbb3988414648dbb380b888c7fdaec2c9b2c1d4ec (patch)
treea2b98705de9d07dab663a7b794e9855782ae5951
parent688f3725d2bc14f1343d2d3fb9b13c58c1140089 (diff)
downloadpoky-bb3988414648dbb380b888c7fdaec2c9b2c1d4ec.tar.gz
gstreamer1.0-plugins-bad: fix CVE-2023-50186
Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/a46737a73155fe1c19fa5115df40da35426f9fb5] (From OE-Core rev: ce2d6ba5d69867471919fe698467e243d5f0e73c) 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-bad/CVE-2023-50186.patch70
-rw-r--r--meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.7.bb1
2 files changed, 71 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2023-50186.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2023-50186.patch
new file mode 100644
index 0000000000..86bae8fcaa
--- /dev/null
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/CVE-2023-50186.patch
@@ -0,0 +1,70 @@
1From a46737a73155fe1c19fa5115df40da35426f9fb5 Mon Sep 17 00:00:00 2001
2From: Seungha Yang <seungha@centricular.com>
3Date: Thu, 23 Nov 2023 20:24:42 +0900
4Subject: [PATCH] av1parser: Fix array sizes in scalability structure
5
6Since the AV1 specification is not explicitly mentioning about
7the array size bounds, array sizes in scalability structure
8should be defined as possible maximum sizes that can have.
9
10Also, this commit removes GST_AV1_MAX_SPATIAL_LAYERS define from
11public header which is API break but the define is misleading
12and this patch is introducing ABI break already
13
14ZDI-CAN-22300
15
16Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5824>
17
18Upstream-Status: Backport [https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/a46737a73155fe1c19fa5115df40da35426f9fb5]
19CVE: CVE-2023-50186
20Signed-off-by: Vijay Anusuri <vanusuri@mvista.com>
21---
22 gst-libs/gst/codecparsers/gstav1parser.h | 11 +++++------
23 gst/videoparsers/gstav1parse.c | 2 +-
24 2 files changed, 6 insertions(+), 7 deletions(-)
25
26diff --git a/gst-libs/gst/codecparsers/gstav1parser.h b/gst-libs/gst/codecparsers/gstav1parser.h
27index 31f5945..ef6ce9e 100644
28--- a/gst-libs/gst/codecparsers/gstav1parser.h
29+++ b/gst-libs/gst/codecparsers/gstav1parser.h
30@@ -71,9 +71,8 @@ G_BEGIN_DECLS
31 #define GST_AV1_MAX_TILE_COUNT 512
32 #define GST_AV1_MAX_OPERATING_POINTS \
33 (GST_AV1_MAX_NUM_TEMPORAL_LAYERS * GST_AV1_MAX_NUM_SPATIAL_LAYERS)
34-#define GST_AV1_MAX_SPATIAL_LAYERS 2 /* correct? */
35-#define GST_AV1_MAX_TEMPORAL_GROUP_SIZE 8 /* correct? */
36-#define GST_AV1_MAX_TEMPORAL_GROUP_REFERENCES 8 /* correct? */
37+#define GST_AV1_MAX_TEMPORAL_GROUP_SIZE 255
38+#define GST_AV1_MAX_TEMPORAL_GROUP_REFERENCES 7
39 #define GST_AV1_MAX_NUM_Y_POINTS 16
40 #define GST_AV1_MAX_NUM_CB_POINTS 16
41 #define GST_AV1_MAX_NUM_CR_POINTS 16
42@@ -968,9 +967,9 @@ struct _GstAV1MetadataScalability {
43 gboolean spatial_layer_dimensions_present_flag;
44 gboolean spatial_layer_description_present_flag;
45 gboolean temporal_group_description_present_flag;
46- guint16 spatial_layer_max_width[GST_AV1_MAX_SPATIAL_LAYERS];
47- guint16 spatial_layer_max_height[GST_AV1_MAX_SPATIAL_LAYERS];
48- guint8 spatial_layer_ref_id[GST_AV1_MAX_SPATIAL_LAYERS];
49+ guint16 spatial_layer_max_width[GST_AV1_MAX_NUM_SPATIAL_LAYERS];
50+ guint16 spatial_layer_max_height[GST_AV1_MAX_NUM_SPATIAL_LAYERS];
51+ guint8 spatial_layer_ref_id[GST_AV1_MAX_NUM_SPATIAL_LAYERS];
52 guint8 temporal_group_size;
53
54 guint8 temporal_group_temporal_id[GST_AV1_MAX_TEMPORAL_GROUP_SIZE];
55diff --git a/gst/videoparsers/gstav1parse.c b/gst/videoparsers/gstav1parse.c
56index f127856..ef1bc74 100644
57--- a/gst/videoparsers/gstav1parse.c
58+++ b/gst/videoparsers/gstav1parse.c
59@@ -1229,7 +1229,7 @@ gst_av1_parse_handle_sequence_obu (GstAV1Parse * self, GstAV1OBU * obu)
60 }
61
62 val = (self->parser->state.operating_point_idc >> 8) & 0x0f;
63- for (i = 0; i < (1 << GST_AV1_MAX_SPATIAL_LAYERS); i++) {
64+ for (i = 0; i < GST_AV1_MAX_NUM_SPATIAL_LAYERS; i++) {
65 if (val & (1 << i))
66 self->highest_spatial_id = i;
67 }
68--
692.25.1
70
diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.7.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.7.bb
index 4151e54284..dbe2b64c32 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.7.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.7.bb
@@ -16,6 +16,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad
16 file://CVE-2023-44429.patch \ 16 file://CVE-2023-44429.patch \
17 file://CVE-2024-0444.patch \ 17 file://CVE-2024-0444.patch \
18 file://CVE-2023-44446.patch \ 18 file://CVE-2023-44446.patch \
19 file://CVE-2023-50186.patch \
19 " 20 "
20SRC_URI[sha256sum] = "87251beebfd1325e5118cc67774061f6e8971761ca65a9e5957919610080d195" 21SRC_URI[sha256sum] = "87251beebfd1325e5118cc67774061f6e8971761ca65a9e5957919610080d195"
21 22