diff options
| author | Archana Polampalli <archana.polampalli@windriver.com> | 2025-07-11 17:03:13 +0530 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-07-18 08:32:26 -0700 |
| commit | b6acab6e64c74a92c0bbaf29647e0737575712cd (patch) | |
| tree | 41230c2f7da9d0a122e9079d6a015efaaa329f14 /meta | |
| parent | d668325fd8dbbdb180bf469d60693759ee477034 (diff) | |
| download | poky-b6acab6e64c74a92c0bbaf29647e0737575712cd.tar.gz | |
ofono: fix CVE-2023-4235
A flaw was found in ofono, an Open Source Telephony on Linux. A stack overflow bug
is triggered within the decode_deliver_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_deliver_report().
(From OE-Core rev: 3a3519324ec390044ff9f97c0f32027782699124)
Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch | 37 | ||||
| -rw-r--r-- | meta/recipes-connectivity/ofono/ofono_1.34.bb | 1 |
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch new file mode 100644 index 0000000000..ce03bbd274 --- /dev/null +++ b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From 02aa0f9bad3d9e47a152fc045d0f51874d901d7e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "Sicelo A. Mhlongo" <absicsz@gmail.com> | ||
| 3 | Date: Wed, 4 Dec 2024 10:18:51 +0200 | ||
| 4 | Subject: [PATCH] smsutil: check deliver reports fit in buffer | ||
| 5 | |||
| 6 | Fixes CVE-2023-4235 | ||
| 7 | |||
| 8 | CVE: CVE-2023-4235 | ||
| 9 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=02aa0f9bad3d9e47a152fc045d0f51874d901d7e] | ||
| 10 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
| 11 | --- | ||
| 12 | src/smsutil.c | 6 ++++++ | ||
| 13 | 1 file changed, 6 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/src/smsutil.c b/src/smsutil.c | ||
| 16 | index 484bfd0b..ac89f16c 100644 | ||
| 17 | --- a/src/smsutil.c | ||
| 18 | +++ b/src/smsutil.c | ||
| 19 | @@ -1240,10 +1240,16 @@ static gboolean decode_deliver_report(const unsigned char *pdu, int len, | ||
| 20 | return FALSE; | ||
| 21 | |||
| 22 | if (out->type == SMS_TYPE_DELIVER_REPORT_ERROR) { | ||
| 23 | + if (expected > (int) sizeof(out->deliver_err_report.ud)) | ||
| 24 | + return FALSE; | ||
| 25 | + | ||
| 26 | out->deliver_err_report.udl = udl; | ||
| 27 | memcpy(out->deliver_err_report.ud, | ||
| 28 | pdu + offset, expected); | ||
| 29 | } else { | ||
| 30 | + if (expected > (int) sizeof(out->deliver_ack_report.ud)) | ||
| 31 | + return FALSE; | ||
| 32 | + | ||
| 33 | out->deliver_ack_report.udl = udl; | ||
| 34 | memcpy(out->deliver_ack_report.ud, | ||
| 35 | pdu + offset, expected); | ||
| 36 | -- | ||
| 37 | 2.30.2 | ||
diff --git a/meta/recipes-connectivity/ofono/ofono_1.34.bb b/meta/recipes-connectivity/ofono/ofono_1.34.bb index 8a298bfade..a3edf4ab5d 100644 --- a/meta/recipes-connectivity/ofono/ofono_1.34.bb +++ b/meta/recipes-connectivity/ofono/ofono_1.34.bb | |||
| @@ -27,6 +27,7 @@ SRC_URI = "\ | |||
| 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 | file://CVE-2023-4232.patch \ |
| 30 | file://CVE-2023-4235.patch \ | ||
| 30 | " | 31 | " |
| 31 | SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7" | 32 | SRC_URI[sha256sum] = "c0b96d3013447ec2bcb74579bef90e4e59c68dbfa4b9c6fbce5d12401a43aac7" |
| 32 | 33 | ||
