]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: treat some SAE auth steps as final
authorJohannes Berg <johannes.berg@intel.com>
Thu, 24 Feb 2022 09:39:34 +0000 (10:39 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 1 Mar 2022 10:33:13 +0000 (11:33 +0100)
commit5dd96fc16837e3f41f00d13694f928497aff00f7
treebd05a6c84eec9e991e4d005578a41a77937e803d
parent4d1e05e993320362361cfa3e877eeaa1e75cc799
mac80211: treat some SAE auth steps as final

When we get anti-clogging token required (added by the commit
mentioned below), or the other status codes added by the later
commit 2074365f8075 ("mac80211: Handle special status codes in
SAE commit") we currently just pretend (towards the internal
state machine of authentication) that we didn't receive anything.

This has the undesirable consequence of retransmitting the prior
frame, which is not expected, because the timer is still armed.

If we just disarm the timer at that point, it would result in
the undesirable side effect of being in this state indefinitely
if userspace crashes, or so.

So to fix this, reset the timer and set a new auth_data->waiting
in order to have no more retransmissions, but to have the data
destroyed when the timer actually fires, which will only happen
if userspace didn't continue (i.e. crashed or abandoned it.)

Fixes: 64cf874fb090 ("mac80211: Don't destroy auth data in case of anti-clogging")
Reported-by: Jouni Malinen <j@w1.fi>
Link: https://lore.kernel.org/r/20220224103932.75964e1d7932.Ia487f91556f29daae734bf61f8181404642e1eec@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/mlme.c