qcacld-3.0: Add sanity check for vdev id to prevent OOB access
Add sanity check for vdev id in wma_roam_event_callback() to prevent out of bound access of memory in wma_roam_better_ap_handler(). Change-Id: If3cf06a8eca767201fdd8b056bee6d773938a2a6 CRs-Fixed: 2119400
This commit is contained in:

committed by
snandini

parent
31c6047d1e
commit
847dd5d509
@@ -5544,6 +5544,11 @@ int wma_roam_event_callback(WMA_HANDLE handle, uint8_t *event_buf,
|
||||
__func__, wmi_event->reason, wmi_event->notif,
|
||||
wmi_event->vdev_id, wmi_event->rssi);
|
||||
|
||||
if (wmi_event->vdev_id >= wma_handle->max_bssid) {
|
||||
WMA_LOGE("Invalid vdev id from firmware");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
DPTRACE(qdf_dp_trace_record_event(QDF_DP_TRACE_EVENT_RECORD,
|
||||
wmi_event->vdev_id, QDF_TRACE_DEFAULT_PDEV_ID,
|
||||
QDF_PROTO_TYPE_EVENT, QDF_ROAM_EVENTID));
|
||||
|
Reference in New Issue
Block a user