]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs
authorJohannes Berg <johannes.berg@intel.com>
Fri, 26 Feb 2016 21:13:40 +0000 (22:13 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 1 Mar 2016 14:42:01 +0000 (15:42 +0100)
commit5601e419716c4567420ae13a0c360435fc8a38fc
treeddca7cb7698c0d06c8b9df5a589014e40359d3d6
parent249cb1fbc64f722a0334889e848701e68dfd23bc
mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs

Just like for CCMP we need to check that for GCMP the fragments
have PNs that increment by one; the spec was updated to fix this
security issue and now has the following text:

The receiver shall discard MSDUs and MMPDUs whose constituent
MPDU PN values are not incrementing in steps of 1.

Adapt the code for CCMP to work for GCMP as well, luckily the
relevant fields already alias each other so no code duplication
is needed (just check the aliasing with BUILD_BUG_ON.)

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/ieee80211_i.h
net/mac80211/rx.c