Commit 57100b8
wifi: ath12k: fix read pointer after free in ath12k_mac_assign_vif_to_vdev()
[ Upstream commit 5a10971 ]
In ath12k_mac_assign_vif_to_vdev(), if arvif is created on a different
radio, it gets deleted from that radio through a call to
ath12k_mac_unassign_link_vif(). This action frees the arvif pointer.
Subsequently, there is a check involving arvif, which will result in a
read-after-free scenario.
Fix this by moving this check after arvif is again assigned via call to
ath12k_mac_assign_link_vif().
Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1
Closes: https://scan5.scan.coverity.com/#/project-view/63541/10063?selectedIssue=1636423
Fixes: b5068bc ("wifi: ath12k: Cache vdev configs before vdev create")
Signed-off-by: Aditya Kumar Singh <[email protected]>
Acked-by: Jeff Johnson <[email protected]>
Acked-by: Kalle Valo <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jeff Johnson <[email protected]>
Signed-off-by: Amelia Crate <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent 68ec78b commit 57100b8
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6733 | 6733 | | |
6734 | 6734 | | |
6735 | 6735 | | |
6736 | | - | |
6737 | | - | |
6738 | | - | |
6739 | 6736 | | |
6740 | 6737 | | |
6741 | 6738 | | |
6742 | 6739 | | |
6743 | 6740 | | |
6744 | 6741 | | |
| 6742 | + | |
| 6743 | + | |
| 6744 | + | |
6745 | 6745 | | |
6746 | 6746 | | |
6747 | 6747 | | |
| |||
0 commit comments