Skip to content

Commit

Permalink
wlan: Address buffer overflow due to invalid length
Browse files Browse the repository at this point in the history
Check for valid length before copying the packet filter data from
userspace buffer to kernel space buffer to avoid buffer overflow
issue.

Change-Id: I9548727543b903b5eaafa25c6184615d511ca99d
CRs-Fixed: 930533
  • Loading branch information
Mahesh A Saptasagar authored and Satyanarayana Dash committed Oct 28, 2015
1 parent fdd2b9c commit 4b91219
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CORE/HDD/src/wlan_hdd_wext.c
Expand Up @@ -8509,6 +8509,9 @@ int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest,

hddLog(VOS_TRACE_LEVEL_INFO, "Data Offset %d Data Len %d",
pRequest->paramsData[i].dataOffset, pRequest->paramsData[i].dataLength);
if ((sizeof(packetFilterSetReq.paramsData[i].compareData)) <
(pRequest->paramsData[i].dataLength))
return -EINVAL;

memcpy(&packetFilterSetReq.paramsData[i].compareData,
pRequest->paramsData[i].compareData, pRequest->paramsData[i].dataLength);
Expand Down

0 comments on commit 4b91219

Please sign in to comment.