[PATCH 4/4] Fix CVE-2024-7546
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 b6d4b537..c8497c4c 100644 --- a/src/stkutil.c +++ b/src/stkutil.c @@ -1769,6 +1769,10 @@ static bool parse_dataobj_frame_layout(struct comprehension_tlv_iter *iter, fl->layout = data[0]; fl->len = len - 1; + + if (fl->len > sizeof(fl->size)) + return false; + memcpy(fl->size, data + 1, fl->len); return true; -- 2.17.1