]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ath11k: Avoid NULL ptr access during mgmt tx cleanup
authorSriram R <quic_srirrama@quicinc.com>
Thu, 25 Nov 2021 09:30:14 +0000 (15:00 +0530)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 10:02:29 +0000 (11:02 +0100)
commit20dd404799d129cb6fa5e79d0b157fd90502481b
treed3770df1c92049716e01d5fb51f9ebbbc6d8feb3
parentd4511eed7760843d68b48bf7b2e34d234fddfdd9
ath11k: Avoid NULL ptr access during mgmt tx cleanup

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit a93789ae541c7d5c1c2a4942013adb6bcc5e2848 ]

Currently 'ar' reference is not added in skb_cb during
WMI mgmt tx. Though this is generally not used during tx completion
callbacks, on interface removal the remaining idr cleanup callback
uses the ar ptr from skb_cb from mgmt txmgmt_idr. Hence
fill them during tx call for proper usage.

Also free the skb which is missing currently in these
callbacks.

Crash_info:

[19282.489476] Unable to handle kernel NULL pointer dereference at virtual address 00000000
[19282.489515] pgd = 91eb8000
[19282.496702] [00000000] *pgd=00000000
[19282.502524] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
[19282.783728] PC is at ath11k_mac_vif_txmgmt_idr_remove+0x28/0xd8 [ath11k]
[19282.789170] LR is at idr_for_each+0xa0/0xc8

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.5.0.1-00729-QCAHKSWPL_SILICONZ-3 v2
Signed-off-by: Sriram R <quic_srirrama@quicinc.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1637832614-13831-1-git-send-email-quic_srirrama@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/wireless/ath/ath11k/mac.c