summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorPraveen Kumar <praveen.kumar@windriver.com>2025-05-16 15:29:09 +0530
committerSteve Sakoman <steve@sakoman.com>2025-05-28 08:46:32 -0700
commit23a840550950d2424d3f49937dea4f5066ba709e (patch)
tree0fdea6f1a8ad61ab1239047cad8c679b1b1f24e9 /meta
parent7f043fb4bbe96cf6714938c494331bcdee29fb7c (diff)
downloadpoky-23a840550950d2424d3f49937dea4f5066ba709e.tar.gz
connman :fix CVE-2025-32366
In ConnMan through 1.44, parse_rr in dnsproxy.c has a memcpy length that depends on an RR RDLENGTH value, i.e., *rdlen=ntohs(rr->rdlen) and memcpy(response+offset,*end,*rdlen) without a check for whether the sum of *end and *rdlen exceeds max. Consequently, *rdlen may be larger than the amount of remaining packet data in the current state of parsing. Values of stack memory locations may be sent over the network in a response. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-32366 Upstream-patch: https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=8d3be0285f1d4667bfe85dba555c663eb3d704b4 (From OE-Core rev: 1b9156124b4a07e0e3e0ab09e87d654eae6c7b4e) Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch41
-rw-r--r--meta/recipes-connectivity/connman/connman_1.41.bb1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch
new file mode 100644
index 0000000000..45c9ddaf6f
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch
@@ -0,0 +1,41 @@
1From 8d3be0285f1d4667bfe85dba555c663eb3d704b4 Mon Sep 17 00:00:00 2001
2From: Yoonje Shin <ioerts@kookmin.ac.kr>
3Date: Mon, 12 May 2025 10:48:18 +0200
4Subject: [PATCH] dnsproxy: Address CVE-2025-32366 vulnerability
5
6In Connman parse_rr in dnsproxy.c has a memcpy length
7that depends on an RR RDLENGTH value (i.e., *rdlen=ntohs(rr->rdlen)
8and memcpy(response+offset,*end,*rdlen)). Here, rdlen may be larger
9than the amount of remaining packet data in the current state of
10parsing. As a result, values of stack memory locations may be sent
11over the network in a response.
12
13This patch adds a check to ensure that (*end + *rdlen) does not exceed
14the valid range. If the condition is violated, the function returns
15-EINVAL.
16
17CVE: CVE-2025-32366
18
19Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=8d3be0285f1d4667bfe85dba555c663eb3d704b4]
20
21Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
22---
23 src/dnsproxy.c | 3 +++
24 1 file changed, 3 insertions(+)
25
26diff --git a/src/dnsproxy.c b/src/dnsproxy.c
27index 334dd00..74aed50 100644
28--- a/src/dnsproxy.c
29+++ b/src/dnsproxy.c
30@@ -950,6 +950,9 @@ static int parse_rr(unsigned char *buf, unsigned char *start,
31 if ((unsigned int) (offset + *rdlen) > *response_size)
32 return -ENOBUFS;
33
34+ if ((*end + *rdlen) > max)
35+ return -EINVAL;
36+
37 memcpy(response + offset, *end, *rdlen);
38
39 *end += *rdlen;
40--
412.40.0
diff --git a/meta/recipes-connectivity/connman/connman_1.41.bb b/meta/recipes-connectivity/connman/connman_1.41.bb
index caf0610c3f..28331712fd 100644
--- a/meta/recipes-connectivity/connman/connman_1.41.bb
+++ b/meta/recipes-connectivity/connman/connman_1.41.bb
@@ -10,6 +10,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
10 file://CVE-2022-32292.patch \ 10 file://CVE-2022-32292.patch \
11 file://CVE-2023-28488.patch \ 11 file://CVE-2023-28488.patch \
12 file://CVE-2025-32743.patch \ 12 file://CVE-2025-32743.patch \
13 file://CVE-2025-32366.patch \
13 " 14 "
14 15
15SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" 16SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"