CVE-2025-40311
Unknown Unknown - Not Provided

BaseFortify

Vulnerability report for CVE-2025-40311, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2025-12-08

Last updated on: 2025-12-08

Assigner: kernel.org

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2025-12-08
Last Modified
2025-12-08
Generated
2026-07-06
AI Q&A
2025-12-08
EPSS Evaluated
2026-07-05
NVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
linux kernel *

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

This vulnerability occurs in the Linux kernel's habanalabs accelerator driver when IOMMU is enabled. The function dma_alloc_coherent() with GFP_USER can return addresses from the vmalloc range. If these addresses are mapped without the VM_MIXEDMAP flag, vm_insert_page() triggers a kernel BUG_ON due to VM_PFNMAP restrictions, causing kernel crashes. The fix involves detecting vmalloc addresses and setting VM_MIXEDMAP in the virtual memory area (VMA) before mapping, ensuring safe mapping and preventing crashes. The allocated memory remains driver-controlled and is not accessible directly by userspace.

Impact Analysis

This vulnerability can cause kernel crashes when certain memory mappings are performed without proper flags, potentially leading to system instability or denial of service. However, it does not allow direct user access to the allocated memory, so it primarily impacts system reliability rather than confidentiality or integrity.

Mitigation Strategies

Apply the patch or update to a Linux kernel version that includes the fix for this vulnerability. The fix involves checking for vmalloc addresses and setting VM_MIXEDMAP in the VMA before mapping to avoid kernel crashes when IOMMU is enabled. Ensuring your system is running the updated kernel will mitigate this issue.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2025-40311. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart