summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2020-11-10 11:19:38 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2020-11-10 11:19:38 +0000
commit7bfc8b3ad9631d5bdb8ab02a4d67760102cb400a (patch)
treeac82e0e94c080ed01456df78125f7cdca4391714 /sys/dev/usb
parent319784f4f7b6ffefe42744af4d4e46e7165b8149 (diff)
Fix urtwn(4) against access points which use WPA1/TKIP as the group cipher.
Problem first reported against dhclient(8) by Artem Mazurov on bugs@ Bug was traced down into urtwn(4) by krw@ with a TP-Link TP-WA850RE AP. Regardless, please configure your access points to use WPA2/AES only! WPA1/TKIP is insecure and should die. ok krw@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_urtwn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index 3a499073d60..3ffaead61d1 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.93 2020/07/31 10:49:33 mglocker Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.94 2020/11/10 11:19:37 stsp Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1254,7 +1254,10 @@ urtwn_rx_frame(struct urtwn_softc *sc, uint8_t *buf, int pktlen,
if (((wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK) != IEEE80211_FC0_TYPE_CTL)
&& (wh->i_fc[1] & IEEE80211_FC1_PROTECTED) &&
(ni->ni_flags & IEEE80211_NODE_RXPROT) &&
- ni->ni_pairwise_key.k_cipher == IEEE80211_CIPHER_CCMP) {
+ ((!IEEE80211_IS_MULTICAST(wh->i_addr1) &&
+ ni->ni_pairwise_key.k_cipher == IEEE80211_CIPHER_CCMP) ||
+ (IEEE80211_IS_MULTICAST(wh->i_addr1) &&
+ ni->ni_rsngroupcipher == IEEE80211_CIPHER_CCMP))) {
if (urtwn_ccmp_decap(sc, m, ni) != 0) {
ifp->if_ierrors++;
m_freem(m);