]> git.baikalelectronics.ru Git - kernel.git/commit
cfg80211: check vendor IE length to avoid overrun
authorLuciano Coelho <coelho@ti.com>
Tue, 12 Feb 2013 18:11:38 +0000 (20:11 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Feb 2013 09:14:17 +0000 (10:14 +0100)
commitff3fe697533448cad8b28a7da4b642e60f1b5e07
tree5318edf7523b03cb3c34f2824985dc246231a053
parent36bc5aee0b31a80dd62e20cd6a35abf6ff5b2a48
cfg80211: check vendor IE length to avoid overrun

cfg80211_find_vendor_ie() was checking only that the vendor IE would
fit in the remaining IEs buffer.  If a corrupt includes a vendor IE
that is too small, we could potentially overrun the IEs buffer.

Fix this by checking that the vendor IE fits in the reported IE length
field and skip it otherwise.

Reported-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Luciano Coelho <coelho@ti.com>
[change BUILD_BUG_ON to != 1 (from >= 2)]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/scan.c