summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogita Urade <yogita.urade@windriver.com>2025-01-14 08:03:22 +0000
committerSteve Sakoman <steve@sakoman.com>2025-01-18 06:21:02 -0800
commit65d58821e0496c90594176fdb2ef2c240f86bcd9 (patch)
tree315fed4d39c426b6d02cb259015fe022f9574ed1
parenta551469f700bd621a1bbccbe904ac1bf749f1504 (diff)
downloadpoky-65d58821e0496c90594176fdb2ef2c240f86bcd9.tar.gz
ofono: fix CVE-2024-7547
oFono SMS Decoder Stack-based Buffer Overflow Privilege Escalation Vulnerability. This vulnerability allows local attackers to execute arbitrary code on affected installations of oFono. An attacker must first obtain the ability to execute code on the target modem in order to exploit this vulnerability. The specific flaw exists within the parsing of SMS PDUs. The issue results from the lack of proper validation of the length of user- supplied data prior to copying it to a stack-based buffer. An attacker can leverage this vulnerability to execute code in the context of the service account. Was ZDI-CAN-23460. Reference: https://security-tracker.debian.org/tracker/CVE-2024-7547 Upstream patch: https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=305df050d02aea8532f7625d6642685aa530f9b0 (From OE-Core rev: 8c32d91b64ae296d7832ddeb42983f4f3c237946) Signed-off-by: Yogita Urade <yogita.urade@windriver.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-connectivity/ofono/ofono/CVE-2024-7547.patch29
-rw-r--r--meta/recipes-connectivity/ofono/ofono_1.34.bb1
2 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7547.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7547.patch
new file mode 100644
index 0000000000..b6b08127a8
--- /dev/null
+++ b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7547.patch
@@ -0,0 +1,29 @@
1From 305df050d02aea8532f7625d6642685aa530f9b0 Mon Sep 17 00:00:00 2001
2From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
3Date: Tue, 3 Dec 2024 21:43:51 +0200
4Subject: [PATCH] Fix CVE-2024-7547
5
6CVE: CVE-2024-7547
7Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=305df050d02aea8532f7625d6642685aa530f9b0]
8
9Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
10---
11 src/smsutil.c | 3 +++
12 1 file changed, 3 insertions(+)
13
14diff --git a/src/smsutil.c b/src/smsutil.c
15index e073a06..f8ff428 100644
16--- a/src/smsutil.c
17+++ b/src/smsutil.c
18@@ -1475,6 +1475,9 @@ static gboolean decode_command(const unsigned char *pdu, int len,
19 if ((len - offset) < out->command.cdl)
20 return FALSE;
21
22+ if (out->command.cdl > sizeof(out->command.cd))
23+ return FALSE;
24+
25 memcpy(out->command.cd, pdu + offset, out->command.cdl);
26
27 return TRUE;
28--
292.40.0
diff --git a/meta/recipes-connectivity/ofono/ofono_1.34.bb b/meta/recipes-connectivity/ofono/ofono_1.34.bb
index 0c1e0ea6f8..8205ea683d 100644
--- a/meta/recipes-connectivity/ofono/ofono_1.34.bb
+++ b/meta/recipes-connectivity/ofono/ofono_1.34.bb
@@ -23,6 +23,7 @@ SRC_URI = "\
23 file://CVE-2024-7544.patch \ 23 file://CVE-2024-7544.patch \
24 file://CVE-2024-7545.patch \ 24 file://CVE-2024-7545.patch \
25 file://CVE-2024-7546.patch \ 25 file://CVE-2024-7546.patch \
26 file://CVE-2024-7547.patch \
26" 27"
27SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7" 28SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7"
28 29