]> git.ipfire.org Git - thirdparty/linux.git/commit
mac80211: Fix FC masking in BIP AAD generation
authorJouni Malinen <j@w1.fi>
Sun, 30 Sep 2012 16:47:40 +0000 (19:47 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 1 Oct 2012 07:23:15 +0000 (09:23 +0200)
commit33766368f6532313571534f9112b1796d6651bbe
tree016c716637d79a60c97f914fde8bb17b1f845282
parent7ce8c7a3433c6d6f4adfec0611d250782f0b4b0c
mac80211: Fix FC masking in BIP AAD generation

The bits used in the mask were off-by-one and ended up masking PwrMgt,
MoreData, Protected fields instead of Retry, PwrMgt, MoreData. Fix this
and to mask the correct fields. While doing so, convert the code to mask
the full FC using IEEE80211_FCTL_* defines similarly to how CCMP AAD is
built.

Since BIP is used only with broadcast/multicast management frames, the
Retry field is always 0 in these frames. The Protected field is also
zero to maintain backwards compatibility. As such, the incorrect mask
here does not really cause any problems for valid frames. In theory, an
invalid BIP frame with Retry or Protected field set to 1 could be
rejected because of BIP validation. However, no such frame should show
up with standard compliant implementations, so this does not cause
problems in normal BIP use.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/wpa.c