linux-stable/drivers/net
Martin Fuzzey 998de999ba rsi: fix AP mode with WPA failure due to encrypted EAPOL
commit 314538041b 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:55:46 +02:00
..
appletalk net: appletalk: cops: Fix data race in cops_probe1 2021-06-16 12:01:37 +02:00
arcnet
bonding bonding: init notify_work earlier to avoid uninitialized use 2021-06-16 12:01:36 +02:00
caif net: caif: fix memory leak in ldisc_open 2021-06-30 08:47:21 -04:00
can can: peak_pciefd: pucan_handle_status(): fix a potential starvation issue in TX path 2021-07-14 16:55:41 +02:00
dsa net: dsa: microchip: enable phy errata workaround on 9567 2021-06-16 12:01:37 +02:00
ethernet net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY 2021-06-30 08:47:24 -04:00
fddi FDDI: defxx: Make MMIO the configuration default except for EISA 2021-05-14 09:50:00 +02:00
fjes
hamradio net: hamradio: fix memory leak in mkiss_close 2021-06-23 14:42:46 +02:00
hippi
hyperv
ieee802154 drivers: net: fix memory leak in atusb_probe 2021-04-14 08:42:13 +02:00
ipa net: ipa: memory region array is variable size 2021-06-03 09:00:46 +02:00
ipvlan
mdio net: mdio: octeon: Fix some double free issues 2021-06-03 09:00:47 +02:00
netdevsim netdevsim: dev: Initialize FIB module after debugfs 2021-04-07 15:00:07 +02:00
pcs
phy net: phy: dp83867: perform soft reset and retain established link 2021-06-30 08:47:21 -04:00
plip
ppp tty: convert tty_ldisc_ops 'read()' function to take a kernel pointer 2021-03-04 11:37:36 +01:00
slip
team
usb r8152: Avoid memcpy() over-reading of ETH_SS_STATS 2021-06-30 08:47:22 -04:00
vmxnet3
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-14 09:50:29 +02:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-11 14:47:16 +02:00
wireguard wireguard: allowedips: free empty intermediate nodes when removing single node 2021-06-10 13:39:24 +02:00
wireless rsi: fix AP mode with WPA failure due to encrypted EAPOL 2021-07-14 16:55:46 +02:00
xen-netback xen-netback: take a reference to the RX task thread 2021-06-10 13:39:29 +02:00
bareudp.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:50:43 +02:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-03-04 11:38:46 +01:00
ifb.c
Kconfig crypto: mips/poly1305 - enable for all MIPS processors 2021-03-17 17:06:10 +01:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c
macvtap.c
Makefile
mdio.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c net: fix dev_ifsioc_locked() race condition 2021-03-07 12:34:07 +01:00
thunderbolt.c
tun.c net: tun: set tun->dev->addr_len during TUNSETLINK processing 2021-04-14 08:42:13 +02:00
veth.c veth: Store queue_mapping independently of XDP prog presence 2021-03-30 14:31:56 +02:00
virtio_net.c virtio_net: Do not pull payload in skb->head 2021-05-22 11:40:52 +02:00
vrf.c vrf: fix maximum MTU 2021-06-23 14:42:41 +02:00
vsockmon.c
vxlan.c vxlan: do not modify the shared tunnel info when PMTU triggers an ICMP reply 2021-04-14 08:42:06 +02:00
xen-netfront.c