# CVE-2024-56541: wifi: ath12k: fix use-after-free in ath12k\_dp\_cc\_cleanup()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-12-27T14:11:23.219Z
- **Modified:** 2026-06-17T08:12:20.807Z

## Who should check

- Anyone running Linux \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< e5e15c8b42923bfb6c84d3d906a9965d9a0f111d; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< 35be5018a2a4d1b07bdfcf957c81121d22d16355; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< bdb281103373fd80eb5c91cede1e115ba270b4e9
- Anyone running Linux 6.10

## Description

In the Linux kernel, the following vulnerability has been resolved:

wifi: ath12k: fix use-after-free in ath12k\_dp\_cc\_cleanup()

During ath12k module removal, in ath12k\_core\_deinit(),
ath12k\_mac\_destroy() un-registers ah-\>hw from mac80211 and frees
the ah-\>hw as well as all the ar's in it. After this
ath12k\_core\_soc\_destroy()-\> ath12k\_dp\_free()-\> ath12k\_dp\_cc\_cleanup()
tries to access one of the freed ar's from pending skb.

This is because during mac destroy, driver failed to flush few
data packets, which were accessed later in ath12k\_dp\_cc\_cleanup()
and freed, but using ar from the packet led to this use-after-free.

BUG: KASAN: use-after-free in ath12k\_dp\_cc\_cleanup.part.0+0x5e2/0xd40 \[ath12k\]
Write of size 4 at addr ffff888150bd3514 by task modprobe/8926
CPU: 0 UID: 0 PID: 8926 Comm: modprobe Not tainted
6.11.0-rc2-wt-ath+ \#1746
Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS
HNKBLi70.86A.0067.2021.0528.1339 05/28/2021

Call Trace:
  \<TASK\>
  dump\_stack\_lvl+0x7d/0xe0
  print\_address\_description.constprop.0+0x33/0x3a0
  print\_report+0xb5/0x260
  ? kasan\_addr\_to\_slab+0x24/0x80
  kasan\_report+0xd8/0x110
  ? ath12k\_dp\_cc\_cleanup.part.0+0x5e2/0xd40 \[ath12k\]
  ? ath12k\_dp\_cc\_cleanup.part.0+0x5e2/0xd40 \[ath12k\]
  kasan\_check\_range+0xf3/0x1a0
  \_\_kasan\_check\_write+0x14/0x20
  ath12k\_dp\_cc\_cleanup.part.0+0x5e2/0xd40 \[ath12k\]
  ath12k\_dp\_free+0x178/0x420 \[ath12k\]
  ath12k\_core\_stop+0x176/0x200 \[ath12k\]
  ath12k\_core\_deinit+0x13f/0x210 \[ath12k\]
  ath12k\_pci\_remove+0xad/0x1c0 \[ath12k\]
  pci\_device\_remove+0x9b/0x1b0
  device\_remove+0xbf/0x150
  device\_release\_driver\_internal+0x3c3/0x580
  ? \_\_kasan\_check\_read+0x11/0x20
  driver\_detach+0xc4/0x190
  bus\_remove\_driver+0x130/0x2a0
  driver\_unregister+0x68/0x90
  pci\_unregister\_driver+0x24/0x240
  ? find\_module\_all+0x13e/0x1e0
  ath12k\_pci\_exit+0x10/0x20 \[ath12k\]
  \_\_do\_sys\_delete\_module+0x32c/0x580
  ? module\_flags+0x2f0/0x2f0
  ? kmem\_cache\_free+0xf0/0x410
  ? \_\_fput+0x56f/0xab0
  ? \_\_fput+0x56f/0xab0
  ? debug\_smp\_processor\_id+0x17/0x20
  \_\_x64\_sys\_delete\_module+0x4f/0x70
  x64\_sys\_call+0x522/0x9f0
  do\_syscall\_64+0x64/0x130
  entry\_SYSCALL\_64\_after\_hwframe+0x4b/0x53
RIP: 0033:0x7f8182c6ac8b

Commit 24de1b7b231c ("wifi: ath12k: fix flush failure in recovery
scenarios") added the change to decrement the pending packets count
in case of recovery which make sense as ah-\>hw as well all
ar's in it are intact during recovery, but during core deinit there
is no use in decrementing packets count or waking up the empty waitq
as the module is going to be removed also ar's from pending skb's
can't be used and the packets should just be released back.

To fix this, avoid accessing ar from skb-\>cb when driver is being
unregistered.

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.1.1-00214-QCAHKSWPL\_SILICONZ-1
Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL\_V1.0\_V2.0\_SILICONZ-3

## Affected and fixed versions

- Linux: \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< e5e15c8b42923bfb6c84d3d906a9965d9a0f111d; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< 35be5018a2a4d1b07bdfcf957c81121d22d16355; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< bdb281103373fd80eb5c91cede1e115ba270b4e9 (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-56541. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-56541.md
Affected: Linux >= 24de1b7b231cf01d08d12db26e66b0c46253a7da, < e5e15c8b42923bfb6c84d3d906a9965d9a0f111d; >= 24de1b7b231cf01d08d12db26e66b0c46253a7da, < 35be5018a2a4d1b07bdfcf957c81121d22d16355; >= 24de1b7b231cf01d08d12db26e66b0c46253a7da, < bdb281103373fd80eb5c91cede1e115ba270b4e9; Linux 6.10
Fixed in: Linux 35be5018a2a4d1b07bdfcf957c81121d22d16355

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-56541 being exploited?

There is no confirmed exploitation: CVE-2024-56541 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.31% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-56541?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-56541?

Linux \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< e5e15c8b42923bfb6c84d3d906a9965d9a0f111d; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< 35be5018a2a4d1b07bdfcf957c81121d22d16355; \>= 24de1b7b231cf01d08d12db26e66b0c46253a7da, \< bdb281103373fd80eb5c91cede1e115ba270b4e9; Linux 6.10.

### Is there a fix for CVE-2024-56541?

Yes. Fixed in Linux 35be5018a2a4d1b07bdfcf957c81121d22d16355. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2024-56541?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e5e15c8b42923bfb6c84d3d906a9965d9a0f111d>
- patch: <https://git.kernel.org/stable/c/35be5018a2a4d1b07bdfcf957c81121d22d16355>
- patch: <https://git.kernel.org/stable/c/bdb281103373fd80eb5c91cede1e115ba270b4e9>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-56541>

HTML: <https://flawdb.com/CVE-2024-56541> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-56541>
