OSDN Git Service

wifi: ath12k: add check max message length while scanning with extraie
authorWen Gong <quic_wgong@quicinc.com>
Wed, 9 Aug 2023 08:16:57 +0000 (04:16 -0400)
committerKalle Valo <quic_kvalo@quicinc.com>
Fri, 25 Aug 2023 07:36:59 +0000 (10:36 +0300)
commit2f5124e86ae74b7ba24c9ae2644107b750cbf38f
treedbe24249c9aa33cd81e02f47053cdb006273e636
parent1e4134610d93271535ecf900a676e1f094e9944c
wifi: ath12k: add check max message length while scanning with extraie

Currently the extraie length is directly used to allocate skb buffer. When
the length of skb is greater than the max message length which firmware
supports, error will happen in firmware side.

Hence add check for the skb length and drop extraie when overflow and
print a message.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0-03427-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.15378.4

Signed-off-by: Wen Gong <quic_wgong@quicinc.com>
Reviewed-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://lore.kernel.org/r/20230809081657.13858-1-quic_wgong@quicinc.com
drivers/net/wireless/ath/ath12k/wmi.c