• Johannes Berg's avatar
    mac80211: add fragment cache to sta_info · 3a11ce08
    Johannes Berg authored
    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@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    3a11ce08
iface.c 55.5 KB