linux/drivers/staging/rtl8723bs
Luka Gejak 4dd2d9cf56 staging: rtl8723bs: fix potential out-of-bounds read in rtw_restruct_wmm_ie
commit a75281626f upstream.

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>
History 2026-03-19 16:08:36 +01:00
..
core staging: rtl8723bs: fix potential out-of-bounds read in rtw_restruct_wmm_ie 2026-03-19 16:08:36 +01:00
hal staging: rtl8723bs: xmit: rephrase comment and drop extra space 2025-09-17 12:15:33 +02:00
include staging: rtl8723bs: rtw_efuse.h: simplify copyright banner 2025-09-12 15:53:16 +02:00
os_dep staging: rtl8723bs: fix memory leak on failure path 2026-03-04 07:20:35 -05:00
Kconfig staging: rtl8723bs: select CONFIG_CRYPTO_LIB_AES 2025-03-20 07:10:20 -07:00
Makefile staging: rtl8723bs: remove os_dep/recv_linux.c 2025-09-06 15:55:13 +02:00
TODO staging: rtl8723bs: Remove TODO contact information 2024-11-10 08:03:30 +01:00