From 822abb5965d8293c8ece5ee1eb8ced016e8f66a8 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 --- ofono/drivers/atmodem/sms.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ofono/drivers/atmodem/sms.c b/ofono/drivers/atmodem/sms.c index 277d6517..e859a228 100644 --- a/ofono/drivers/atmodem/sms.c +++ b/ofono/drivers/atmodem/sms.c @@ -407,7 +407,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; @@ -473,7 +473,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; @@ -655,7 +655,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;