]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit39a4d0eb739cee54f8534c1ea488c05390677861
treef95682ce970b9ec74e4d8427411b6ff83421bdd1
parentf633a394059cdcb05ddefed4c17edc0c9a93f0e0
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