mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
qcacld-3.0: Add num_debug_register check to avoid OOB access
Add num_debug_register check in wma_unified_power_debug_stats_event_handler() to avoid OOB access. Change-Id: Iae206bc467a940a8fbc1128bff498af958df1c04 CRs-Fixed: 2160403
This commit is contained in:
parent
55e1621dd2
commit
822187985e
1 changed files with 2 additions and 1 deletions
|
|
@ -5081,7 +5081,8 @@ int wma_unified_power_debug_stats_event_handler(void *handle,
|
|||
|
||||
if (param_buf->num_debug_register > ((WMI_SVC_MSG_MAX_SIZE -
|
||||
sizeof(wmi_pdev_chip_power_stats_event_fixed_param)) /
|
||||
sizeof(uint32_t))) {
|
||||
sizeof(uint32_t)) ||
|
||||
param_buf->num_debug_register > param_tlvs->num_debug_registers) {
|
||||
WMA_LOGE("excess payload: LEN num_debug_register:%u",
|
||||
param_buf->num_debug_register);
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue