]> www.infradead.org Git - users/dwmw2/linux.git/commit
iwlwifi: mvm: fix an out-of-bound access
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Mon, 22 Jul 2019 09:47:27 +0000 (12:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Aug 2019 08:13:58 +0000 (10:13 +0200)
commit7e2de0b299c089915501a56a6eed5b1d94c12a4a
tree14392d4dc69cec513c18ba04a6b364bb14e239eb
parent5557083f8577fb2d36862b46a405d37ecd54ffff
iwlwifi: mvm: fix an out-of-bound access

commit ba3224db78034435e9ff0247277cce7c7bb1756c upstream.

The index for the elements of the ACPI object we dereference
was static. This means that if we called the function twice
we wouldn't start from 3 again, but rather from the latest
index we reached in the previous call.
This was dutifully reported by KASAN.

Fix this.

Cc: stable@vger.kernel.org
Fixes: 6996490501ed ("iwlwifi: mvm: add support for EWRD (Dynamic SAR) ACPI table")
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/intel/iwlwifi/mvm/fw.c