iwlwifi: tighten RX MPDU bounds checks
authorJohannes Berg <johannes.berg@intel.com>
Wed, 9 Dec 2020 21:16:46 +0000 (23:16 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Wed, 9 Dec 2020 22:16:05 +0000 (00:16 +0200)
commitb8aba27cdc0ea6aaafacba3b899ff99d6d876fad
treef95682ce970b9ec74e4d8427411b6ff83421bdd1
parentac1a98e1e924e7e8d7c7e5b1ca8ddc522e10ddd0
iwlwifi: tighten RX MPDU bounds checks

Previously, we added checks that the contained MPDU size is long
enough, but really we should also check that the notification
itself fits into the data. Add some checks for that.

Also add unlikely() annotations on the previously added checks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20201209231352.51cc04cf1e3e.I7bfd6809f8f5feb75f79397646e6656e95688a0e@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/rx.c
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c