]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: out-of-bounds access in iwl_init_sband_channels
authorAdrien Schildknecht <adrien+dev@schischi.me>
Fri, 14 Aug 2015 00:35:32 +0000 (02:35 +0200)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Tue, 18 Aug 2015 07:25:25 +0000 (10:25 +0300)
commite767020d1dabcfd3ae4ed1583d3ca3dda4e606b8
treec2623a350ec624ccade516a509e66a5937df1c2b
parenta55ab6615c913b40e6a814d9b98fed3a87fc24d0
iwlwifi: out-of-bounds access in iwl_init_sband_channels

KASan error report:
==================================================================
BUG: KASan: out of bounds access in iwl_init_sband_channels+0x207/0x260 [iwlwifi] at addr ffff8800c2d0aac8
Read of size 4 by task modprobe/329
==================================================================

Both loops of this function compare data from the 'chan' array and then
check if the index is valid.

The 2 conditions should be inverted to avoid an out-of-bounds access.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/iwl-eeprom-parse.c