# CVE-2025-40311: accel/habanalabs: support mapping cb with vmalloc-backed coherent memory

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2025-12-08T00:46:36.903Z
- Modified: 2026-10-30T13:18:15.057Z
- Assigned by: Linux

## Description

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

accel/habanalabs: support mapping cb with vmalloc-backed coherent memory

When IOMMU is enabled, dma_alloc_coherent() with GFP_USER may return
addresses from the vmalloc range. If such an address is mapped without
VM_MIXEDMAP, vm_insert_page() will trigger a BUG_ON due to the
VM_PFNMAP restriction.

Fix this by checking for vmalloc addresses and setting VM_MIXEDMAP
in the VMA before mapping. This ensures safe mapping and avoids kernel
crashes. The memory is still driver-allocated and cannot be accessed
directly by userspace.

(As written by CVE List.)

## Affected

- Linux Linux: from ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 before 8de421db5b1b2b37e9643ea7f6ade90fd756892d; from ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 before 7ec8ac9f73d4a9438c2186768d6de27ace37531e; from ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 before d1dfe21a332d38a6a09658ec29a55940afb5fe36; from ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 before 73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9; from ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399 before 513024d5a0e34fd34247043f1876b6138ca52847; 5.8 (not affected: before 5.8; from 6.1.191 up to 6.1.*; from 6.6.117 up to 6.6.*; from 6.12.58 up to 6.12.*; from 6.17.8 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/8de421db5b1b2b37e9643ea7f6ade90fd756892d>
- <https://git.kernel.org/stable/c/7ec8ac9f73d4a9438c2186768d6de27ace37531e>
- <https://git.kernel.org/stable/c/d1dfe21a332d38a6a09658ec29a55940afb5fe36>
- <https://git.kernel.org/stable/c/73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9>
- <https://git.kernel.org/stable/c/513024d5a0e34fd34247043f1876b6138ca52847>

## Sources

- CVE List: [CVE-2025-40311](https://www.cve.org/CVERecord?id=CVE-2025-40311), CVE Terms of Use, modified 2026-10-30
- NVD: [CVE-2025-40311](https://nvd.nist.gov/vuln/detail/CVE-2025-40311), Public domain, modified 2026-10-30

---

Page: https://cve.day/CVE-2025-40311 · Whole record: https://cve.day/CVE-2025-40311.json · Rebuilt by cve.day 2026-11-25T22:59:08.399Z
