i8c
changed/i8c/gstreamer1-plugins-good-1.16.1-5.el8_10
parent
21063236c2
commit
52a0e14d3b
@ -0,0 +1,55 @@
|
|||||||
|
From 2150d2ade8bd5949fa18fcc75b78016e3becc92b Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
|
||||||
|
Date: Tue, 13 Jun 2023 13:20:16 +0300
|
||||||
|
Subject: [PATCH 3/9] flacparse: Avoid integer overflow in available data check
|
||||||
|
for image tags
|
||||||
|
|
||||||
|
If the image length as stored in the file is some bogus integer then
|
||||||
|
adding it to the current byte readers position can overflow and wrongly
|
||||||
|
have the check for enough available data succeed.
|
||||||
|
|
||||||
|
This then later can cause NULL pointer dereferences or out of bounds
|
||||||
|
reads/writes when actually reading the image data.
|
||||||
|
|
||||||
|
Fixes ZDI-CAN-20775
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/2661
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4894>
|
||||||
|
---
|
||||||
|
gst/audioparsers/gstflacparse.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gst/audioparsers/gstflacparse.c b/gst/audioparsers/gstflacparse.c
|
||||||
|
index 2758d4cfc..cd5a48bee 100644
|
||||||
|
--- a/gst/audioparsers/gstflacparse.c
|
||||||
|
+++ b/gst/audioparsers/gstflacparse.c
|
||||||
|
@@ -1109,6 +1109,7 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
|
||||||
|
GstMapInfo map;
|
||||||
|
guint32 img_len = 0, img_type = 0;
|
||||||
|
guint32 img_mimetype_len = 0, img_description_len = 0;
|
||||||
|
+ const guint8 *img_data;
|
||||||
|
|
||||||
|
gst_buffer_map (buffer, &map, GST_MAP_READ);
|
||||||
|
gst_byte_reader_init (&reader, map.data, map.size);
|
||||||
|
@@ -1135,7 +1136,7 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
|
||||||
|
if (!gst_byte_reader_get_uint32_be (&reader, &img_len))
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
- if (gst_byte_reader_get_pos (&reader) + img_len > map.size)
|
||||||
|
+ if (!gst_byte_reader_get_data (&reader, img_len, &img_data))
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
GST_INFO_OBJECT (flacparse, "Got image of %d bytes", img_len);
|
||||||
|
@@ -1144,8 +1145,7 @@ gst_flac_parse_handle_picture (GstFlacParse * flacparse, GstBuffer * buffer)
|
||||||
|
if (flacparse->tags == NULL)
|
||||||
|
flacparse->tags = gst_tag_list_new_empty ();
|
||||||
|
|
||||||
|
- gst_tag_list_add_id3_image (flacparse->tags,
|
||||||
|
- map.data + gst_byte_reader_get_pos (&reader), img_len, img_type);
|
||||||
|
+ gst_tag_list_add_id3_image (flacparse->tags, img_data, img_len, img_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
gst_buffer_unmap (buffer, &map);
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From f0007ee8579f97999d69bbc6d7f9ac166a06fddb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:45:27 +0100
|
||||||
|
Subject: [PATCH 4/9] qtdemux: Avoid integer overflow when parsing Theora
|
||||||
|
extension
|
||||||
|
|
||||||
|
Thanks to Antonio Morales for finding and reporting the issue.
|
||||||
|
|
||||||
|
Fixes GHSL-2024-166
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3851
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8094>
|
||||||
|
---
|
||||||
|
gst/isomp4/qtdemux.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
|
||||||
|
index ad07c1e36..229edb3e5 100644
|
||||||
|
--- a/gst/isomp4/qtdemux.c
|
||||||
|
+++ b/gst/isomp4/qtdemux.c
|
||||||
|
@@ -7816,7 +7816,7 @@ qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
||||||
|
end -= 8;
|
||||||
|
|
||||||
|
while (buf < end) {
|
||||||
|
- gint size;
|
||||||
|
+ guint32 size;
|
||||||
|
guint32 type;
|
||||||
|
|
||||||
|
size = QT_UINT32 (buf);
|
||||||
|
@@ -7824,7 +7824,7 @@ qtdemux_parse_theora_extension (GstQTDemux * qtdemux, QtDemuxStream * stream,
|
||||||
|
|
||||||
|
GST_LOG_OBJECT (qtdemux, "%p %p", buf, end);
|
||||||
|
|
||||||
|
- if (buf + size > end || size <= 0)
|
||||||
|
+ if (end - buf < size || size < 8)
|
||||||
|
break;
|
||||||
|
|
||||||
|
buf += 8;
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,49 @@
|
|||||||
|
From 8d4c79e61a62245dc6a499b0a439317bb37d0508 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:47:09 +0100
|
||||||
|
Subject: [PATCH 5/9] gdkpixbufdec: Check if initializing the video info
|
||||||
|
actually succeeded
|
||||||
|
|
||||||
|
Otherwise a 0-byte buffer would be allocated, which gives NULL memory when
|
||||||
|
mapped.
|
||||||
|
|
||||||
|
Thanks to Antonio Morales for finding and reporting the issue.
|
||||||
|
|
||||||
|
Fixes GHSL-2024-118
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3876
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8103>
|
||||||
|
---
|
||||||
|
ext/gdk_pixbuf/gstgdkpixbufdec.c | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/ext/gdk_pixbuf/gstgdkpixbufdec.c b/ext/gdk_pixbuf/gstgdkpixbufdec.c
|
||||||
|
index c119236a8..c0ecb3a08 100644
|
||||||
|
--- a/ext/gdk_pixbuf/gstgdkpixbufdec.c
|
||||||
|
+++ b/ext/gdk_pixbuf/gstgdkpixbufdec.c
|
||||||
|
@@ -318,7 +318,8 @@ gst_gdk_pixbuf_dec_flush (GstGdkPixbufDec * filter)
|
||||||
|
|
||||||
|
|
||||||
|
gst_video_info_init (&info);
|
||||||
|
- gst_video_info_set_format (&info, fmt, width, height);
|
||||||
|
+ if (!gst_video_info_set_format (&info, fmt, width, height))
|
||||||
|
+ goto format_not_supported;
|
||||||
|
info.fps_n = filter->in_fps_n;
|
||||||
|
info.fps_d = filter->in_fps_d;
|
||||||
|
caps = gst_video_info_to_caps (&info);
|
||||||
|
@@ -379,6 +380,12 @@ channels_not_supported:
|
||||||
|
("%d channels not supported", n_channels));
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
+format_not_supported:
|
||||||
|
+ {
|
||||||
|
+ GST_ELEMENT_ERROR (filter, STREAM, DECODE, (NULL),
|
||||||
|
+ ("%d channels with %dx%d not supported", n_channels, width, height));
|
||||||
|
+ return GST_FLOW_ERROR;
|
||||||
|
+ }
|
||||||
|
no_buffer:
|
||||||
|
{
|
||||||
|
GST_DEBUG ("Failed to create outbuffer - %s", gst_flow_get_name (ret));
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
From c7f995f1030efb3281faa72a1a8827969f3591bc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:48:03 +0100
|
||||||
|
Subject: [PATCH 6/9] matroskademux: Only unmap GstMapInfo in WavPack header
|
||||||
|
extraction error paths if previously mapped
|
||||||
|
|
||||||
|
Thanks to Antonio Morales for finding and reporting the issue.
|
||||||
|
|
||||||
|
Fixes GHSL-2024-197
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3863
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057>
|
||||||
|
---
|
||||||
|
gst/matroska/matroska-demux.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
|
||||||
|
index f890ae611..2db68bc1f 100644
|
||||||
|
--- a/gst/matroska/matroska-demux.c
|
||||||
|
+++ b/gst/matroska/matroska-demux.c
|
||||||
|
@@ -3687,7 +3687,6 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
|
||||||
|
GstMatroskaTrackAudioContext *audiocontext =
|
||||||
|
(GstMatroskaTrackAudioContext *) stream;
|
||||||
|
GstBuffer *newbuf = NULL;
|
||||||
|
- GstMapInfo map, outmap;
|
||||||
|
guint8 *buf_data, *data;
|
||||||
|
Wavpack4Header wvh;
|
||||||
|
|
||||||
|
@@ -3704,11 +3703,11 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
|
||||||
|
|
||||||
|
if (audiocontext->channels <= 2) {
|
||||||
|
guint32 block_samples, tmp;
|
||||||
|
+ GstMapInfo outmap;
|
||||||
|
gsize size = gst_buffer_get_size (*buf);
|
||||||
|
|
||||||
|
if (size < 4) {
|
||||||
|
GST_ERROR_OBJECT (element, "Too small wavpack buffer");
|
||||||
|
- gst_buffer_unmap (*buf, &map);
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -3746,6 +3745,7 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
|
||||||
|
*buf = newbuf;
|
||||||
|
audiocontext->wvpk_block_index += block_samples;
|
||||||
|
} else {
|
||||||
|
+ GstMapInfo map, outmap;
|
||||||
|
guint8 *outdata = NULL;
|
||||||
|
gsize buf_size, size;
|
||||||
|
guint32 block_samples, flags, crc, blocksize;
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,27 @@
|
|||||||
|
From 5d1ac58fa39a4e8e1cb0545c44aae69f71099f27 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:49:04 +0100
|
||||||
|
Subject: [PATCH 7/9] matroskademux: Fix off-by-one when parsing multi-channel
|
||||||
|
WavPack
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8057>
|
||||||
|
---
|
||||||
|
gst/matroska/matroska-demux.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/gst/matroska/matroska-demux.c b/gst/matroska/matroska-demux.c
|
||||||
|
index 2db68bc1f..0466c9a6b 100644
|
||||||
|
--- a/gst/matroska/matroska-demux.c
|
||||||
|
+++ b/gst/matroska/matroska-demux.c
|
||||||
|
@@ -3771,7 +3771,7 @@ gst_matroska_demux_add_wvpk_header (GstElement * element,
|
||||||
|
data += 4;
|
||||||
|
size -= 4;
|
||||||
|
|
||||||
|
- while (size > 12) {
|
||||||
|
+ while (size >= 12) {
|
||||||
|
flags = GST_READ_UINT32_LE (data);
|
||||||
|
data += 4;
|
||||||
|
size -= 4;
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,59 @@
|
|||||||
|
From f3358d7e6fb9540e45f1cde0378e94482846f216 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:49:37 +0100
|
||||||
|
Subject: [PATCH 8/9] qtdemux: Fix integer overflow when allocating the samples
|
||||||
|
table for fragmented MP4
|
||||||
|
|
||||||
|
This can lead to out of bounds writes and NULL pointer dereferences.
|
||||||
|
|
||||||
|
Fixes GHSL-2024-094, GHSL-2024-237, GHSL-2024-241
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3839
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8059>
|
||||||
|
---
|
||||||
|
gst/isomp4/qtdemux.c | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
|
||||||
|
index 229edb3e5..a37c92933 100644
|
||||||
|
--- a/gst/isomp4/qtdemux.c
|
||||||
|
+++ b/gst/isomp4/qtdemux.c
|
||||||
|
@@ -3327,6 +3327,7 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
||||||
|
gint i;
|
||||||
|
guint8 *data;
|
||||||
|
guint entry_size, dur_offset, size_offset, flags_offset = 0, ct_offset = 0;
|
||||||
|
+ guint new_n_samples;
|
||||||
|
QtDemuxSample *sample;
|
||||||
|
gboolean ismv = FALSE;
|
||||||
|
gint64 initial_offset;
|
||||||
|
@@ -3426,14 +3427,13 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
||||||
|
goto fail;
|
||||||
|
data = (guint8 *) gst_byte_reader_peek_data_unchecked (trun);
|
||||||
|
|
||||||
|
- if (stream->n_samples + samples_count >=
|
||||||
|
- QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample))
|
||||||
|
+ if (!g_uint_checked_add (&new_n_samples, stream->n_samples, samples_count) ||
|
||||||
|
+ new_n_samples >= QTDEMUX_MAX_SAMPLE_INDEX_SIZE / sizeof (QtDemuxSample))
|
||||||
|
goto index_too_big;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (qtdemux, "allocating n_samples %u * %u (%.2f MB)",
|
||||||
|
- stream->n_samples + samples_count, (guint) sizeof (QtDemuxSample),
|
||||||
|
- (stream->n_samples + samples_count) *
|
||||||
|
- sizeof (QtDemuxSample) / (1024.0 * 1024.0));
|
||||||
|
+ new_n_samples, (guint) sizeof (QtDemuxSample),
|
||||||
|
+ (new_n_samples) * sizeof (QtDemuxSample) / (1024.0 * 1024.0));
|
||||||
|
|
||||||
|
/* create a new array of samples if it's the first sample parsed */
|
||||||
|
if (stream->n_samples == 0) {
|
||||||
|
@@ -3442,7 +3442,7 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
|
||||||
|
/* or try to reallocate it with space enough to insert the new samples */
|
||||||
|
} else
|
||||||
|
stream->samples = g_try_renew (QtDemuxSample, stream->samples,
|
||||||
|
- stream->n_samples + samples_count);
|
||||||
|
+ new_n_samples);
|
||||||
|
if (stream->samples == NULL)
|
||||||
|
goto out_of_memory;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
@ -0,0 +1,40 @@
|
|||||||
|
From 6b751c71eb130f2c69eeacf5f47e0d6de639dc78 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Wim Taymans <wtaymans@redhat.com>
|
||||||
|
Date: Mon, 16 Dec 2024 11:52:04 +0100
|
||||||
|
Subject: [PATCH 9/9] qtdemux: Make sure only an even number of bytes is
|
||||||
|
processed when handling CEA608 data
|
||||||
|
|
||||||
|
An odd number of bytes would lead to out of bound reads and writes, and doesn't
|
||||||
|
make any sense as CEA608 comes in byte pairs.
|
||||||
|
|
||||||
|
Strip off any leftover bytes and assume everything before that is valid.
|
||||||
|
|
||||||
|
Thanks to Antonio Morales for finding and reporting the issue.
|
||||||
|
|
||||||
|
Fixes GHSL-2024-195
|
||||||
|
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3841
|
||||||
|
|
||||||
|
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8059>
|
||||||
|
---
|
||||||
|
gst/isomp4/qtdemux.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
|
||||||
|
index a37c92933..8336ff302 100644
|
||||||
|
--- a/gst/isomp4/qtdemux.c
|
||||||
|
+++ b/gst/isomp4/qtdemux.c
|
||||||
|
@@ -5612,6 +5612,11 @@ convert_to_s334_1a (const guint8 * ccpair, guint8 ccpair_size, guint field,
|
||||||
|
guint8 *storage;
|
||||||
|
gsize i;
|
||||||
|
|
||||||
|
+ /* Strip off any leftover odd bytes and assume everything before is valid */
|
||||||
|
+ if (ccpair_size % 2 != 0) {
|
||||||
|
+ ccpair_size -= 1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* We are converting from pairs to triplets */
|
||||||
|
*res = ccpair_size / 2 * 3;
|
||||||
|
storage = g_malloc (*res);
|
||||||
|
--
|
||||||
|
2.47.0
|
||||||
|
|
Loading…
Reference in new issue