mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
qcacld 2.0: Address buffer overflow due to invalid length
prima to qcacld-2.0 propagation Check for valid length before copying the packet filter data from userspace buffer to kernel space buffer to avoid buffer overflow issue. Bug: 26754117 Change-Id: I8d25a9d1b6909b6dda7a1d2aa80407ef2da821aa Signed-off-by: Yuan Lin <yualin@google.com>
This commit is contained in:
parent
34953f9f66
commit
243408ceb8
1 changed files with 3 additions and 0 deletions
|
@ -5562,6 +5562,9 @@ int wlan_hdd_set_filter(hdd_context_t *pHddCtx, tpPacketFilterCfg pRequest,
|
|||
|
||||
hddLog(VOS_TRACE_LEVEL_INFO, "Data Offset %d Data Len %d\n",
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue