mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Add sanity check for vdev id to prevent OOB access
Add sanity check for vdev id in wma_vdev_start_resp_handler() to prevent
out of bound memory access.
Change-Id: Ia4e18e8e322142928c41dfa88b874ff017727266
CRs-Fixed: 2120424
This commit is contained in:
parent
968ba050a1
commit
dfca3d8173
1 changed files with 5 additions and 0 deletions
|
|
@ -960,6 +960,11 @@ int wma_vdev_start_resp_handler(void *handle, uint8_t *cmd_param_info,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (resp_event->vdev_id >= wma->max_bssid) {
|
||||
WMA_LOGE("Invalid vdev id received from firmware");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (resp_event->status == QDF_STATUS_SUCCESS) {
|
||||
wma->interfaces[resp_event->vdev_id].tx_streams =
|
||||
resp_event->cfgd_tx_streams;
|
||||
|
|
|
|||
Loading…
Reference in a new issue