iwlwifi: mvm: check sta_id/drain values in debugfs
authorJohannes Berg <johannes.berg@intel.com>
Fri, 25 Oct 2013 11:06:06 +0000 (13:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 20 Dec 2013 15:49:00 +0000 (07:49 -0800)
commit1d87f36045d9b040bcad76cf35a49ea7300e6ce6
treeb5b2ec0c5c9d3dd5e9d463c8d36d24863148d439
parent049afbc51058ad48b99f72b4c1bc26431dbc60e3
iwlwifi: mvm: check sta_id/drain values in debugfs

commit 60765a47a433d54e4744c285ad127f182dcd80aa upstream.

The station ID must be valid, if it's out of range then
the array access may crash. Validate the station ID to
the array length, and also validate the drain value even
if that doesn't matter all that much.

Fixes: 8ca151b568b6 ("iwlwifi: add the MVM driver")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/iwlwifi/mvm/debugfs.c