]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: check defrag PN against current frame
authorJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 18:02:48 +0000 (20:02 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 11 May 2021 18:13:45 +0000 (20:13 +0200)
commit037f82978b85c55630d8557ce179289c41c38956
treea641f6bf65a98f802e6f0f8f8374b4d1ca89930d
parent7013355aec9d3a1afa9a3ca670e55b4222249d3a
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>
net/mac80211/ieee80211_i.h
net/mac80211/rx.c
net/mac80211/wpa.c