Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9042a9a3 authored by Szymon Heidrich's avatar Szymon Heidrich Committed by Greg Kroah-Hartman
Browse files

wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid



[ Upstream commit b870e73a56c4cccbec33224233eaf295839f228c ]

Since resplen and respoffs are signed integers sufficiently
large values of unsigned int len and offset members of RNDIS
response will result in negative values of prior variables.
This may be utilized to bypass implemented security checks
to either extract memory contents by manipulating offset or
overflow the data buffer via memcpy by manipulating both
offset and len.

Additionally assure that sum of resplen and respoffs does not
overflow so buffer boundaries are kept.

Fixes: 80f8c5b4 ("rndis_wlan: copy only useful data from rndis_command respond")
Signed-off-by: default avatarSzymon Heidrich <szymon.heidrich@gmail.com>
Reviewed-by: default avatarAlexander Duyck <alexanderduyck@fb.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230111175031.7049-1-szymon.heidrich@gmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent de0e084f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment