Skip to content
Snippets Groups Projects
Commit 4aa4f272 authored by Abhinav Kumar's avatar Abhinav Kumar Committed by Siyuan Zhou
Browse files

qcacld-2.0: Fix potential buffer overwrite


In function wma_unified_link_iface_stats_event_handler, num_ac
is received from the firmware and is used in the loop to populate
values into results. However, the memory for results is allocated
only for WIFI_AC_MAX and a buffer overflow will occur if num_ac
is greater than or equal to WIFI_AC_MAX.

Add checks to make sure num_ac is not greater than to WIFI_AC_MAX.

Note: This CL has been updated to fix the check to only return error
on num_ac > WIFI_AC_MAX since an equal value is a valid value. This is
to fix b/73597588.

Bug: 70237689

Change-Id: Ie2056017aae641236efb118889e2919795b60f18
CRs-Fixed: 2154226
Signed-off-by: default avatarAhmed ElArabawy <arabawy@google.com>
parent 6da4cefa
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment