Version in base suite: 1.22.0-2 Base version: gstreamer1.0_1.22.0-2 Target version: gstreamer1.0_1.22.0-2+deb12u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/g/gstreamer1.0/gstreamer1.0_1.22.0-2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/g/gstreamer1.0/gstreamer1.0_1.22.0-2+deb12u1.dsc changelog | 7 + patches/allocator-Avoid-integer-overflow-when-allocating-sys.patch | 48 ++++++++++ patches/series | 1 3 files changed, 56 insertions(+) Unrecognised file line in .dsc: -----BEGIN PGP SIGNATURE----- diff -Nru gstreamer1.0-1.22.0/debian/changelog gstreamer1.0-1.22.0/debian/changelog --- gstreamer1.0-1.22.0/debian/changelog 2023-01-28 16:11:15.000000000 +0000 +++ gstreamer1.0-1.22.0/debian/changelog 2024-12-13 05:13:42.000000000 +0000 @@ -1,3 +1,10 @@ +gstreamer1.0 (1.22.0-2+deb12u1) bookworm-security; urgency=high + + * Non-maintainer upload by the Security Team. + * allocator: Avoid integer overflow when allocating sysmem (CVE-2024-47606) + + -- Salvatore Bonaccorso Fri, 13 Dec 2024 06:13:42 +0100 + gstreamer1.0 (1.22.0-2) unstable; urgency=medium * debian/rules: Set -Dauto_features=enabled diff -Nru gstreamer1.0-1.22.0/debian/patches/allocator-Avoid-integer-overflow-when-allocating-sys.patch gstreamer1.0-1.22.0/debian/patches/allocator-Avoid-integer-overflow-when-allocating-sys.patch --- gstreamer1.0-1.22.0/debian/patches/allocator-Avoid-integer-overflow-when-allocating-sys.patch 1970-01-01 00:00:00.000000000 +0000 +++ gstreamer1.0-1.22.0/debian/patches/allocator-Avoid-integer-overflow-when-allocating-sys.patch 2024-12-13 05:12:17.000000000 +0000 @@ -0,0 +1,48 @@ +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Thu, 26 Sep 2024 22:07:22 +0300 +Subject: allocator: Avoid integer overflow when allocating sysmem +Origin: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/commit/72af11b248b4cb60d3dfe4e9459eec0d20052c9b +Bug-Debian-Security: https://security-tracker.debian.org/tracker/CVE-2024-47606 + +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: +--- + subprojects/gstreamer/gst/gstallocator.c | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +--- a/gst/gstallocator.c ++++ b/gst/gstallocator.c +@@ -430,8 +430,20 @@ _sysmem_new_block (GstMemoryFlags flags, + /* ensure configured alignment */ + align |= gst_memory_alignment; + /* allocate more to compensate for alignment */ ++ if (align > G_MAXSIZE || maxsize > G_MAXSIZE - align) { ++ GST_CAT_WARNING (GST_CAT_MEMORY, ++ "Allocating %" G_GSIZE_FORMAT " bytes with alignment %" G_GSIZE_FORMAT ++ "x overflows", maxsize, align); ++ return NULL; ++ } + maxsize += align; + /* alloc header and data in one block */ ++ if (maxsize > G_MAXSIZE - sizeof (GstMemorySystem)) { ++ GST_CAT_WARNING (GST_CAT_MEMORY, ++ "Allocating %" G_GSIZE_FORMAT " bytes with alignment %" G_GSIZE_FORMAT ++ "x overflows", maxsize, align); ++ return NULL; ++ } + slice_size = sizeof (GstMemorySystem) + maxsize; + + mem = g_slice_alloc (slice_size); +@@ -481,6 +493,8 @@ _sysmem_copy (GstMemorySystem * mem, gss + size = mem->mem.size > offset ? mem->mem.size - offset : 0; + + copy = _sysmem_new_block (0, size, mem->mem.align, 0, size); ++ if (!copy) ++ return NULL; + GST_CAT_DEBUG (GST_CAT_PERFORMANCE, + "memcpy %" G_GSIZE_FORMAT " memory %p -> %p", size, mem, copy); + memcpy (copy->data, mem->data + mem->mem.offset + offset, size); diff -Nru gstreamer1.0-1.22.0/debian/patches/series gstreamer1.0-1.22.0/debian/patches/series --- gstreamer1.0-1.22.0/debian/patches/series 2023-01-28 16:11:15.000000000 +0000 +++ gstreamer1.0-1.22.0/debian/patches/series 2024-12-13 05:11:22.000000000 +0000 @@ -1 +1,2 @@ 0001-registrybinary-Update-magic-version-string.patch +allocator-Avoid-integer-overflow-when-allocating-sys.patch