diff options
| author | Moksh Panicker <mokshpanicker.7@gmail.com> | 2026-06-25 20:29:11 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-07-17 14:23:13 +0200 |
| commit | 0e95ff792ae0aa6fbad9455943e9e1e4062670e9 (patch) | |
| tree | e776b14bfe5994da4c2ee3a67c703a399a542434 /tools/perf/scripts/python | |
| parent | 30d49cba27f8905bc288cef5846963f0004f644c (diff) | |
| download | linux-0e95ff792ae0aa6fbad9455943e9e1e4062670e9.tar.gz linux-0e95ff792ae0aa6fbad9455943e9e1e4062670e9.zip | |
staging: rtl8723bs: fix OOB reads in rtw_get_wps_ie()
rtw_get_wps_ie() iterates over IE data from network frames without
validating that the IE header and payload fit within the remaining
buffer before reading them. Specifically:
- in_ie[cnt + 1] is read without checking cnt + 1 < in_len
- memcmp(&in_ie[cnt + 2], ...) accesses cnt + 2 without bounds check
- in_ie[cnt + 1] is used as length without verifying payload fits
Add bounds checks at the top of the loop body to break early if fewer
than 2 bytes remain for the IE header, or if the declared payload
extends past the end of the buffer. Also require at least 4 bytes of
payload before comparing the WPS OUI.
Fixes: 554c0a3abf21 ("staging: Add rtl8723bs sdio wifi driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Moksh Panicker <mokshpanicker.7@gmail.com>
Link: https://patch.msgid.link/20260625202911.26782-1-mokshpanicker.7@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
