public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Bastien Nocera <hadess@hadess.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Larry Finger <Larry.Finger@lwfinger.net>,
	Phillip Potter <phil@philpotter.co.uk>,
	Pavel Skripkin <paskripkin@gmail.com>
Cc: linux-staging@lists.linux.dev, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: rtl8723bs: Fix key-store index handling
Date: Tue, 7 Mar 2023 11:26:17 +0100	[thread overview]
Message-ID: <3a17dd23-c396-7cfb-3cfa-19cdec39f2ff@redhat.com> (raw)
In-Reply-To: <f23d6700b79500e2da9875964aee356c60a60529.camel@hadess.net>

Hi,

On 3/6/23 16:40, Bastien Nocera wrote:
> 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?

Done (added to the To: of this reply).

Note I have heard that the r8188eu is now (starting with 6.2 ?) supported
by one of the non staging realtek wifi drivers. So I think that maybe it
can just be removed from staging altogether ?

Regards,

Hans





  reply	other threads:[~2023-03-07 10:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 15:35 [PATCH 1/2] staging: rtl8723bs: Fix key-store index handling Hans de Goede
2023-03-06 15:35 ` [PATCH 2/2] staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss() Hans de Goede
2023-03-06 15:40 ` [PATCH 1/2] staging: rtl8723bs: Fix key-store index handling Bastien Nocera
2023-03-07 10:26   ` Hans de Goede [this message]
2023-03-07 20:40     ` the future of r8188eu (was: Re: [PATCH 1/2] staging: rtl8723bs: Fix key-store index handling) Martin Kaiser
2023-03-08  6:32       ` Greg Kroah-Hartman
2023-03-08 14:51         ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a17dd23-c396-7cfb-3cfa-19cdec39f2ff@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hadess@hadess.net \
    --cc=linux-staging@lists.linux.dev \
    --cc=paskripkin@gmail.com \
    --cc=phil@philpotter.co.uk \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox