From: "Sicelo A. Mhlongo" <absicsz@gmail.com>
To: ofono@lists.linux.dev
Cc: "Sicelo A. Mhlongo" <absicsz@gmail.com>
Subject: [PATCH v2 2/3] atmodem: sms: ensure buffer is initialized before use
Date: Tue, 17 Dec 2024 11:31:28 +0200 [thread overview]
Message-ID: <20241217093207.20636-2-absicsz@gmail.com> (raw)
In-Reply-To: <20241217093207.20636-1-absicsz@gmail.com>
Fixes: CVE-2024-7540
Fixes: CVE-2024-7541
Fixes: CVE-2024-7542
---
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
@@ -399,7 +399,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;
@@ -466,7 +466,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;
@@ -648,7 +648,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.45.2
next prev parent reply other threads:[~2024-12-17 9:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 9:31 [PATCH v2 1/3] util: ensure decode_hex_own_buf is passed a valid buffer Sicelo A. Mhlongo
2024-12-17 9:31 ` Sicelo A. Mhlongo [this message]
2024-12-17 9:31 ` [PATCH v2 3/3] ussd: ensure ussd content fits in buffers Sicelo A. Mhlongo
2024-12-17 17:20 ` [PATCH v2 1/3] util: ensure decode_hex_own_buf is passed a valid buffer patchwork-bot+ofono
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241217093207.20636-2-absicsz@gmail.com \
--to=absicsz@gmail.com \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.