]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: cfg80211: avoid nontransmitted BSS list corruption
authorJohannes Berg <johannes.berg@intel.com>
Fri, 30 Sep 2022 22:01:44 +0000 (00:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 15 Oct 2022 05:54:41 +0000 (07:54 +0200)
commitfdf3c410fca36b430fa6b21abde962009211ac2f
treed83b358301a3e5d2462ceb2feb3dda6d010ec7cc
parentd3c340988df3384cf1c8906d0f3a7f966d408794
wifi: cfg80211: avoid nontransmitted BSS list corruption

commit d89c7e97dff1d00c81c8cd8af8c5682793cc8b8c upstream.

If a non-transmitted BSS shares enough information (both
SSID and BSSID!) with another non-transmitted BSS of a
different AP, then we can find and update it, and then
try to add it to the non-transmitted BSS list. We do a
search for it on the transmitted BSS, but if it's not
there (but belongs to another transmitted BSS), the list
gets corrupted.

Since this is an erroneous situation, simply fail the
list insertion in this case and free the non-transmitted
BSS.

This fixes CVE-2022-42721.

Reported-by: Sönke Huster <shuster@seemoo.tu-darmstadt.de>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/scan.c