[PATCH 1/4] stkutil: Fix CVE-2024-7544

Ivaylo Dimitrov <[email protected]>
Newsgroups dev.linux.lists.ofono
Message-ID <[email protected]>
---
 src/stkutil.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/stkutil.c b/src/stkutil.c
index 60cad102..066731c9 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1880,6 +1880,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.17.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.