Commit b22eadb
CKI Backport Bot
wifi: ath12k: fix uaf in ath12k_core_init()
JIRA: https://issues.redhat.com/browse/RHEL-102087
CVE: CVE-2025-38116
commit f3fe49d
Author: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Date: Wed Jun 4 13:52:50 2025 +0800
wifi: ath12k: fix uaf in ath12k_core_init()
When the execution of ath12k_core_hw_group_assign() or
ath12k_core_hw_group_create() fails, the registered notifier chain is not
unregistered properly. Its memory is freed after rmmod, which may trigger
to a use-after-free (UAF) issue if there is a subsequent access to this
notifier chain.
Fixes the issue by calling ath12k_core_panic_notifier_unregister() in
failure cases.
Call trace:
notifier_chain_register+0x4c/0x1f0 (P)
atomic_notifier_chain_register+0x38/0x68
ath12k_core_init+0x50/0x4e8 [ath12k]
ath12k_pci_probe+0x5f8/0xc28 [ath12k]
pci_device_probe+0xbc/0x1a8
really_probe+0xc8/0x3a0
__driver_probe_device+0x84/0x1b0
driver_probe_device+0x44/0x130
__driver_attach+0xcc/0x208
bus_for_each_dev+0x84/0x100
driver_attach+0x2c/0x40
bus_add_driver+0x130/0x260
driver_register+0x70/0x138
__pci_register_driver+0x68/0x80
ath12k_pci_init+0x30/0x68 [ath12k]
ath12k_init+0x28/0x78 [ath12k]
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: 6f245ea ("wifi: ath12k: introduce device group abstraction")
Signed-off-by: Miaoqing Pan <miaoqing.pan@oss.qualcomm.com>
Reviewed-by: Baochen Qiang <quic_bqiang@quicinc.com>
Link: https://patch.msgid.link/20250604055250.1228501-1-miaoqing.pan@oss.qualcomm.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: CKI Backport Bot <cki-ci-bot+cki-gitlab-backport-bot@redhat.com>1 parent bc2db93 commit b22eadb
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1843 | 1843 | | |
1844 | 1844 | | |
1845 | 1845 | | |
1846 | | - | |
| 1846 | + | |
| 1847 | + | |
1847 | 1848 | | |
1848 | 1849 | | |
1849 | 1850 | | |
| |||
1858 | 1859 | | |
1859 | 1860 | | |
1860 | 1861 | | |
1861 | | - | |
| 1862 | + | |
1862 | 1863 | | |
1863 | 1864 | | |
1864 | 1865 | | |
1865 | 1866 | | |
1866 | 1867 | | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | | - | |
| 1870 | + | |
1870 | 1871 | | |
1871 | 1872 | | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
1872 | 1876 | | |
1873 | 1877 | | |
1874 | 1878 | | |
| |||
0 commit comments