mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
qcacmn: Validate the buffer length in rx mgmt handler
In the WMI_MGMT_RX_EVENTID event handling, add a length check to validate if the buffer length sent by the firmware is less than or equal to the actual buffer length. Change-Id: I7db9af48bc525543b972dcaf40aee0a05d8f5023 CRs-Fixed: 3001331
This commit is contained in:
parent
985b6ed0f0
commit
3fd0eae263
1 changed files with 5 additions and 0 deletions
|
|
@ -10249,6 +10249,11 @@ static QDF_STATUS extract_mgmt_rx_params_tlv(wmi_unified_t wmi_handle,
|
|||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (ev_hdr->buf_len > param_tlvs->num_bufp) {
|
||||
wmi_err("Rx mgmt frame length mismatch, discard it");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
hdr->pdev_id = wmi_handle->ops->convert_pdev_id_target_to_host(
|
||||
wmi_handle,
|
||||
ev_hdr->pdev_id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue