Re: [PATCH 1/2] staging: rtl8723bs: Fix key-store index handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2023-03-06 at 16:35 +0100, Hans de Goede wrote:
> 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.

Good job on both those patches.

Can you please also CC: the maintainer of r8188eu which looks like it
has similar code?

Cheers



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux