iwlwifi: mvm: fix possible out-of-bounds read when accessing lq_info
authorGregory Greenman <gregory.greenman@intel.com>
Mon, 8 Jul 2019 06:07:42 +0000 (09:07 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Tue, 30 Jul 2019 16:34:27 +0000 (18:34 +0200)
commit514ea05b0743435bf181c41f48d83aac050cc6fa
tree8fb7d62f22e5e481de8c41214d8bc4781268cdbe
parentecd09ddc1d14cca4f874151aed51a7feee3f765b
iwlwifi: mvm: fix possible out-of-bounds read when accessing lq_info

lq_info is an arary of size 2, active_tbl index is u8.
When accessing lq_info[1 - active_tbl], theoretically it's possible
that the access will be made to a negative index value.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/rs.c