summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch')
-rw-r--r--meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch
new file mode 100644
index 0000000000..2f5366348d
--- /dev/null
+++ b/meta-oe/recipes-support/libsoup/libsoup-2.4/CVE-2025-32909.patch
@@ -0,0 +1,38 @@
1From e6e088e62c10ab91fa2f2ad5c122332aa7cde97c Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 12 May 2025 16:55:37 +0800
4Subject: [PATCH] content-sniffer: Handle sniffing resource shorter than
5 4 bytes
6
7CVE: CVE-2025-32909
8Upstream-Status: Backport
9[https://gitlab.gnome.org/GNOME/libsoup/-/commit/ba4c3a6f988beff59e45801ab36067293d24ce92]
10
11Signed-off-by: Changqing Li <changqing.li@windriver.com>
12---
13 libsoup/soup-content-sniffer.c | 7 ++++++-
14 1 file changed, 6 insertions(+), 1 deletion(-)
15
16diff --git a/libsoup/soup-content-sniffer.c b/libsoup/soup-content-sniffer.c
17index eac9e7b..73d2245 100644
18--- a/libsoup/soup-content-sniffer.c
19+++ b/libsoup/soup-content-sniffer.c
20@@ -227,9 +227,14 @@ sniff_mp4 (SoupContentSniffer *sniffer, SoupBuffer *buffer)
21 {
22 const char *resource = (const char *)buffer->data;
23 guint resource_length = MIN (512, buffer->length);
24- guint32 box_size = *((guint32*)resource);
25+ guint32 box_size;
26 guint i;
27
28+ if (resource_length < sizeof (guint32))
29+ return FALSE;
30+
31+ box_size = *((guint32*)resource);
32+
33 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
34 box_size = ((box_size >> 24) |
35 ((box_size << 8) & 0x00FF0000) |
36--
372.34.1
38