CVE-2025-40311 accel/habanalabs: support mapping cb with vmalloc-backed coherent memory
A local attacker can trigger a kernel crash in the Habanalabs driver by mapping coherent memory when IOMMU is enabled, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2025-40311?
CVE-2025-40311 is a denial of service vulnerability in Linux, published on 8 Dec 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Which versions are affected by CVE-2025-40311?
How do I fix CVE-2025-40311?
Apply the vendor's patch.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2025-40311 being exploited?
There is no known exploitation of CVE-2025-40311 in the wild and no public exploit code.
Sources
Also known as BELL-CVE-2025-40311, DEBIAN-CVE-2025-40311, GHSA-g3pf-jp95-cjc3, ROOT-OS-DEBIAN-11-CVE-2025-40311, ROOT-OS-DEBIAN-12-CVE-2025-40311, ROOT-OS-DEBIAN-13-CVE-2025-40311 and 3 more.