summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2021-05-11 20:02:48 +0200
committerJohannes Berg <johannes.berg@intel.com>2021-05-11 20:13:45 +0200
commitbf30ca922a0c0176007e074b0acc77ed345e9990 (patch)
treea641f6bf65a98f802e6f0f8f8374b4d1ca89930d /net/mac80211/ieee80211_i.h
parentmac80211: add fragment cache to sta_info (diff)
downloadlinux-bf30ca922a0c0176007e074b0acc77ed345e9990.tar.xz
linux-bf30ca922a0c0176007e074b0acc77ed345e9990.zip
mac80211: check defrag PN against current frame
As pointed out by Mathy Vanhoef, we implement the RX PN check on fragmented frames incorrectly - we check against the last received PN prior to the new frame, rather than to the one in this frame itself. Prior patches addressed the security issue here, but in order to be able to reason better about the code, fix it to really compare against the current frame's PN, not the last stored one. Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20210511200110.bfbc340ff071.Id0b690e581da7d03d76df90bb0e3fd55930bc8a0@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 4c714375bad0..214404a558fb 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -223,8 +223,15 @@ struct ieee80211_rx_data {
*/
int security_idx;
- u32 tkip_iv32;
- u16 tkip_iv16;
+ union {
+ struct {
+ u32 iv32;
+ u16 iv16;
+ } tkip;
+ struct {
+ u8 pn[IEEE80211_CCMP_PN_LEN];
+ } ccm_gcm;
+ };
};
struct ieee80211_csa_settings {