linux/drivers/net
Martin Fuzzey 6707b3d438 rsi: fix AP mode with WPA failure due to encrypted EAPOL
commit 314538041b5632ffaf64798faaeabaf2793fe029 upstream.

In AP mode WPA2-PSK connections were not established.

The reason was that the AP was sending the first message
of the 4 way handshake encrypted, even though no pairwise
key had (correctly) yet been set.

Encryption was enabled if the "security_enable" driver flag
was set and encryption was not explicitly disabled by
IEEE80211_TX_INTFL_DONT_ENCRYPT.

However security_enable was set when *any* key, including
the AP GTK key, had been set which was causing unwanted
encryption even if no key was avaialble for the unicast
packet to be sent.

Fix this by adding a check that we have a key and drop
the old security_enable driver flag which is insufficient
and redundant.

The Redpine downstream out of tree driver does it this way too.

Regarding the Fixes tag the actual code being modified was
introduced earlier, with the original driver submission, in
dad0d04fa7 ("rsi: Add RS9113 wireless driver"), however
at that time AP mode was not yet supported so there was
no bug at that point.

So I have tagged the introduction of AP support instead
which was part of the patch set "rsi: support for AP mode" [1]

It is not clear whether AP WPA has ever worked, I can see nothing
on the kernel side that broke it afterwards yet the AP support
patch series says "Tests are performed to confirm aggregation,
connections in WEP and WPA/WPA2 security."

One possibility is that the initial tests were done with a modified
userspace (hostapd).

[1] https://www.spinics.net/lists/linux-wireless/msg165302.html

Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group>
Fixes: 38ef62353a ("rsi: security enhancements for AP mode")
CC: stable@vger.kernel.org
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1622564459-24430-1-git-send-email-martin.fuzzey@flowbird.group
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-14 16:53:07 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 11:59:36 +02:00
arcnet
bonding bonding: init notify_work earlier to avoid uninitialized use 2021-06-16 11:59:34 +02:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:47 -04:00
can can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path 2021-07-14 16:53:04 +02:00
dsa net: dsa: microchip: enable phy errata workaround on 9567 2021-06-16 11:59:36 +02:00
ethernet net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY 2021-06-30 08:47:50 -04:00
fddi FDDI: defxx: Make MMIO the configuration default except for EISA 2021-05-19 10:08:32 +02:00
fjes
hamradio net: hamradio: fix memory leak in mkiss_close 2021-06-23 14:41:26 +02:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2020-07-29 10:18:31 +02:00
hyperv hv_netvsc: Remove "unlikely" from netvsc_select_queue 2020-09-23 12:40:34 +02:00
ieee802154 drivers: net: fix memory leak in atusb_probe 2021-04-14 08:24:18 +02:00
ipvlan ipvlan: fix device features 2020-09-03 11:26:41 +02:00
netdevsim netdevsim: init u64 stats for 32bit hardware 2021-03-17 17:03:35 +01:00
phy net: phy: dp83867: perform soft reset and retain established link 2021-06-30 08:47:47 -04:00
plip
ppp pppoe: only process PADT targeted at local interfaces 2020-05-20 08:20:09 +02:00
slip
team team: protect features update by RCU to avoid deadlock 2021-02-03 23:26:02 +01:00
usb r8152: Avoid memcpy() over-reading of ETH_SS_STATS 2021-06-30 08:47:48 -04:00
vmxnet3 vmxnet3: use correct tcp hdr length when packet is encapsulated 2020-08-19 08:16:23 +02:00
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-14 09:44:26 +02:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-11 14:04:05 +02:00
wireless rsi: fix AP mode with WPA failure due to encrypted EAPOL 2021-07-14 16:53:07 +02:00
xen-netback xen-netback: Check for hotplug-status existence before watching 2021-04-28 13:19:15 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-14 09:44:31 +02:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-03-04 10:26:53 +01:00
ifb.c
loopback.c
macsec.c macsec: avoid use-after-free in macsec_handle_frame() 2020-10-14 10:33:00 +02:00
macvlan.c macvlan: validate setting of multiple remote source MAC addresses 2020-09-03 11:27:00 +02:00
macvtap.c
mdio.c
mii.c
net_failover.c net_failover: fixed rollback in net_failover_open() 2020-06-17 16:40:19 +02:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: fix dev_ifsioc_locked() race condition 2021-03-07 12:20:43 +01:00
thunderbolt.c
tun.c net: tun: set tun->dev->addr_len during TUNSETLINK processing 2021-04-14 08:24:18 +02:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-03-30 14:35:24 +02:00
virtio_net.c virtio_net: Do not pull payload in skb->head 2021-05-22 11:38:28 +02:00
vrf.c vrf: fix maximum MTU 2021-06-23 14:41:24 +02:00
vsockmon.c
vxlan.c vxlan: move debug check after netdev unregister 2021-03-04 10:26:38 +01:00
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2020-08-05 09:59:51 +02:00