linux/drivers/staging/rtl8723bs
Luka Gejak a75281626f staging: rtl8723bs: fix potential out-of-bounds read in rtw_restruct_wmm_ie
The current code checks 'i + 5 < in_len' at the end of the if statement.
However, it accesses 'in_ie[i + 5]' before that check, which can lead
to an out-of-bounds read. Move the length check to the beginning of the
conditional to ensure the index is within bounds before accessing the
array.

Fixes: 554c0a3abf ("staging: Add rtl8723bs sdio wifi driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Luka Gejak <luka.gejak@linux.dev>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20260224132647.11642-2-luka.gejak@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-24 10:01:20 -08:00
..
core staging: rtl8723bs: fix potential out-of-bounds read in rtw_restruct_wmm_ie 2026-02-24 10:01:20 -08:00
hal Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
include staging: rtl8723bs: rename CamelCase function Set_MSR to set_msr 2026-02-07 14:45:39 +01:00
os_dep Convert 'alloc_flex' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig staging: rtl8723bs: select CRYPTO_LIB_UTILS instead of CRYPTO 2025-12-17 14:01:23 +01:00
Makefile staging: rtl8723bs: remove os_dep/recv_linux.c 2025-09-06 15:55:13 +02:00
TODO staging: rtl8723bs: remove stale TODO item regarding %pM 2026-02-07 14:44:24 +01:00