[PATCH 2/4] stkutil: Fix CVE-2024-7543

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 066731c9..b6d4b537 100644
--- a/src/stkutil.c
+++ b/src/stkutil.c
@@ -1862,6 +1862,10 @@ static bool parse_dataobj_mms_reference(struct comprehension_tlv_iter *iter,
 
 	data = comprehension_tlv_iter_get_data(iter);
 	mr->len = len;
+
+	if (len > sizeof(mr->ref))
+		return false;
+
 	memcpy(mr->ref, 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.