]> Pileus Git - ~andy/linux/commit
mac80211: fix invalid band deref building preq IEs
authorArik Nemtsov <arik@wizery.com>
Mon, 9 Jul 2012 16:57:28 +0000 (19:57 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 12 Jul 2012 10:10:42 +0000 (12:10 +0200)
commitd811b3d5566f1441b321a1219c260124b209e0bd
tree86cd54ea8eaeb899d56496bd1f4d6b04a8ff38bb
parentfd0142844efa85d89017c89227a0f03de1eee327
mac80211: fix invalid band deref building preq IEs

The function building probe-request IEs does not validate the band is
supported before dereferencing it. This can result in a panic when
all bands are traversed, as done during sched-scan start.

Warn when this happens and return an empty probe request. Also fix
sched-scan to not waste memory on unsupported bands.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/scan.c
net/mac80211/util.c