mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Add check for vdev_id in wma_rcpi_event_handler
Currently event->vdev_id, recevied from the FW, is directly used to refer to wma->interfaces without validating if the vdev_id is valid. Add sanity check to make sure vdev_id is less than max_bssid before using it. Change-Id: I9fd97e430532c597a6c4b4e42b5dfaddba628ffb CRs-Fixed: 2119442
This commit is contained in:
parent
eeddb38065
commit
4bb899c357
1 changed files with 6 additions and 0 deletions
|
|
@ -4486,6 +4486,12 @@ int wma_rcpi_event_handler(void *handle, uint8_t *cmd_param_info,
|
|||
if (status == QDF_STATUS_E_INVAL)
|
||||
return -EINVAL;
|
||||
|
||||
if (res.vdev_id >= wma_handle->max_bssid) {
|
||||
WMA_LOGE("%s: received invalid vdev_id %d",
|
||||
__func__, res.vdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
iface = &wma_handle->interfaces[res.vdev_id];
|
||||
if (!iface->rcpi_req) {
|
||||
WMI_LOGE("rcpi_req buffer not available");
|
||||
|
|
|
|||
Loading…
Reference in a new issue