]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
ofono: fix CVE-2024-7544
authorYogita Urade <yogita.urade@windriver.com>
Tue, 14 Jan 2025 08:03:19 +0000 (08:03 +0000)
committerSteve Sakoman <steve@sakoman.com>
Tue, 14 Jan 2025 13:49:41 +0000 (05:49 -0800)
oFono SimToolKit Heap-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 STK command PDUs.
The issue results from the lack of proper validation of the length
of user-supplied data prior to copying it to a heap-based buffer.
An attacker can leverage this vulnerability to execute code in the
context of the service account. Was ZDI-CAN-23457.

Reference:
https://security-tracker.debian.org/tracker/CVE-2024-7544

Upstream patch:
https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=a240705a0d5d41eca6de4125ab2349ecde4c873a

Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/recipes-connectivity/ofono/ofono/CVE-2024-7544.patch [new file with mode: 0644]
meta/recipes-connectivity/ofono/ofono_1.34.bb

diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7544.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7544.patch
new file mode 100644 (file)
index 0000000..ebbf809
--- /dev/null
@@ -0,0 +1,30 @@
+From a240705a0d5d41eca6de4125ab2349ecde4c873a Mon Sep 17 00:00:00 2001
+From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
+Date: Tue, 3 Dec 2024 21:43:49 +0200
+Subject: [PATCH] stkutil: Fix CVE-2024-7544
+
+CVE: CVE-2024-7544
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=a240705a0d5d41eca6de4125ab2349ecde4c873a]
+
+Signed-off-by: Yogita Urade <yogita.urade@windriver.com>
+---
+ src/stkutil.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/stkutil.c b/src/stkutil.c
+index fdd11ad..475caaa 100644
+--- a/src/stkutil.c
++++ b/src/stkutil.c
+@@ -1898,6 +1898,10 @@ static bool parse_dataobj_mms_id(struct comprehension_tlv_iter *iter,
+
+       data = comprehension_tlv_iter_get_data(iter);
+       mi->len = len;
++
++      if (len > sizeof(mi->id))
++              return false;
++
+       memcpy(mi->id, data, len);
+
+       return true;
+--
+2.40.0
index 731b186b128d3cd905001fc44c51221735a90172..54710aa9fd65bf9f72e14eb73facf2616c838a8a 100644 (file)
@@ -20,6 +20,7 @@ SRC_URI = "\
     file://CVE-2023-2794-0004.patch \
     file://CVE-2024-7539.patch \
     file://CVE-2024-7543.patch \
+    file://CVE-2024-7544.patch \
 "
 SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7"