CVE-2024-40979
wifi: ath12k: fix kernel crash during resume
Mitigation
- Upgrade Linux to 303c017821d88ebad887814114d4e5966d320b28 or later.
Who should check
- Anyone running Linux >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 7e323cb55705398123ae087d4870c44e0424e7c0; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < bb50a4e711ff95348ad53641acb1306d89eb4c3a; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 303c017821d88ebad887814114d4e5966d320b28
- Anyone running Linux 6.3
Vulnerability facts
- Affected
- Linux >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 7e323cb55705398123ae087d4870c44e0424e7c0; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < bb50a4e711ff95348ad53641acb1306d89eb4c3a; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 303c017821d88ebad887814114d4e5966d320b28; Linux 6.3
- Fixed in
- Linux 7e323cb55705398123ae087d4870c44e0424e7c0, Linux 303c017821d88ebad887814114d4e5966d320b28
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 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
- EPSS
- 0.33% chance of exploitation in 30 days (percentile 18, 2026-11-26)
- CWE
- CWE-401, CWE-763
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: wifi: ath12k: fix kernel crash during resume Currently during resume, QMI target memory is not properly handled, resulting in kernel crash in case DMA remap is not supported: BUG: Bad page state in process kworker/u16:54 pfn:36e80 page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36e80 page dumped because: nonzero _refcount Call Trace: bad_page free_page_is_bad_report __free_pages_ok __free_pages dma_direct_free dma_free_attrs ath12k_qmi_free_target_mem_chunk ath12k_qmi_msg_mem_request_cb The reason is: Once ath12k module is loaded, firmware sends memory request to host. In case DMA remap not supported, ath12k refuses the first request due to failure in allocating with large segment size: ath12k_pci 0000:04:00.0: qmi firmware request memory request ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 7077888 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 8454144 ath12k_pci 0000:04:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size ath12k_pci 0000:04:00.0: qmi delays mem_request 2 ath12k_pci 0000:04:00.0: qmi firmware request memory request Later firmware comes back with more but small segments and allocation succeeds: ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 262144 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288 ath12k_pci 0000:04:00.0: qmi mem seg type 4 size 65536 ath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288 Now ath12k is working. If suspend is triggered, firmware will be reloaded during resume. As same as before, firmware requests two large segments at first. In ath12k_qmi_msg_mem_request_cb() segment count and size are assigned: ab->qmi.mem_seg_count == 2 ab->qmi.target_mem[0].size == 7077888 ab->qmi.target_mem[1].size == 8454144 Then allocation failed like before and ath12k_qmi_free_target_mem_chunk() is called to free all allocated segments. Note the first segment is skipped because its v.addr is cleared due to allocation failure: chunk->v.addr = dma_alloc_coherent() Also note that this leaks that segment because it has not been freed. While freeing the second segment, a size of 8454144 is passed to dma_free_coherent(). However remember that this segment is allocated at the first time firmware is loaded, before suspend. So its real size is 524288, much smaller than 8454144. As a result kernel found we are freeing some memory which is in use and thus cras ---truncated---
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 7e323cb55705398123ae087d4870c44e0424e7c0; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < bb50a4e711ff95348ad53641acb1306d89eb4c3a; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 303c017821d88ebad887814114d4e5966d320b28 | — | cvelist |
| Linux | 6.3 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-40979. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-40979.md Affected: Linux >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 7e323cb55705398123ae087d4870c44e0424e7c0; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < bb50a4e711ff95348ad53641acb1306d89eb4c3a; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 303c017821d88ebad887814114d4e5966d320b28; Linux 6.3 Fixed in: Linux 7e323cb55705398123ae087d4870c44e0424e7c0, Linux 303c017821d88ebad887814114d4e5966d320b28 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.
References
Patches
FAQ
Is CVE-2024-40979 being exploited?
There is no confirmed exploitation: CVE-2024-40979 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.33% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-40979?
High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2024-40979?
Linux >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 7e323cb55705398123ae087d4870c44e0424e7c0; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < bb50a4e711ff95348ad53641acb1306d89eb4c3a; >= d889913205cf7ebda905b1e62c5867ed4e39f6c2, < 303c017821d88ebad887814114d4e5966d320b28; Linux 6.3.
Is there a fix for CVE-2024-40979?
Yes. Fixed in Linux 7e323cb55705398123ae087d4870c44e0424e7c0, Linux 303c017821d88ebad887814114d4e5966d320b28. Upgrade Linux to 303c017821d88ebad887814114d4e5966d320b28 or later.
How do I check if I'm affected by CVE-2024-40979?
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.