mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
qcacmn: Discard QMI events when message with invalid length
Currently QMI message length is not being validated before handling QMI event. This is resulting in illegal memory access when QMI message length is invalid. To address this, discard QMI events with invalid length. Change-Id: Ia9f04bcb4fa3b365cbbf2be8885a8d30f78f8f10 CRs-Fixed: 2839277
This commit is contained in:
parent
d8a27f747e
commit
e2a792f9b7
1 changed files with 1 additions and 1 deletions
|
|
@ -2559,7 +2559,7 @@ static int __wmi_process_qmi_fw_event(void *wmi_cb_ctx, void *buf, int len)
|
|||
uint32_t evt_id;
|
||||
int wmi_msg_len;
|
||||
|
||||
if (!wmi_handle || !buf)
|
||||
if (!wmi_handle || !buf || (len < WMI_MIN_HEAD_ROOM))
|
||||
return -EINVAL;
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue