# CVE-2024-40979: wifi: ath12k: fix kernel crash during resume

> 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.33% (percentile 18, 2026-11-26)
- **CWE:** CWE-401, CWE-763
- **Published:** 2024-07-12T12:32:14.902Z
- **Modified:** 2026-10-03T11:17:29.970Z

## Who should check

- Anyone running Linux \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< 7e323cb55705398123ae087d4870c44e0424e7c0; \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< bb50a4e711ff95348ad53641acb1306d89eb4c3a; \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< 303c017821d88ebad887814114d4e5966d320b28
- Anyone running Linux 6.3

## 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

- Linux: \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< 7e323cb55705398123ae087d4870c44e0424e7c0; \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< bb50a4e711ff95348ad53641acb1306d89eb4c3a; \>= d889913205cf7ebda905b1e62c5867ed4e39f6c2, \< 303c017821d88ebad887814114d4e5966d320b28 (cvelist)
- Linux: 6.3 (cvelist)

## Mitigation

- Upgrade Linux to 303c017821d88ebad887814114d4e5966d320b28 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
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.
```

## 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.

## References

- patch: <https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a>
- patch: <https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28>
- other: <https://git.kernel.org/stable/c/7e323cb55705398123ae087d4870c44e0424e7c0>

## 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-40979>

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