]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:45:39 +0000 (15:45 -0700)
commite40d722784accc5d70404704a06b464e5b1a09c5
treef3143b7cf7c620bce67d0a43f9639c2d6dee9fa8
parent0fc790502490dc6b52796019ff142786724bd955
mac80211: check PN correctly for GCMP-encrypted fragmented MPDUs

Orabug: 23330996

[ Upstream commit 9acc54beb474c81148e2946603d141cf8716b19f ]

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>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 87e0016ccb1f9cbe377d4af19cb840acbbdff206)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
net/mac80211/ieee80211_i.h
net/mac80211/rx.c