]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: add fragment cache to sta_info
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 18:02:47 +0000 (20:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 18:13:35 +0000 (20:13 +0200)
commit7013355aec9d3a1afa9a3ca670e55b4222249d3a
treeb30b9d16fc536c03f0c4251640be30b7d798d900
parent6d6a0e16c5d91d2d0a5f0941e9f797615eb7fcac
mac80211: add fragment cache to sta_info

Prior patches protected against fragmentation cache attacks
by coloring keys, but this shows that it can lead to issues
when multiple stations use the same sequence number. Add a
fragment cache to struct sta_info (in addition to the one in
the interface) to separate fragments for different stations
properly.

This then automatically clear most of the fragment cache when a
station disconnects (or reassociates) from an AP, or when client
interfaces disconnect from the network, etc.

On the way, also fix the comment there since this brings us in line
with the recommendation in 802.11-2016 ("An AP should support ...").
Additionally, remove a useless condition (since there's no problem
purging an already empty list).

Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210511200110.fc35046b0d52.I1ef101e3784d13e8f6600d83de7ec9a3a45bcd52@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/iface.c
net/mac80211/rx.c
net/mac80211/sta_info.c
net/mac80211/sta_info.h