CVE-2025-40311
accel/habanalabs: support mapping cb with vmalloc-backed coherent memory
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.
INFO
Published Date :
Dec. 8, 2025, 1:16 a.m.
Last Modified :
Oct. 30, 2026, 1:18 p.m.
Remotely Exploit :
No
Source :
416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
- Check for vmalloc addresses.
- Set VM_MIXEDMAP in VMA before mapping.
- Ensure safe mapping to avoid crashes.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2025-40311.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2025-40311 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2025-40311
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2025-40311 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2025-40311 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Oct. 30, 2026
Action Type Old Value New Value Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2025/40xxx/CVE-2025-40311.json">CVE-2025-40311</a> Added Reference https://git.kernel.org/stable/c/513024d5a0e34fd34247043f1876b6138ca52847 Added Reference https://git.kernel.org/stable/c/73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9 Added Reference https://git.kernel.org/stable/c/7ec8ac9f73d4a9438c2186768d6de27ace37531e Added Reference https://git.kernel.org/stable/c/8de421db5b1b2b37e9643ea7f6ade90fd756892d Added Reference https://git.kernel.org/stable/c/d1dfe21a332d38a6a09658ec29a55940afb5fe36 Removed Reference https://git.kernel.org/stable/c/513024d5a0e34fd34247043f1876b6138ca52847 Removed Reference https://git.kernel.org/stable/c/73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9 Removed Reference https://git.kernel.org/stable/c/7ec8ac9f73d4a9438c2186768d6de27ace37531e Removed Reference https://git.kernel.org/stable/c/d1dfe21a332d38a6a09658ec29a55940afb5fe36 -
CVE Translated by [email protected]
Oct. 14, 2026
Action Type Old Value New Value Added Translation Title: Linux, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: accel/habanalabs: soporte para mapear cb con memoria coherente respaldada por vmalloc Cuando IOMMU está habilitado, dma_alloc_coherent() con GFP_USER puede devolver direcciones del rango de vmalloc. Si dicha dirección se mapea sin VM_MIXEDMAP, vm_insert_page() activará un BUG_ON debido a la restricción de VM_PFNMAP. Solucione esto verificando las direcciones de vmalloc y configurando VM_MIXEDMAP en el VMA antes del mapeo. Esto asegura un mapeo seguro y evita fallos del kernel. La memoria sigue siendo asignada por el controlador y no puede ser accedida directamente por el espacio de usuario. -
CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Jun. 17, 2026
Action Type Old Value New Value Added Affected [{'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': 'ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399', 'lessThan': '7ec8ac9f73d4a9438c2186768d6de27ace37531e', 'versionType': 'git'}, {'status': 'affected', 'version': 'ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399', 'lessThan': 'd1dfe21a332d38a6a09658ec29a55940afb5fe36', 'versionType': 'git'}, {'status': 'affected', 'version': 'ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399', 'lessThan': '73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9', 'versionType': 'git'}, {'status': 'affected', 'version': 'ac0ae6a96aa58eeba4aed97b12ef1dea8c5bf399', 'lessThan': '513024d5a0e34fd34247043f1876b6138ca52847', 'versionType': 'git'}], 'programFiles': ['drivers/accel/habanalabs/gaudi/gaudi.c', 'drivers/accel/habanalabs/gaudi2/gaudi2.c'], 'defaultStatus': 'unaffected'}, {'repo': 'https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git', 'vendor': 'Linux', 'product': 'Linux', 'versions': [{'status': 'affected', 'version': '5.8'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.8', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.6.117', 'versionType': 'semver', 'lessThanOrEqual': '6.6.*'}, {'status': 'unaffected', 'version': '6.12.58', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.17.8', 'versionType': 'semver', 'lessThanOrEqual': '6.17.*'}, {'status': 'unaffected', 'version': '6.18', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/accel/habanalabs/gaudi/gaudi.c', 'drivers/accel/habanalabs/gaudi2/gaudi2.c'], 'defaultStatus': 'affected'}] -
New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Dec. 08, 2025
Action Type Old Value New Value Added 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. Added Reference https://git.kernel.org/stable/c/513024d5a0e34fd34247043f1876b6138ca52847 Added Reference https://git.kernel.org/stable/c/73c7c2cdb442fc4160d2a2a4bfffbd162af06cb9 Added Reference https://git.kernel.org/stable/c/7ec8ac9f73d4a9438c2186768d6de27ace37531e Added Reference https://git.kernel.org/stable/c/d1dfe21a332d38a6a09658ec29a55940afb5fe36