From patchwork Sun Jan 19 16:37:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Marko X-Patchwork-Id: 55782 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B0B5C02187 for ; Sun, 19 Jan 2025 16:38:36 +0000 (UTC) Received: from mta-65-228.siemens.flowmailer.net (mta-65-228.siemens.flowmailer.net [185.136.65.228]) by mx.groups.io with SMTP id smtpd.web10.18343.1737304703369760681 for ; Sun, 19 Jan 2025 08:38:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.marko@siemens.com header.s=fm1 header.b=HS+bBLmO; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.228, mailfrom: fm-256628-20250119163821e520f3a9861d3d9b95-d8upqh@rts-flowmailer.siemens.com) Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 20250119163821e520f3a9861d3d9b95 for ; Sun, 19 Jan 2025 17:38:21 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.marko@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc; bh=m5p3gTWQ/gMkOZbOE7dl+CeqS/gzThWz0D+8HtJhExw=; b=HS+bBLmO7e/Jb7SO0c83RRwYUFkU+DnLOhstZE0KJdyE/kb8A1mC+WdhfLVKxtdWlisYBP 4Dgu+0mmSTb9odVetpganlzkC3zWszg4iTQPie1ZQe5erzQGB6LvSoijT/YK7jiVz0Zo9Bnu BUG/HHYIHAJ6OZAhIN3ibTg+2eQD5DfXLKpSJkzd1U9bM7prBlDIAKsfYPW89VfEcO3TcKSl ey3QloiYRNn0/tnTQSE0x38q57sF/vQ24YgiXSXJab/MGSs1wYPtsobawvue4xnYBM2qsU40 rJ2BzhaqUiBpjHfEXAxXj0S1MqBwHyt4WRzhETJdQ5gMiCSPLaUUu3Iw==; From: Peter Marko To: openembedded-core@lists.openembedded.org Cc: Peter Marko Subject: [OE-core][scarthgap][PATCH 1/3] ofono: patch CVE-2024-7540, CVE-2024-7541, CVE-2024-7542 Date: Sun, 19 Jan 2025 17:37:30 +0100 Message-Id: <20250119163732.318935-1-peter.marko@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-256628:519-21489:flowmailer List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jan 2025 16:38:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210014 From: Peter Marko Cherry-pick commit https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=29ff6334b492504ace101be748b256e6953d2c2f Signed-off-by: Peter Marko --- ...024-7540_CVE-2024-7541_CVE-2024-7542.patch | 52 +++++++++++++++++++ meta/recipes-connectivity/ofono/ofono_2.4.bb | 1 + 2 files changed, 53 insertions(+) create mode 100644 meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch diff --git a/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch new file mode 100644 index 0000000000..0b06e057e5 --- /dev/null +++ b/meta/recipes-connectivity/ofono/ofono/CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch @@ -0,0 +1,52 @@ +From 29ff6334b492504ace101be748b256e6953d2c2f Mon Sep 17 00:00:00 2001 +From: "Sicelo A. Mhlongo" +Date: Tue, 17 Dec 2024 11:31:28 +0200 +Subject: [PATCH] atmodem: sms: ensure buffer is initialized before use + +Fixes: CVE-2024-7540 +Fixes: CVE-2024-7541 +Fixes: CVE-2024-7542 + +CVE: CVE-2024-7540 +CVE: CVE-2024-7541 +CVE: CVE-2024-7542 +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=29ff6334b492504ace101be748b256e6953d2c2f] +Signed-off-by: Peter Marko +--- + drivers/atmodem/sms.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c +index d994856b..0668c631 100644 +--- a/drivers/atmodem/sms.c ++++ b/drivers/atmodem/sms.c +@@ -412,7 +412,7 @@ static void at_cmt_notify(GAtResult *result, gpointer user_data) + struct sms_data *data = ofono_sms_get_data(sms); + GAtResultIter iter; + const char *hexpdu; +- unsigned char pdu[176]; ++ unsigned char pdu[176] = {0}; + long pdu_len; + int tpdu_len; + +@@ -479,7 +479,7 @@ static void at_cmgr_notify(GAtResult *result, gpointer user_data) + struct sms_data *data = ofono_sms_get_data(sms); + GAtResultIter iter; + const char *hexpdu; +- unsigned char pdu[176]; ++ unsigned char pdu[176] = {0}; + long pdu_len; + int tpdu_len; + +@@ -661,7 +661,7 @@ static void at_cmgl_notify(GAtResult *result, gpointer user_data) + struct sms_data *data = ofono_sms_get_data(sms); + GAtResultIter iter; + const char *hexpdu; +- unsigned char pdu[176]; ++ unsigned char pdu[176] = {0}; + long pdu_len; + int tpdu_len; + int index; +-- +2.30.2 + diff --git a/meta/recipes-connectivity/ofono/ofono_2.4.bb b/meta/recipes-connectivity/ofono/ofono_2.4.bb index 852c71948e..097a0e0566 100644 --- a/meta/recipes-connectivity/ofono/ofono_2.4.bb +++ b/meta/recipes-connectivity/ofono/ofono_2.4.bb @@ -22,6 +22,7 @@ SRC_URI = "\ file://CVE-2024-7545.patch \ file://CVE-2024-7546.patch \ file://CVE-2024-7547.patch \ + file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \ " SRC_URI[sha256sum] = "93580adc1afd1890dc516efb069de0c5cdfef014415256ddfb28ab172df2d11d" From patchwork Sun Jan 19 16:37:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Marko X-Patchwork-Id: 55783 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C298C02188 for ; Sun, 19 Jan 2025 16:38:36 +0000 (UTC) Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net [185.136.65.226]) by mx.groups.io with SMTP id smtpd.web11.18182.1737304708899787374 for ; Sun, 19 Jan 2025 08:38:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.marko@siemens.com header.s=fm1 header.b=jQUTjFMx; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.65.226, mailfrom: fm-256628-2025011916382667c84db81f8fb56988-c1u5og@rts-flowmailer.siemens.com) Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 2025011916382667c84db81f8fb56988 for ; Sun, 19 Jan 2025 17:38:26 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.marko@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=0aa5nWbhIdTIZ7vFlUL8WCk2PS0vEohElAnjtnG+1lw=; b=jQUTjFMx5824IcAaXtgEgQroUtWuWlodO5I2O1X8xpeJPoOQJ1wWHaGVtEPwVTeW/bWmRk XOGsnLdtlEwZTlHIVqurjw07VwO7OoneFf9UGrfYLoXkO+MyvxvjkSvy1uKzDEQpwfiSURhZ m+rjL4Biub7pPjuWCBSOzaOy2bcvNfbByOA3t5Rmpbgr8fwWlPtKgnemiaCttJfZmEpqclWd xaysMGsiueAS90lXHufTHGF4Bod/M1X88f1pnMuX5+SQMnDB3c2AezYcV0usToTv+611hham g/MvldOlcQsx5HuYW1IxRAnnR2NO81imk1WppIa2GB8PWwUtTumBtuuQ==; From: Peter Marko To: openembedded-core@lists.openembedded.org Cc: Peter Marko Subject: [OE-core][scarthgap][PATCH 2/3] ofono: patch CVE-2023-4232 Date: Sun, 19 Jan 2025 17:37:31 +0100 Message-Id: <20250119163732.318935-2-peter.marko@siemens.com> In-Reply-To: <20250119163732.318935-1-peter.marko@siemens.com> References: <20250119163732.318935-1-peter.marko@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-256628:519-21489:flowmailer List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jan 2025 16:38:36 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210015 From: Peter Marko Cherry-pick commit https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=2ff2da7ac374a790f8b2a0216bcb4e3126498225 Signed-off-by: Peter Marko --- .../ofono/ofono/CVE-2023-4232.patch | 31 +++++++++++++++++++ meta/recipes-connectivity/ofono/ofono_2.4.bb | 1 + 2 files changed, 32 insertions(+) create mode 100644 meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch 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..516cbf779c --- /dev/null +++ b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4232.patch @@ -0,0 +1,31 @@ +From 2ff2da7ac374a790f8b2a0216bcb4e3126498225 Mon Sep 17 00:00:00 2001 +From: "Sicelo A. Mhlongo" +Date: Wed, 4 Dec 2024 10:18:52 +0200 +Subject: [PATCH] smsutil: check status report fits in buffer + +Fixes CVE-2023-4232 + +CVE: CVE-2023-4232 +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=2ff2da7ac374a790f8b2a0216bcb4e3126498225] +Signed-off-by: Peter Marko +--- + src/smsutil.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/smsutil.c b/src/smsutil.c +index ac89f16c..a706e26f 100644 +--- a/src/smsutil.c ++++ b/src/smsutil.c +@@ -1088,6 +1088,9 @@ static gboolean decode_status_report(const unsigned char *pdu, int len, + if ((len - offset) < expected) + return FALSE; + ++ if (expected > (int)sizeof(out->status_report.ud)) ++ return FALSE; ++ + memcpy(out->status_report.ud, pdu + offset, expected); + } + +-- +2.30.2 + diff --git a/meta/recipes-connectivity/ofono/ofono_2.4.bb b/meta/recipes-connectivity/ofono/ofono_2.4.bb index 097a0e0566..a6a4852a63 100644 --- a/meta/recipes-connectivity/ofono/ofono_2.4.bb +++ b/meta/recipes-connectivity/ofono/ofono_2.4.bb @@ -23,6 +23,7 @@ SRC_URI = "\ file://CVE-2024-7546.patch \ file://CVE-2024-7547.patch \ file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \ + file://CVE-2023-4232.patch \ " SRC_URI[sha256sum] = "93580adc1afd1890dc516efb069de0c5cdfef014415256ddfb28ab172df2d11d" From patchwork Sun Jan 19 16:37:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Marko X-Patchwork-Id: 55784 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D6A1C02187 for ; Sun, 19 Jan 2025 16:38:46 +0000 (UTC) Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net [185.136.64.228]) by mx.groups.io with SMTP id smtpd.web10.18347.1737304716466875861 for ; Sun, 19 Jan 2025 08:38:36 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=peter.marko@siemens.com header.s=fm1 header.b=VLt9BD3S; spf=pass (domain: rts-flowmailer.siemens.com, ip: 185.136.64.228, mailfrom: fm-256628-2025011916383463f450eb3b0eb66949-xbgrj_@rts-flowmailer.siemens.com) Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 2025011916383463f450eb3b0eb66949 for ; Sun, 19 Jan 2025 17:38:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=fm1; d=siemens.com; i=peter.marko@siemens.com; h=Date:From:Subject:To:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Cc:References:In-Reply-To; bh=wlT5VUnqNxwueznD7S/d/nF6RXaoH/XECIonwu0LRQ4=; b=VLt9BD3SIMf84udPk9/t2c4WOUl1GEdViRrek/N0WYvrmS3SA1qtjfM+D+BE/P5oakvSyG wkr2xiqSfBOEKQ5ieGNIKNQ10SjFUpqpM55yA+bwjcx83n51mzAvFt75qsPmOURZIYxJCCRy c/YWsFdgpj+OjrTfeJCKA3aA+ZDHdfynXDSmlvDPWoqwP7uCib6f3uh7HLLl2weD0mMhnbuy SypBF80HBz/6sVYcrBBqKr0x920JcNsg3Sf2kTZkcCucgOPw7YILSN8o9Y+1oy3E85AUOo+a cu3LjNcseu41y4P8+tiiM8iOPdXu2z9+VrtWAIzESgYEGnX1vfkb1PSg==; From: Peter Marko To: openembedded-core@lists.openembedded.org Cc: Peter Marko Subject: [OE-core][scarthgap][PATCH 3/3] ofono: patch CVE-2023-4235 Date: Sun, 19 Jan 2025 17:37:32 +0100 Message-Id: <20250119163732.318935-3-peter.marko@siemens.com> In-Reply-To: <20250119163732.318935-1-peter.marko@siemens.com> References: <20250119163732.318935-1-peter.marko@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-256628:519-21489:flowmailer List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Sun, 19 Jan 2025 16:38:46 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/210016 From: Peter Marko Cherry-pick commit https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=02aa0f9bad3d9e47a152fc045d0f51874d901d7e Signed-off-by: Peter Marko --- .../ofono/ofono/CVE-2023-4235.patch | 38 +++++++++++++++++++ meta/recipes-connectivity/ofono/ofono_2.4.bb | 1 + 2 files changed, 39 insertions(+) create mode 100644 meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch 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..059f9bbfee --- /dev/null +++ b/meta/recipes-connectivity/ofono/ofono/CVE-2023-4235.patch @@ -0,0 +1,38 @@ +From 02aa0f9bad3d9e47a152fc045d0f51874d901d7e Mon Sep 17 00:00:00 2001 +From: "Sicelo A. Mhlongo" +Date: Wed, 4 Dec 2024 10:18:51 +0200 +Subject: [PATCH] smsutil: check deliver reports fit in buffer + +Fixes CVE-2023-4235 + +CVE: CVE-2023-4235 +Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/ofono/ofono.git/commit/?id=02aa0f9bad3d9e47a152fc045d0f51874d901d7e] +Signed-off-by: Peter Marko +--- + src/smsutil.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/smsutil.c b/src/smsutil.c +index 484bfd0b..ac89f16c 100644 +--- a/src/smsutil.c ++++ b/src/smsutil.c +@@ -1240,10 +1240,16 @@ static gboolean decode_deliver_report(const unsigned char *pdu, int len, + return FALSE; + + if (out->type == SMS_TYPE_DELIVER_REPORT_ERROR) { ++ if (expected > (int) sizeof(out->deliver_err_report.ud)) ++ return FALSE; ++ + out->deliver_err_report.udl = udl; + memcpy(out->deliver_err_report.ud, + pdu + offset, expected); + } else { ++ if (expected > (int) sizeof(out->deliver_ack_report.ud)) ++ return FALSE; ++ + out->deliver_ack_report.udl = udl; + memcpy(out->deliver_ack_report.ud, + pdu + offset, expected); +-- +2.30.2 + diff --git a/meta/recipes-connectivity/ofono/ofono_2.4.bb b/meta/recipes-connectivity/ofono/ofono_2.4.bb index a6a4852a63..5ae63e6ef6 100644 --- a/meta/recipes-connectivity/ofono/ofono_2.4.bb +++ b/meta/recipes-connectivity/ofono/ofono_2.4.bb @@ -24,6 +24,7 @@ SRC_URI = "\ file://CVE-2024-7547.patch \ file://CVE-2024-7540_CVE-2024-7541_CVE-2024-7542.patch \ file://CVE-2023-4232.patch \ + file://CVE-2023-4235.patch \ " SRC_URI[sha256sum] = "93580adc1afd1890dc516efb069de0c5cdfef014415256ddfb28ab172df2d11d"