Skip to content

Commit

Permalink
mac80211: fix ie memory allocation for scheduled scans
Browse files Browse the repository at this point in the history
We were not allocating memory for the IEs passed in the scheduled_scan
request and this was causing memory corruption (buffer overflow).

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luciano Coelho authored and John W. Linville committed Jul 7, 2011
1 parent 6ae8ec2 commit 1186980
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,8 @@ int ieee80211_request_sched_scan_start(struct ieee80211_sub_if_data *sdata,
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
local->sched_scan_ies.ie[i] = kzalloc(2 +
IEEE80211_MAX_SSID_LEN +
local->scan_ies_len,
local->scan_ies_len +
req->ie_len,
GFP_KERNEL);
if (!local->sched_scan_ies.ie[i]) {
ret = -ENOMEM;
Expand Down

0 comments on commit 1186980

Please sign in to comment.