CVE & CISA-KEV Catalog

CVE-2024-40979

MEDIUM
5.5
CVSS v3
NVD

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

How to fix

Remediation Available
linuxDebian
Fixed in:6.9.7-1CVE-2024-40979
Fixed in:6.9.7-1CVE-2024-40979
linuxUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-awsUbuntu
Fixed in:6.8.0-1015.16USN-6999-1
linux-azureUbuntu
Fixed in:6.8.0-1014.16USN-7004-1
linux-gcpUbuntu
Fixed in:6.8.0-1014.16USN-6999-1
linux-gkeUbuntu
Fixed in:6.8.0-1010.13USN-6999-1
linux-hwe-6.8Ubuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-ibmUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-6.8.0-1010-gkeUbuntu
Fixed in:6.8.0-1010.13USN-6999-1
linux-image-6.8.0-1011-raspiUbuntu
Fixed in:6.8.0-1011.12USN-6999-2
linux-image-6.8.0-1012-ibmUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-6.8.0-1012-oemUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-6.8.0-1012-oracleUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-6.8.0-1012-oracle-64kUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-6.8.0-1013-nvidiaUbuntu
Fixed in:6.8.0-1013.14~22.04.1USN-7005-2
Fixed in:6.8.0-1013.14USN-7005-1
linux-image-6.8.0-1013-nvidia-64kUbuntu
Fixed in:6.8.0-1013.14~22.04.1USN-7005-2
Fixed in:6.8.0-1013.14USN-7005-1
linux-image-6.8.0-1013-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1013.14.1USN-7005-1
linux-image-6.8.0-1013-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1013.14.1USN-7005-1
linux-image-6.8.0-1014-azureUbuntu
Fixed in:6.8.0-1014.16USN-7004-1
linux-image-6.8.0-1014-azure-fdeUbuntu
Fixed in:6.8.0-1014.16USN-7004-1
linux-image-6.8.0-1014-gcpUbuntu
Fixed in:6.8.0-1014.16USN-6999-1
linux-image-6.8.0-1015-awsUbuntu
Fixed in:6.8.0-1015.16USN-6999-1
linux-image-6.8.0-44-genericUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-6.8.0-44-generic-64kUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-6.8.0-44-lowlatencyUbuntu
Fixed in:6.8.0-44.44.1~22.04.1USN-7008-1
Fixed in:6.8.0-44.44.1USN-6999-1
linux-image-6.8.0-44-lowlatency-64kUbuntu
Fixed in:6.8.0-44.44.1~22.04.1USN-7008-1
Fixed in:6.8.0-44.44.1USN-6999-1
linux-image-6.8.0-45-genericUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-6.8.0-45-generic-64kUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-awsUbuntu
Fixed in:6.8.0-1015.16USN-6999-1
linux-image-azureUbuntu
Fixed in:6.8.0-1014.16USN-7004-1
linux-image-azure-fdeUbuntu
Fixed in:6.8.0-1014.16USN-7004-1
linux-image-gcpUbuntu
Fixed in:6.8.0-1014.16USN-6999-1
linux-image-genericUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-generic-64kUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-generic-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-generic-64k-hwe-24.04Ubuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-generic-hwe-22.04Ubuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-generic-hwe-24.04Ubuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-generic-lpaeUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-gkeUbuntu
Fixed in:6.8.0-1010.13USN-6999-1
linux-image-ibmUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-ibm-classicUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-ibm-lts-24.04Ubuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-kvmUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-lowlatencyUbuntu
Fixed in:6.8.0-44.44.1USN-6999-1
linux-image-lowlatency-64kUbuntu
Fixed in:6.8.0-44.44.1USN-6999-1
linux-image-lowlatency-64k-hwe-22.04Ubuntu
Fixed in:6.8.0-44.44.1~22.04.1USN-7008-1
linux-image-lowlatency-hwe-22.04Ubuntu
Fixed in:6.8.0-44.44.1~22.04.1USN-7008-1
linux-image-nvidiaUbuntu
Fixed in:6.8.0-1013.13USN-7005-1
linux-image-nvidia-6.8Ubuntu
Fixed in:6.8.0-1013.14~22.04.1USN-7005-2
linux-image-nvidia-64kUbuntu
Fixed in:6.8.0-1013.13USN-7005-1
linux-image-nvidia-64k-6.8Ubuntu
Fixed in:6.8.0-1013.14~22.04.1USN-7005-2
linux-image-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1013.14.1USN-7005-1
linux-image-nvidia-lowlatency-64kUbuntu
Fixed in:6.8.0-1013.14.1USN-7005-1
linux-image-oem-22.04Ubuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-oem-22.04aUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-oem-22.04bUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-oem-22.04cUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-oem-22.04dUbuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-oracleUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-oracle-64kUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-image-raspiUbuntu
Fixed in:6.8.0-1011.12USN-6999-2
linux-image-virtualUbuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-image-virtual-hwe-22.04Ubuntu
Fixed in:6.8.0-45.45~22.04.1USN-7029-1
linux-image-virtual-hwe-24.04Ubuntu
Fixed in:6.8.0-44.44USN-6999-1
linux-lowlatencyUbuntu
Fixed in:6.8.0-44.44.1USN-6999-1
linux-lowlatency-hwe-6.8Ubuntu
Fixed in:6.8.0-44.44.1~22.04.1USN-7008-1
linux-nvidiaUbuntu
Fixed in:6.8.0-1013.14USN-7005-1
linux-nvidia-6.8Ubuntu
Fixed in:6.8.0-1013.14~22.04.1USN-7005-2
linux-nvidia-lowlatencyUbuntu
Fixed in:6.8.0-1013.14.1USN-7005-1
linux-oem-6.8Ubuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-oracleUbuntu
Fixed in:6.8.0-1012.12USN-6999-1
linux-raspiUbuntu
Fixed in:6.8.0-1011.12USN-6999-2

Remediation is compiled from vendor and distribution security advisories. Always confirm against the linked source for your exact version and platform.

CVSS v3 Vector

Exploitability

Attack VectorLocal
Attack ComplexityLow
Privileges RequiredLow
User InteractionNone
ScopeUnchanged

Impact

ConfidentialityNone
IntegrityNone
AvailabilityHigh

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Exploit Intelligence

0.26%probability of exploitation in 30 days
17thpercentile

Low risk: more likely to be exploited than 17% of all known CVEs.

References

Embed a live status badge for CVE-2024-40979
CVE-2024-40979 severity badge

Markdown

[![CVE-2024-40979](https://tridentstack.com/cve/badge/CVE-2024-40979.svg)](https://tridentstack.com/cve/CVE-2024-40979)

HTML

<a href="https://tridentstack.com/cve/CVE-2024-40979"><img src="https://tridentstack.com/cve/badge/CVE-2024-40979.svg" alt="CVE-2024-40979"></a>

Find and fix vulnerabilities across your fleet

TridentStack Control continuously scans your Windows, macOS, and Linux fleet for known vulnerabilities, prioritizes them by severity and active exploitation, and patches them automatically.

Start free

This product uses NVD data but is not endorsed or certified by the NVD. EPSS scores courtesy of FIRST.org (https://www.first.org/epss). Source: CISA KEV Catalog. Data as of 2025-09-17.