WSL2-Linux-Kernel/drivers/staging
Hans de Goede d15c9ae1c6 staging: rtl8723bs: Fix key-store index handling
[ Upstream commit 05cbcc415c ]

There are 2 issues with the key-store index handling

1. The non WEP key stores can store keys with indexes 0 - BIP_MAX_KEYID,
   this means that they should be an array with BIP_MAX_KEYID + 1
   entries. But some of the arrays where just BIP_MAX_KEYID entries
   big. While one other array was hardcoded to a size of 6 entries,
   instead of using the BIP_MAX_KEYID define.

2. The rtw_cfg80211_set_encryption() and wpa_set_encryption() functions
   index check where checking that the passed in key-index would fit
   inside both the WEP key store (which only has 4 entries) as well as
   in the non WEP key stores. This breaks any attempts to set non WEP
   keys with index 4 or 5.

Issue 2. specifically breaks wifi connection with some access points
which advertise PMF support. Without this fix connecting to these
access points fails with the following wpa_supplicant messages:

 nl80211: kernel reports: key addition failed
 wlan0: WPA: Failed to configure IGTK to the driver
 wlan0: RSN: Failed to configure IGTK
 wlan0: CTRL-EVENT-DISCONNECTED bssid=... reason=1 locally_generated=1

Fix 1. by using the right size for the key-stores. After this 2. can
safely be fixed by checking the right max-index value depending on the
used algorithm, fixing wifi not working with some PMF capable APs.

Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230306153512.162104-1-hdegoede@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-17 08:48:59 +01:00
..
android
axis-fifo
board
clocking-wizard
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:57:34 +01:00
fbtft staging: fbtft: fb_st7789v: reset display before initialization 2022-03-02 11:48:07 +01:00
fieldbus staging: fieldbus: Fix the error handling path in anybuss_host_common_probe() 2022-06-14 18:36:04 +02:00
fwserial
gdm724x staging: gdm724x: fix use after free in gdm_lte_rx() 2022-03-16 14:23:42 +01:00
greybus staging: greybus: audio_helper: remove unused and wrong debugfs usage 2022-10-26 12:34:34 +02:00
gs_fpgaboot
iio iio:imu:adis: Move exports into IIO_ADISLIB namespace 2022-12-31 13:14:29 +01:00
ks7010 staging: ks7010: select CRYPTO_HASH/CRYPTO_MICHAEL_MIC 2021-11-18 19:16:52 +01:00
media ipu3-imgu: Fix NULL pointer dereference in imgu_subdev_set_selection() 2023-01-12 11:58:57 +01:00
most staging: most: dim2: use device release method 2021-12-17 10:30:16 +01:00
mt7621-dma
mt7621-dts staging: mt7621-dts: change palmbus address to lower case 2023-03-03 11:45:53 +01:00
mt7621-pci PCI: mt7621: Add sentinel to quirks table 2022-12-31 13:14:26 +01:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
qlge
r8188eu staging: r8188eu: Add Rosewill USB-N150 Nano to device tables 2022-09-28 11:11:38 +02:00
ralink-gdma
rtl8192e staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh 2023-03-13 10:20:37 +01:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2022-12-31 13:14:30 +01:00
rtl8712 staging: rtl8712: fix use after free bugs 2022-09-08 12:28:03 +02:00
rtl8723bs staging: rtl8723bs: Fix key-store index handling 2023-03-17 08:48:59 +01:00
rts5208
sm750fb
unisys
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:22:45 +01:00
vme
vt6655 staging: vt6655: fix potential memory leak 2022-10-26 12:35:47 +02:00
vt6656
wfx staging: wfx: fix an error handling in wfx_init_common() 2022-04-13 20:59:11 +02:00
wlan-ng staging: wlan-ng: Avoid bitwise vs logical OR warning in hfa384x_usb_throttlefn() 2022-01-16 09:12:45 +01:00
Kconfig
Makefile