qcacmn: Add a check to avoid processing invalid pktlog buffers
Avoid further processing of pktlog buffers received from firmware or Hardware if the size is greater than MAX_PKTLOG_RECV_BUF_SIZE. Change-Id: If1dd855137a9b83721f01005fa3367f7924f4ebb CRs-Fixed: 2493721
This commit is contained in:

committed by
nshrivas

orang tua
851c69d5bb
melakukan
c0980fd21e
@@ -685,6 +685,11 @@ process_offload_pktlog(struct cdp_pdev *pdev, void *data)
|
||||
pl_hdr.type_specific_data = *(pl_tgt_hdr
|
||||
+ ATH_PKTLOG_HDR_TYPE_SPECIFIC_DATA_OFFSET);
|
||||
|
||||
if (pl_hdr.size > MAX_PKTLOG_RECV_BUF_SIZE) {
|
||||
pl_dev->invalid_packets++;
|
||||
return A_ERROR;
|
||||
}
|
||||
|
||||
/*
|
||||
* Must include to process different types
|
||||
* TX_CTL, TX_STATUS, TX_MSDU_ID, TX_FRM_HDR
|
||||
|
Reference in New Issue
Block a user