summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchana Polampalli <archana.polampalli@windriver.com>2025-07-11 17:03:12 +0530
committerSteve Sakoman <steve@sakoman.com>2025-07-18 08:32:26 -0700
commitd668325fd8dbbdb180bf469d60693759ee477034 (patch)
tree12306c7fe865d708a730b3122b76354650694fe2
parent78620e54fd6cf9006e73aa147721db72930c1dc7 (diff)
downloadpoky-d668325fd8dbbdb180bf469d60693759ee477034.tar.gz
ofono: fix CVE-2023-4232
A flaw was found in ofono, an Open Source Telephony on Linux. A stack overflow bug is triggered within the decode_status_report() function during the SMS decoding. It is assumed that the attack scenario is accessible from a compromised modem, a malicious base station, or just SMS. There is a bound check for this memcpy length in decode_submit(), but it was forgotten in decode_status_report(). (From OE-Core rev: 02005c81a55930d9f57d44674cdc5eb6171c8c76) Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch30
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.34.bb1
2 files changed, 31 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch
new file mode 100644
index 0000000000..da714f6a87
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch
@@ -0,0 +1,30 @@
1From 2ff2da7ac374a790f8b2a0216bcb4e3126498225 Mon Sep 17 00:00:00 2001
2From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
3Date: Wed, 4 Dec 2024 10:18:52 +0200
4Subject: [PATCH] smsutil: check status report fits in buffer
5
6Fixes CVE-2023-4232
7
8CVE: CVE-2023-4232
9Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=2ff2da7ac374a790f8b2a0216bcb4e3126498225]
10Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
11---
12 src/smsutil.c | 3 +++
13 1 file changed, 3 insertions(+)
14
15diff --git a/src/smsutil.c b/src/smsutil.c
16index ac89f16c..a706e26f 100644
17--- a/src/smsutil.c
18+++ b/src/smsutil.c
19@@ -1088,6 +1088,9 @@ static gboolean decode_status_report(const unsigned char *pdu, int len,
20 if ((len - offset) < expected)
21 return FALSE;
22
23+ if (expected > (int)sizeof(out->status_report.ud))
24+ return FALSE;
25+
26 memcpy(out->status_report.ud, pdu + offset, expected);
27 }
28
29--
302.30.2
diff --git a/meta/recipes-connectivity/ofono/ofono_1.34.bb b/meta/recipes-connectivity/ofono/ofono_1.34.bb
index 9f11af9236..8a298bfade 100644
--- a/meta/recipes-connectivity/ofono/ofono_1.34.bb
+++ b/meta/recipes-connectivity/ofono/ofono_1.34.bb
@@ -26,6 +26,7 @@ SRC_URI = "\
26 file://CVE-2024-7547.patch \ 26 file://CVE-2024-7547.patch \
27 file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \ 27 file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \
28 file://CVE-2024-7537.patch \ 28 file://CVE-2024-7537.patch \
29 file://CVE-2023-4232.patch \
29" 30"
30SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7" 31SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7"
31 32