mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
mac80211: fix ie memory allocation for scheduled scans
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>
This commit is contained in:
parent
6ae8ec2786
commit
1186980daf
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue