CVE-2024-40979 (GCVE-0-2024-40979)

Vulnerability from cvelistv5 – Published: 2024-07-12 12:32 – Updated: 2026-08-05 11:34
VLAI
Title
wifi: ath12k: fix kernel crash during resume
Summary
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---
SSVC
Exploitation: none Automatable: no Technical Impact: partial
CISA Coordinator (v2.0.3)
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: d889913205cf7ebda905b1e62c5867ed4e39f6c2 , < bb50a4e711ff95348ad53641acb1306d89eb4c3a (git)
Affected: d889913205cf7ebda905b1e62c5867ed4e39f6c2 , < 303c017821d88ebad887814114d4e5966d320b28 (git)
Create a notification for this product.
Linux Linux Affected: 6.3
Unaffected: 0 , < 6.3 (semver)
Unaffected: 6.9.7 , ≤ 6.9.* (semver)
Unaffected: 6.10 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T04:39:55.885Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28"
          }
        ],
        "title": "CVE Program Container"
      },
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-40979",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-10T17:02:27.015778Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-11T17:34:21.625Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/wireless/ath/ath12k/core.c",
            "drivers/net/wireless/ath/ath12k/qmi.c",
            "drivers/net/wireless/ath/ath12k/qmi.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "bb50a4e711ff95348ad53641acb1306d89eb4c3a",
              "status": "affected",
              "version": "d889913205cf7ebda905b1e62c5867ed4e39f6c2",
              "versionType": "git"
            },
            {
              "lessThan": "303c017821d88ebad887814114d4e5966d320b28",
              "status": "affected",
              "version": "d889913205cf7ebda905b1e62c5867ed4e39f6c2",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/net/wireless/ath/ath12k/core.c",
            "drivers/net/wireless/ath/ath12k/qmi.c",
            "drivers/net/wireless/ath/ath12k/qmi.h"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.3"
            },
            {
              "lessThan": "6.3",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.9.*",
              "status": "unaffected",
              "version": "6.9.7",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.10",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9.7",
                  "versionStartIncluding": "6.3",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10",
                  "versionStartIncluding": "6.3",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nwifi: ath12k: fix kernel crash during resume\n\nCurrently during resume, QMI target memory is not properly handled, resulting\nin kernel crash in case DMA remap is not supported:\n\nBUG: Bad page state in process kworker/u16:54  pfn:36e80\npage: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36e80\npage dumped because: nonzero _refcount\nCall Trace:\n bad_page\n free_page_is_bad_report\n __free_pages_ok\n __free_pages\n dma_direct_free\n dma_free_attrs\n ath12k_qmi_free_target_mem_chunk\n ath12k_qmi_msg_mem_request_cb\n\nThe reason is:\nOnce ath12k module is loaded, firmware sends memory request to host. In case\nDMA remap not supported, ath12k refuses the first request due to failure in\nallocating with large segment size:\n\nath12k_pci 0000:04:00.0: qmi firmware request memory request\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 7077888\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 8454144\nath12k_pci 0000:04:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size\nath12k_pci 0000:04:00.0: qmi delays mem_request 2\nath12k_pci 0000:04:00.0: qmi firmware request memory request\n\nLater firmware comes back with more but small segments and allocation\nsucceeds:\n\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 262144\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 65536\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\n\nNow ath12k is working. If suspend is triggered, firmware will be reloaded\nduring resume. As same as before, firmware requests two large segments at\nfirst. In ath12k_qmi_msg_mem_request_cb() segment count and size are\nassigned:\n\n\tab-\u003eqmi.mem_seg_count == 2\n\tab-\u003eqmi.target_mem[0].size == 7077888\n\tab-\u003eqmi.target_mem[1].size == 8454144\n\nThen allocation failed like before and ath12k_qmi_free_target_mem_chunk()\nis called to free all allocated segments. Note the first segment is skipped\nbecause its v.addr is cleared due to allocation failure:\n\n\tchunk-\u003ev.addr = dma_alloc_coherent()\n\nAlso note that this leaks that segment because it has not been freed.\n\nWhile freeing the second segment, a size of 8454144 is passed to\ndma_free_coherent(). However remember that this segment is allocated at\nthe first time firmware is loaded, before suspend. So its real size is\n524288, much smaller than 8454144. As a result kernel found we are freeing\nsome memory which is in use and thus cras\n---truncated---"
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable path is entered from the host-side QMI/QRTR channel \u2014 either a locally initiated suspend/resume that reloads the firmware, or a forged `QMI_WLFW_REQUEST_MEM_IND_V01` sent from a local AF_QIPCRTR socket \u2014 not from over-the-air 802.11 frames. Reaching it requires local execution on the host, so Local rather than Adjacent or Network.\nAC:L - The attacker fully controls both halves of the condition: `mem_seg[].size` values in the indication, and whether the first chunk\u0027s allocation fails (any size above the 2 MiB `ATH12K_QMI_MAX_CHUNK_SIZE` guarantees the `target_mem_delayed` free path). Even in the pure suspend/resume variant the large-contiguous-DMA failure is influenceable via attacker-induced memory fragmentation, and the 16K-entry ephemeral QRTR port range is brute-forced in milliseconds, so no condition lies outside attacker control.\nPR:L - Only an unprivileged local account is needed \u2014 `qrtr_create()` performs no capability check, ephemeral autobind is unrestricted (CAP_NET_ADMIN gates only well-known ports below 0x4000), and `qrtr_ports` is a global table not scoped to network namespaces, so the send works even from inside an unprivileged user/net namespace. No CAP_NET_ADMIN, root, or device-file access is required.\nUI:N - The forged-indication path is processed immediately in the QMI receive worker with no victim involvement whatsoever. Even the documented suspend/resume trigger fires automatically on laptops, phones, and embedded WCN7850 platforms that autosuspend during normal operation.\nS:U - The corruption is confined to the host kernel\u0027s own page allocator and DMA buffers, within the same security authority as the vulnerable driver. No VM, IOMMU, or sandbox boundary is crossed.\nC:H - `__free_pages(page, get_order(oversized))` returns pages that are still owned and populated by unrelated kernel subsystems and user processes to the buddy allocator, where the attacker can immediately reallocate and read them. That is a page-granular use-after-free yielding disclosure of arbitrary kernel and user memory contents, scored High.\nI:H - With attacker-chosen sizes the over-free order is attacker-selected, producing a controlled page-level UAF/double-free primitive: live objects are handed back out and can be overwritten after the original owner still holds pointers to them. Such heap corruption is a classic route to arbitrary write and control-flow hijack, scored High.\nA:H - The immediate observed effect is `BUG: Bad page state`/`bad_page` from `__free_pages_ok` \u2014 a kernel oops in `kworker` context \u2014 and the driver additionally leaks the un-freed first segment. The over-free of in-use pages corrupts unrelated allocations and reliably panics the system, and it can be re-triggered at will."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:34:21.701Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a"
        },
        {
          "url": "https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28"
        }
      ],
      "title": "wifi: ath12k: fix kernel crash during resume",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-40979",
    "datePublished": "2024-07-12T12:32:14.902Z",
    "dateReserved": "2024-07-12T12:17:45.604Z",
    "dateUpdated": "2026-08-05T11:34:21.701Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2024-40979",
      "date": "2026-08-06",
      "epss": "0.00268",
      "percentile": "0.18698"
    },
    "fkie_nvd": {
      "descriptions": "[{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nwifi: ath12k: fix kernel crash during resume\\n\\nCurrently during resume, QMI target memory is not properly handled, resulting\\nin kernel crash in case DMA remap is not supported:\\n\\nBUG: Bad page state in process kworker/u16:54  pfn:36e80\\npage: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36e80\\npage dumped because: nonzero _refcount\\nCall Trace:\\n bad_page\\n free_page_is_bad_report\\n __free_pages_ok\\n __free_pages\\n dma_direct_free\\n dma_free_attrs\\n ath12k_qmi_free_target_mem_chunk\\n ath12k_qmi_msg_mem_request_cb\\n\\nThe reason is:\\nOnce ath12k module is loaded, firmware sends memory request to host. In case\\nDMA remap not supported, ath12k refuses the first request due to failure in\\nallocating with large segment size:\\n\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 7077888\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 8454144\\nath12k_pci 0000:04:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size\\nath12k_pci 0000:04:00.0: qmi delays mem_request 2\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\n\\nLater firmware comes back with more but small segments and allocation\\nsucceeds:\\n\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 262144\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 65536\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\n\\nNow ath12k is working. If suspend is triggered, firmware will be reloaded\\nduring resume. As same as before, firmware requests two large segments at\\nfirst. In ath12k_qmi_msg_mem_request_cb() segment count and size are\\nassigned:\\n\\n\\tab-\u003eqmi.mem_seg_count == 2\\n\\tab-\u003eqmi.target_mem[0].size == 7077888\\n\\tab-\u003eqmi.target_mem[1].size == 8454144\\n\\nThen allocation failed like before and ath12k_qmi_free_target_mem_chunk()\\nis called to free all allocated segments. Note the first segment is skipped\\nbecause its v.addr is cleared due to allocation failure:\\n\\n\\tchunk-\u003ev.addr = dma_alloc_coherent()\\n\\nAlso note that this leaks that segment because it has not been freed.\\n\\nWhile freeing the second segment, a size of 8454144 is passed to\\ndma_free_coherent(). However remember that this segment is allocated at\\nthe first time firmware is loaded, before suspend. So its real size is\\n524288, much smaller than 8454144. As a result kernel found we are freeing\\nsome memory which is in use and thus cras\\n---truncated---\"}, {\"lang\": \"es\", \"value\": \"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: wifi: ath12k: soluciona el fallo del kernel durante la reanudaci\\u00f3n Actualmente, durante la reanudaci\\u00f3n, la memoria de destino de QMI no se maneja adecuadamente, lo que provoca un fallo del kernel en caso de que no se admita la reasignaci\\u00f3n de DMA: ERROR: Estado incorrecto de la p\\u00e1gina en proceso kworker/u16:54 pfn:36e80 p\\u00e1gina: refcount:1 mapcount:0 mapeo:0000000000000000 index:0x0 pfn:0x36e80 p\\u00e1gina descargada porque: distinto de cero _refcount Rastreo de llamadas: bad_page free_page_is_bad_report __free_pages_ok __free_pages dma_direct_free dma_free_attrs a th12k_qmi_free_target_mem_chunk ath12k_qmi_msg_mem_request_cb El motivo es: Una vez ath12k El m\\u00f3dulo est\\u00e1 cargado, el firmware env\\u00eda la solicitud de memoria al host. En caso de que no se admita la reasignaci\\u00f3n de DMA, ath12k rechaza la primera solicitud debido a un error en la asignaci\\u00f3n con un tama\\u00f1o de segmento grande: ath12k_pci 0000:04:00.0: solicitud de firmware qmi solicitud de memoria ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 7077888 ath12k_pci 0000 :04:00.0: qmi mem seg tipo 4 tama\\u00f1o 8454144 ath12k_pci 0000:04:00.0: falla en la asignaci\\u00f3n de qmi dma (7077888 B tipo 1), lo intentar\\u00e9 m\\u00e1s tarde con un tama\\u00f1o peque\\u00f1o ath12k_pci 0000:04:00.0: qmi retrasa mem_request 2 ath12k_pci 0000: 04:00.0: solicitud de memoria de solicitud de firmware qmi El firmware posterior regresa con m\\u00e1s segmentos, pero peque\\u00f1os, y la asignaci\\u00f3n se realiza correctamente: ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 pci 0000:04:00.0:qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 262144 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000 :04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00 .0: segmento de memoria qmi tipo 1 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 24288 ath12k_pci 0000:04 :00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 5242 88 ath12k_pci 0000:04:00.0 : qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem se g tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\\u00f1o 65536 ci 0000:04:00.0: qmi mem seg tipo 1 tama\\u00f1o 524288 Ahora ath12k est\\u00e1 funcionando. Si se activa la suspensi\\u00f3n, el firmware se recargar\\u00e1 durante la reanudaci\\u00f3n. Al igual que antes, el firmware solicita dos segmentos grandes al principio. En ath12k_qmi_msg_mem_request_cb() se asigna el recuento y el tama\\u00f1o del segmento: ab-\u0026gt;qmi.mem_seg_count == 2 ab-\u0026gt;qmi.target_mem[0].size == 7077888 ab-\u0026gt;qmi.target_mem[1].size == 8454144 Luego, la asignaci\\u00f3n fall\\u00f3 como antes y se llama a ath12k_qmi_free_target_mem_chunk() para liberar todos los segmentos asignados. ---truncado---\"}]",
      "id": "CVE-2024-40979",
      "lastModified": "2024-11-21T09:31:59.700",
      "published": "2024-07-12T13:15:19.477",
      "references": "[{\"url\": \"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\", \"source\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}, {\"url\": \"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\", \"source\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}, {\"url\": \"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}, {\"url\": \"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\", \"source\": \"af854a3a-2127-422b-91ae-364da2661108\"}]",
      "sourceIdentifier": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
      "vulnStatus": "Awaiting Analysis"
    },
    "microsoft_vex": {
      "current_release_date": "2026-02-18T01:09:29.000Z",
      "cve": "CVE-2024-40979",
      "id": "msrc_CVE-2024-40979",
      "initial_release_date": "2024-07-01T07:00:00.000Z",
      "product_status:known_not_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "wifi: ath12k: fix kernel crash during resume",
      "url": "https://msrc.microsoft.com/csaf/vex/2024/msrc_cve-2024-40979.json",
      "version": "2"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-40979\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-07-12T13:15:19.477\",\"lastModified\":\"2026-08-04T11:19:11.593\",\"vulnStatus\":\"Modified\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nwifi: ath12k: fix kernel crash during resume\\n\\nCurrently during resume, QMI target memory is not properly handled, resulting\\nin kernel crash in case DMA remap is not supported:\\n\\nBUG: Bad page state in process kworker/u16:54  pfn:36e80\\npage: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36e80\\npage dumped because: nonzero _refcount\\nCall Trace:\\n bad_page\\n free_page_is_bad_report\\n __free_pages_ok\\n __free_pages\\n dma_direct_free\\n dma_free_attrs\\n ath12k_qmi_free_target_mem_chunk\\n ath12k_qmi_msg_mem_request_cb\\n\\nThe reason is:\\nOnce ath12k module is loaded, firmware sends memory request to host. In case\\nDMA remap not supported, ath12k refuses the first request due to failure in\\nallocating with large segment size:\\n\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 7077888\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 8454144\\nath12k_pci 0000:04:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size\\nath12k_pci 0000:04:00.0: qmi delays mem_request 2\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\n\\nLater firmware comes back with more but small segments and allocation\\nsucceeds:\\n\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 262144\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 65536\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\n\\nNow ath12k is working. If suspend is triggered, firmware will be reloaded\\nduring resume. As same as before, firmware requests two large segments at\\nfirst. In ath12k_qmi_msg_mem_request_cb() segment count and size are\\nassigned:\\n\\n\\tab-\u003eqmi.mem_seg_count == 2\\n\\tab-\u003eqmi.target_mem[0].size == 7077888\\n\\tab-\u003eqmi.target_mem[1].size == 8454144\\n\\nThen allocation failed like before and ath12k_qmi_free_target_mem_chunk()\\nis called to free all allocated segments. Note the first segment is skipped\\nbecause its v.addr is cleared due to allocation failure:\\n\\n\\tchunk-\u003ev.addr = dma_alloc_coherent()\\n\\nAlso note that this leaks that segment because it has not been freed.\\n\\nWhile freeing the second segment, a size of 8454144 is passed to\\ndma_free_coherent(). However remember that this segment is allocated at\\nthe first time firmware is loaded, before suspend. So its real size is\\n524288, much smaller than 8454144. As a result kernel found we are freeing\\nsome memory which is in use and thus cras\\n---truncated---\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: wifi: ath12k: soluciona el fallo del kernel durante la reanudaci\u00f3n Actualmente, durante la reanudaci\u00f3n, la memoria de destino de QMI no se maneja adecuadamente, lo que provoca un fallo del kernel en caso de que no se admita la reasignaci\u00f3n de DMA: ERROR: Estado incorrecto de la p\u00e1gina en proceso kworker/u16:54 pfn:36e80 p\u00e1gina: refcount:1 mapcount:0 mapeo:0000000000000000 index:0x0 pfn:0x36e80 p\u00e1gina descargada porque: distinto de cero _refcount Rastreo de llamadas: bad_page free_page_is_bad_report __free_pages_ok __free_pages dma_direct_free dma_free_attrs a th12k_qmi_free_target_mem_chunk ath12k_qmi_msg_mem_request_cb El motivo es: Una vez ath12k El m\u00f3dulo est\u00e1 cargado, el firmware env\u00eda la solicitud de memoria al host. En caso de que no se admita la reasignaci\u00f3n de DMA, ath12k rechaza la primera solicitud debido a un error en la asignaci\u00f3n con un tama\u00f1o de segmento grande: ath12k_pci 0000:04:00.0: solicitud de firmware qmi solicitud de memoria ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 7077888 ath12k_pci 0000 :04:00.0: qmi mem seg tipo 4 tama\u00f1o 8454144 ath12k_pci 0000:04:00.0: falla en la asignaci\u00f3n de qmi dma (7077888 B tipo 1), lo intentar\u00e9 m\u00e1s tarde con un tama\u00f1o peque\u00f1o ath12k_pci 0000:04:00.0: qmi retrasa mem_request 2 ath12k_pci 0000: 04:00.0: solicitud de memoria de solicitud de firmware qmi El firmware posterior regresa con m\u00e1s segmentos, pero peque\u00f1os, y la asignaci\u00f3n se realiza correctamente: ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 pci 0000:04:00.0:qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 262144 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000 :04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00 .0: segmento de memoria qmi tipo 1 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 24288 ath12k_pci 0000:04 :00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 5242 88 ath12k_pci 0000:04:00.0 : qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem se g tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 524288 ath12k_pci 0000:04:00.0: qmi mem seg tipo 4 tama\u00f1o 65536 ci 0000:04:00.0: qmi mem seg tipo 1 tama\u00f1o 524288 Ahora ath12k est\u00e1 funcionando. Si se activa la suspensi\u00f3n, el firmware se recargar\u00e1 durante la reanudaci\u00f3n. Al igual que antes, el firmware solicita dos segmentos grandes al principio. En ath12k_qmi_msg_mem_request_cb() se asigna el recuento y el tama\u00f1o del segmento: ab-\u0026gt;qmi.mem_seg_count == 2 ab-\u0026gt;qmi.target_mem[0].size == 7077888 ab-\u0026gt;qmi.target_mem[1].size == 8454144 Luego, la asignaci\u00f3n fall\u00f3 como antes y se llama a ath12k_qmi_free_target_mem_chunk() para liberar todos los segmentos asignados. ---truncado---\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"drivers/net/wireless/ath/ath12k/core.c\",\"drivers/net/wireless/ath/ath12k/qmi.c\",\"drivers/net/wireless/ath/ath12k/qmi.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"d889913205cf7ebda905b1e62c5867ed4e39f6c2\",\"lessThan\":\"bb50a4e711ff95348ad53641acb1306d89eb4c3a\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d889913205cf7ebda905b1e62c5867ed4e39f6c2\",\"lessThan\":\"303c017821d88ebad887814114d4e5966d320b28\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"drivers/net/wireless/ath/ath12k/core.c\",\"drivers/net/wireless/ath/ath12k/qmi.c\",\"drivers/net/wireless/ath/ath12k/qmi.h\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"6.3\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"6.3\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.9.7\",\"lessThanOrEqual\":\"6.9.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.10\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9},{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H\",\"baseScore\":5.5,\"baseSeverity\":\"MEDIUM\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"NONE\",\"integrityImpact\":\"NONE\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":3.6}],\"ssvcV203\":[{\"source\":\"134c704f-9b21-4f2e-91b3-4a467353bcc0\",\"ssvcData\":{\"timestamp\":\"2024-09-10T17:02:27.015778Z\",\"id\":\"CVE-2024-40979\",\"options\":[{\"exploitation\":\"none\"},{\"automatable\":\"no\"},{\"technicalImpact\":\"partial\"}],\"role\":\"CISA Coordinator\",\"version\":\"2.0.3\"}}]},\"weaknesses\":[{\"source\":\"nvd@nist.gov\",\"type\":\"Primary\",\"description\":[{\"lang\":\"en\",\"value\":\"CWE-401\"},{\"lang\":\"en\",\"value\":\"CWE-763\"}]}],\"configurations\":[{\"nodes\":[{\"operator\":\"OR\",\"negate\":false,\"cpeMatch\":[{\"vulnerable\":true,\"criteria\":\"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\",\"versionStartIncluding\":\"6.3\",\"versionEndExcluding\":\"6.9.7\",\"matchCriteriaId\":\"A4D18378-D3B8-448E-A8B7-1B21462922D2\"}]}]}],\"references\":[{\"url\":\"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]},{\"url\":\"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\",\"source\":\"af854a3a-2127-422b-91ae-364da2661108\",\"tags\":[\"Patch\"]}]}}",
    "redhat_vex": {
      "aggregate_severity": "Moderate",
      "current_release_date": "2026-08-04T18:37:36+00:00",
      "cve": "CVE-2024-40979",
      "id": "CVE-2024-40979",
      "initial_release_date": "2024-07-12T00:00:00+00:00",
      "product_status:known_not_affected": "198",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: wifi: ath12k: fix kernel crash during resume",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2024/cve-2024-40979.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "moderate",
      "current_release_date": "2026-08-05T00:55:55Z",
      "cve": "CVE-2024-40979",
      "id": "CVE-2024-40979",
      "initial_release_date": "2024-07-16T02:34:11Z",
      "product_status:known_affected": "394",
      "product_status:known_not_affected": "294",
      "product_status:recommended": "358",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2024-40979",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2024-40979.json",
      "version": "62"
    },
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T04:39:55.885Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-40979\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-10T17:02:27.015778Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-11T12:42:22.201Z\"}}], \"cna\": {\"title\": \"wifi: ath12k: fix kernel crash during resume\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"d889913205cf7ebda905b1e62c5867ed4e39f6c2\", \"lessThan\": \"bb50a4e711ff95348ad53641acb1306d89eb4c3a\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"d889913205cf7ebda905b1e62c5867ed4e39f6c2\", \"lessThan\": \"303c017821d88ebad887814114d4e5966d320b28\", \"versionType\": \"git\"}], \"programFiles\": [\"drivers/net/wireless/ath/ath12k/core.c\", \"drivers/net/wireless/ath/ath12k/qmi.c\", \"drivers/net/wireless/ath/ath12k/qmi.h\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.3\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.3\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.9.7\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.9.*\"}, {\"status\": \"unaffected\", \"version\": \"6.10\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"drivers/net/wireless/ath/ath12k/core.c\", \"drivers/net/wireless/ath/ath12k/qmi.c\", \"drivers/net/wireless/ath/ath12k/qmi.h\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/bb50a4e711ff95348ad53641acb1306d89eb4c3a\"}, {\"url\": \"https://git.kernel.org/stable/c/303c017821d88ebad887814114d4e5966d320b28\"}], \"x_generator\": {\"engine\": \"bippy-5f407fcff5a0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nwifi: ath12k: fix kernel crash during resume\\n\\nCurrently during resume, QMI target memory is not properly handled, resulting\\nin kernel crash in case DMA remap is not supported:\\n\\nBUG: Bad page state in process kworker/u16:54  pfn:36e80\\npage: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x36e80\\npage dumped because: nonzero _refcount\\nCall Trace:\\n bad_page\\n free_page_is_bad_report\\n __free_pages_ok\\n __free_pages\\n dma_direct_free\\n dma_free_attrs\\n ath12k_qmi_free_target_mem_chunk\\n ath12k_qmi_msg_mem_request_cb\\n\\nThe reason is:\\nOnce ath12k module is loaded, firmware sends memory request to host. In case\\nDMA remap not supported, ath12k refuses the first request due to failure in\\nallocating with large segment size:\\n\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 7077888\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 8454144\\nath12k_pci 0000:04:00.0: qmi dma allocation failed (7077888 B type 1), will try later with small size\\nath12k_pci 0000:04:00.0: qmi delays mem_request 2\\nath12k_pci 0000:04:00.0: qmi firmware request memory request\\n\\nLater firmware comes back with more but small segments and allocation\\nsucceeds:\\n\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 262144\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 524288\\nath12k_pci 0000:04:00.0: qmi mem seg type 4 size 65536\\nath12k_pci 0000:04:00.0: qmi mem seg type 1 size 524288\\n\\nNow ath12k is working. If suspend is triggered, firmware will be reloaded\\nduring resume. As same as before, firmware requests two large segments at\\nfirst. In ath12k_qmi_msg_mem_request_cb() segment count and size are\\nassigned:\\n\\n\\tab-\u003eqmi.mem_seg_count == 2\\n\\tab-\u003eqmi.target_mem[0].size == 7077888\\n\\tab-\u003eqmi.target_mem[1].size == 8454144\\n\\nThen allocation failed like before and ath12k_qmi_free_target_mem_chunk()\\nis called to free all allocated segments. Note the first segment is skipped\\nbecause its v.addr is cleared due to allocation failure:\\n\\n\\tchunk-\u003ev.addr = dma_alloc_coherent()\\n\\nAlso note that this leaks that segment because it has not been freed.\\n\\nWhile freeing the second segment, a size of 8454144 is passed to\\ndma_free_coherent(). However remember that this segment is allocated at\\nthe first time firmware is loaded, before suspend. So its real size is\\n524288, much smaller than 8454144. As a result kernel found we are freeing\\nsome memory which is in use and thus cras\\n---truncated---\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-12-19T09:09:21.680Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-40979\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-12-19T09:09:21.680Z\", \"dateReserved\": \"2024-07-12T12:17:45.604Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-07-12T12:32:14.902Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Loading…