Skip to content

Commit 8c70b9b

Browse files
jmberg-intelgregkh
authored andcommitted
mac80211: refuse aggregations sessions before authorized
[ Upstream commit a6bce78 ] If an MFP station isn't authorized, the receiver will (or at least should) drop the action frame since it's a robust management frame, but if we're not authorized we haven't installed keys yet. Refuse attempts to start a session as they'd just time out. Signed-off-by: Johannes Berg <[email protected]> Link: https://lore.kernel.org/r/20220203201528.ff4d5679dce9.I34bb1f2bc341e161af2d6faf74f91b332ba11285@changeid Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d687d75 commit 8c70b9b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

net/mac80211/agg-tx.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright 2007, Michael Wu <[email protected]>
1010
* Copyright 2007-2010, Intel Corporation
1111
* Copyright(c) 2015-2017 Intel Deutschland GmbH
12-
* Copyright (C) 2018 - 2021 Intel Corporation
12+
* Copyright (C) 2018 - 2022 Intel Corporation
1313
*/
1414

1515
#include <linux/ieee80211.h>
@@ -626,6 +626,14 @@ int ieee80211_start_tx_ba_session(struct ieee80211_sta *pubsta, u16 tid,
626626
return -EINVAL;
627627
}
628628

629+
if (test_sta_flag(sta, WLAN_STA_MFP) &&
630+
!test_sta_flag(sta, WLAN_STA_AUTHORIZED)) {
631+
ht_dbg(sdata,
632+
"MFP STA not authorized - deny BA session request %pM tid %d\n",
633+
sta->sta.addr, tid);
634+
return -EINVAL;
635+
}
636+
629637
/*
630638
* 802.11n-2009 11.5.1.1: If the initiating STA is an HT STA, is a
631639
* member of an IBSS, and has no other existing Block Ack agreement

0 commit comments

Comments
 (0)