Skip to content
Snippets Groups Projects
Commit 59abdba8 authored by Salvatore Bonaccorso's avatar Salvatore Bonaccorso Committed by Dylan Aïssi
Browse files

Import Debian changes 1.22.0-2+deb12u1

parent 83cb01bb
No related branches found
No related tags found
4 merge requests!12Merge changes from apertis/v2024-security into apertis/v2024,!11Backport v2024 <- v2025: Update from debian/bookworm-security,!10Backport v2025 <- v2026dev1: Update from debian/bookworm-security,!9Update from debian/bookworm-security for apertis/v2026dev1
Pipeline #848525 canceled
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 <carnil@debian.org> Fri, 13 Dec 2024 06:13:42 +0100
gstreamer1.0 (1.22.0-2) unstable; urgency=medium
* debian/rules: Set -Dauto_features=enabled
......
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8044>
---
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);
0001-registrybinary-Update-magic-version-string.patch
allocator-Avoid-integer-overflow-when-allocating-sys.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment