aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorMuhammad Bilal <meatuni001@gmail.com>2026-09-20 00:22:31 +0500
committerLachlan Hodges <lachlan.hodges@morsemicro.com>2026-10-07 14:17:03 +1100
commit54a54c06868d0c2beb9ec3e2ffda0f6cb33d5c8e (patch)
treeaf5f487dbc20a17e56557e50fb54b89ac87b4296 /scripts/Makefile.thinlto
parentwifi: mm81x: validate n_channels in disabled channels response (diff)
wifi: mm81x: check bytes_remaining before reading delimiter
mm81x_yaps_hw_read_pkts() reads a full 4-byte delimiter and then subtracts sizeof(delim) from bytes_remaining on every loop iteration, guarded only by "bytes_remaining > 0". If 1-3 bytes are left in the window, this reads past the end of the valid data and then subtracts 4 from a value smaller than 4, driving bytes_remaining negative. A negative bytes_remaining then reaches the total_len > bytes_remaining branch, where "bytes_remaining" is passed to memcpy() as the copy length. Implicitly converted to size_t, a negative int becomes a huge value, turning that memcpy() into a massive out-of-bounds copy. Bail out of the split loop once fewer than sizeof(delim) bytes remain, the same way the existing "end of stream" check bails on a zero delimiter. Fixes: b1906cea00b0 ("wifi: mm81x: add mm81x Wi-Fi HaLow driver") Signed-off-by: Muhammad Bilal <meatuni001@gmail.com> Link: https://patch.msgid.link/20260919192231.272078-1-meatuni001@gmail.com Signed-off-by: Lachlan Hodges <lachlan.hodges@morsemicro.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions