summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPraveen Kumar <praveen.kumar@windriver.com>2025-05-07 06:51:15 +0000
committerSteve Sakoman <steve@sakoman.com>2025-05-14 09:08:57 -0700
commit86ea2699ac0e8fddcd5b03e71e05556fe466627d (patch)
tree1ac00ff9040a122081a767226e71656f3d6bdc4b
parente4df627b2267cd1f4259db2aaf813fbdac33b311 (diff)
downloadpoky-86ea2699ac0e8fddcd5b03e71e05556fe466627d.tar.gz
connman :fix CVE-2025-32743
In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c can be NULL or an empty string when the TC (Truncated) bit is set in a DNS response. This allows attackers to cause a denial of service (application crash) or possibly execute arbitrary code, because those lookup values lead to incorrect length calculations and incorrect memcpy operations. Reference: https://nvd.nist.gov/vuln/detail/CVE-2025-32743 Upstream-patch: https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f (From OE-Core rev: 9558ec2091964556b47b0909c5d243aee5bafb6f) Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch48
-rw-r--r--meta/recipes-connectivity/connman/connman_1.42.bb1
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch
new file mode 100644
index 0000000000..b31c59aa70
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch
@@ -0,0 +1,48 @@
1From d90b911f6760959bdf1393c39fe8d1118315490f Mon Sep 17 00:00:00 2001
2From: Praveen Kumar <praveen.kumar@windriver.com>
3Date: Thu, 24 Apr 2025 11:39:29 +0000
4Subject: [PATCH] dnsproxy: Fix NULL/empty lookup causing potential crash
5
6In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c
7can be NULL or an empty string when the TC (Truncated) bit is set in
8a DNS response. This allows attackers to cause a denial of service
9(application crash) or possibly execute arbitrary code, because those
10lookup values lead to incorrect length calculations and incorrect
11memcpy operations.
12
13This patch includes a check to make sure loookup value is valid before
14using it. This helps avoid unexpected value when the input is empty or
15incorrect.
16
17Fixes: CVE-2025-32743
18
19CVE: CVE-2025-32743
20
21Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f]
22
23Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
24---
25 src/dnsproxy.c | 7 ++++++-
26 1 file changed, 6 insertions(+), 1 deletion(-)
27
28diff --git a/src/dnsproxy.c b/src/dnsproxy.c
29index 7ebffbc..1a5a4f3 100644
30--- a/src/dnsproxy.c
31+++ b/src/dnsproxy.c
32@@ -1669,8 +1669,13 @@ static int ns_resolv(struct server_data *server, struct request_data *req,
33 gpointer request, gpointer name)
34 {
35 int sk = -1;
36+ int err;
37 const char *lookup = (const char *)name;
38- int err = ns_try_resolv_from_cache(req, request, lookup);
39+
40+ if (!lookup || strlen(lookup) == 0)
41+ return -EINVAL;
42+
43+ err = ns_try_resolv_from_cache(req, request, lookup);
44
45 if (err > 0)
46 /* cache hit */
47--
482.40.0
diff --git a/meta/recipes-connectivity/connman/connman_1.42.bb b/meta/recipes-connectivity/connman/connman_1.42.bb
index 91ab9895ac..3a1c9802bd 100644
--- a/meta/recipes-connectivity/connman/connman_1.42.bb
+++ b/meta/recipes-connectivity/connman/connman_1.42.bb
@@ -7,6 +7,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
7 file://no-version-scripts.patch \ 7 file://no-version-scripts.patch \
8 file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \ 8 file://0001-vpn-Adding-support-for-latest-pppd-2.5.0-release.patch \
9 file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \ 9 file://0001-src-log.c-Include-libgen.h-for-basename-API.patch \
10 file://CVE-2025-32743.patch \
10 " 11 "
11 12
12SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" 13SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch"