]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: cfg80211: fix buffer overflow in elem comparison
authorJohannes Berg <johannes.berg@intel.com>
Fri, 25 Nov 2022 11:36:57 +0000 (12:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:03 +0000 (11:23 +0100)
commit344af7a1ea0f94978197f636497308285ee7368f
treef6f0439123f45e6e2e8458a3d8a826fa7acba828
parent2d5dfbb0ca2b8d686e17ede5b65befbbd79c1f9c
wifi: cfg80211: fix buffer overflow in elem comparison

[ Upstream commit 82597139315f9c7c4e1a98d0405a9e23dcdf4beb ]

For vendor elements, the code here assumes that 5 octets
are present without checking. Since the element itself is
already checked to fit, we only need to check the length.

Reported-and-tested-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
Fixes: b397b5577905 ("cfg80211: Parsing of Multiple BSSID information in scanning")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/wireless/scan.c