mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
qcacld-3.0: Fix OOB access in sme_ese_send_beacon_req_scan_results
After receiving the scan results per channel, sme_ese_send_beacon_req_scan_results prepares beacon report response info for each BSS in cur_result list. While parsing cur_result list driver blindly checks bss_counter against SIR_BCN_REPORT_MAX_BSS_DESC(4) to reach max/last BSS in cur_result list this results out of bound error. Bound check for bss_counter should be against the number of bss found in scan results per channel to avoid OOB issue. Validate the value of bss_counter against the number of bss found in scan results. Change-Id: I70152c4f62c6fcff755f13f3851c9683bdc2231c CRs-Fixed: 2387198
This commit is contained in:
parent
ba22ef2abf
commit
1d6c0f7f7c
1 changed files with 1 additions and 2 deletions
|
|
@ -363,8 +363,7 @@ static QDF_STATUS sme_ese_send_beacon_req_scan_results(
|
|||
}
|
||||
|
||||
bss_counter += j;
|
||||
if (!result_arr || !cur_result
|
||||
|| (bss_counter >= SIR_BCN_REPORT_MAX_BSS_DESC)) {
|
||||
if (!result_arr || !cur_result || (bss_counter >= bss_count)) {
|
||||
cur_result = NULL;
|
||||
sme_err("Reached to the max/last BSS in cur_result list");
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue