mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-09-21 03:43:03 +00:00
qcacld-2.0: Add sanity check for vdev_id in wma_wow_wakeup_host_event
Currently wake_info->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: I66be7d15f370d0204e25c3d0ea60c0c9f5912005 CRs-Fixed: 2114363
This commit is contained in:
parent
c622b1724d
commit
93a1694f9a
|
@ -20202,6 +20202,11 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event,
|
|||
if ((wake_info->wake_reason != WOW_REASON_UNSPECIFIED) ||
|
||||
(wake_info->wake_reason == WOW_REASON_UNSPECIFIED &&
|
||||
!wmi_get_runtime_pm_inprogress(wma->wmi_handle))) {
|
||||
if (wake_info->vdev_id >= wma->max_bssid) {
|
||||
WMA_LOGE("%s: received invalid vdev_id %d",
|
||||
__func__, wake_info->vdev_id);
|
||||
return -EINVAL;
|
||||
}
|
||||
WMA_LOGA("WOW wakeup host event received (reason: %s(%d)) for vdev %d",
|
||||
wma_wow_wake_reason_str(wake_info->wake_reason, wma),
|
||||
wake_info->wake_reason,
|
||||
|
|
Loading…
Reference in a new issue