]> git.baikalelectronics.ru Git - kernel.git/commit
mt76: validate rx CCMP PN
authorFelix Fietkau <nbd@nbd.name>
Thu, 25 Jan 2018 10:44:24 +0000 (11:44 +0100)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 26 Jan 2018 09:20:52 +0000 (11:20 +0200)
commit10d5773afd4861495e406b85a4e99e782675981a
tree06b61298712b3cc88b4fbcbaff9d72fc04576655
parentd7513da7c6979d4e6c2e338eea31f8d9fd3b5718
mt76: validate rx CCMP PN

Apparently hardware does not perform CCMP PN validation in hardware, so
we need to take care of this in the driver. This is important for
protecting against replay attacks.

Since validation of fragmented frames is more complex, the CCMP header
for those is preserved. To keep the counter in sync, the first fragment
is verified by both mt76 and mac80211, and all other fragments only by
mac80211.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt76.h
drivers/net/wireless/mediatek/mt76/mt76x2_init.c
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
drivers/net/wireless/mediatek/mt76/mt76x2_main.c