7.8
HIGH CVSS 3.1
CVE-2025-38722
habanalabs: fix UAF in export_dmabuf()
Description

In the Linux kernel, the following vulnerability has been resolved: habanalabs: fix UAF in export_dmabuf() As soon as we'd inserted a file reference into descriptor table, another thread could close it. That's fine for the case when all we are doing is returning that descriptor to userland (it's a race, but it's a userland race and there's nothing the kernel can do about it). However, if we follow fd_install() with any kind of access to objects that would be destroyed on close (be it the struct file itself or anything destroyed by its ->release()), we have a UAF. dma_buf_fd() is a combination of reserving a descriptor and fd_install(). habanalabs export_dmabuf() calls it and then proceeds to access the objects destroyed on close. In particular, it grabs an extra reference to another struct file that will be dropped as part of ->release() for ours; that "will be" is actually "might have already been". Fix that by reserving descriptor before anything else and do fd_install() only when everything had been set up. As a side benefit, we no longer have the failure exit with file already created, but reference to underlying file (as well as ->dmabuf_export_cnt, etc.) not grabbed yet; unlike dma_buf_fd(), fd_install() can't fail.

INFO

Published Date :

Sept. 4, 2025, 4:15 p.m.

Last Modified :

Oct. 30, 2026, 1:18 p.m.

Remotely Exploit :

No

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67
Affected Products

The following products are affected by CVE-2025-38722 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 HIGH [email protected]
CVSS 3.1 HIGH 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Solution
Resolve use-after-free by reserving descriptor before setup.
  • Reserve descriptor before any other operations.
  • Perform fd_install only after setup is complete.
  • Apply the provided patch to the Linux kernel.
  • Update the Linux kernel to the latest version.
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-38722 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-38722 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-38722 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2025-38722 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/38xxx/CVE-2025-38722.json">CVE-2025-38722</a>
    Added Reference https://git.kernel.org/stable/c/5b0c23e9ec3e161a893d6ff9b4fad479e4539627
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Oct. 21, 2026

    Action Type Old Value New Value
    Added Affected Affected value modified. <a href="https://github.com/CVEProject/cvelistV5/blob/main/cves/2025/38xxx/CVE-2025-38722.json">CVE-2025-38722</a>
    Added Reference https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c
    Added Reference https://git.kernel.org/stable/c/40deceb38f9db759772d1c289c28fd2a543f57fc
    Added Reference https://git.kernel.org/stable/c/55c232d7e0241f1d5120b595e7a9de24c75ed3d8
    Added Reference https://git.kernel.org/stable/c/c07886761fd6251db6938d4e747002e3d150d231
    Added Reference https://git.kernel.org/stable/c/d26058c2349d77d1ef179a2cc9752ca12004b6ff
    Removed Reference https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c
    Removed Reference https://git.kernel.org/stable/c/40deceb38f9db759772d1c289c28fd2a543f57fc
    Removed Reference https://git.kernel.org/stable/c/55c232d7e0241f1d5120b595e7a9de24c75ed3d8
    Removed Reference https://git.kernel.org/stable/c/c07886761fd6251db6938d4e747002e3d150d231
    Removed Reference Type https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/40deceb38f9db759772d1c289c28fd2a543f57fc Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/55c232d7e0241f1d5120b595e7a9de24c75ed3d8 Types: Patch
    Removed Reference Type https://git.kernel.org/stable/c/c07886761fd6251db6938d4e747002e3d150d231 Types: Patch
  • CVE Translated by [email protected]

    Oct. 19, 2026

    Action Type Old Value New Value
    Added Translation Title: Linux, Description: En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: habanalabs: corrige UAF en export_dmabuf() Tan pronto como hubiéramos insertado una referencia de archivo en la tabla de descriptores, otro hilo podría cerrarla. Eso está bien para el caso en que todo lo que estamos haciendo es devolver ese descriptor al espacio de usuario (es una condición de carrera, pero es una condición de carrera del espacio de usuario y no hay nada que el kernel pueda hacer al respecto). Sin embargo, si después de fd_install() seguimos con cualquier tipo de acceso a objetos que serían destruidos al cerrar (ya sea la propia struct file o cualquier cosa destruida por su ->release()), tenemos un UAF. dma_buf_fd() es una combinación de reservar un descriptor y fd_install(). habanalabs export_dmabuf() lo llama y luego procede a acceder a los objetos destruidos al cerrar. En particular, toma una referencia adicional a otra struct file que será liberada como parte de ->release() para la nuestra; ese 'será' es en realidad 'podría haber sido ya'. Corregir eso reservando el descriptor antes que nada y haciendo fd_install() solo cuando todo hubiera sido configurado. Como beneficio adicional, ya no tenemos la salida por fallo con el archivo ya creado, pero la referencia al archivo subyacente (así como ->dmabuf_export_cnt, etc.) aún no tomada; a diferencia de dma_buf_fd(), fd_install() no puede fallar.
  • CVE Modified by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jul. 30, 2026

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • 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': 'db1a8dd916aac986871f6b873a3aefad906f383a', 'lessThan': 'c07886761fd6251db6938d4e747002e3d150d231', 'versionType': 'git'}, {'status': 'affected', 'version': 'db1a8dd916aac986871f6b873a3aefad906f383a', 'lessThan': '40deceb38f9db759772d1c289c28fd2a543f57fc', 'versionType': 'git'}, {'status': 'affected', 'version': 'db1a8dd916aac986871f6b873a3aefad906f383a', 'lessThan': '55c232d7e0241f1d5120b595e7a9de24c75ed3d8', 'versionType': 'git'}, {'status': 'affected', 'version': 'db1a8dd916aac986871f6b873a3aefad906f383a', 'lessThan': '33927f3d0ecdcff06326d6e4edb6166aed42811c', 'versionType': 'git'}], 'programFiles': ['drivers/accel/habanalabs/common/memory.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.16'}, {'status': 'unaffected', 'version': '0', 'lessThan': '5.16', 'versionType': 'semver'}, {'status': 'unaffected', 'version': '6.12.43', 'versionType': 'semver', 'lessThanOrEqual': '6.12.*'}, {'status': 'unaffected', 'version': '6.15.11', 'versionType': 'semver', 'lessThanOrEqual': '6.15.*'}, {'status': 'unaffected', 'version': '6.16.2', 'versionType': 'semver', 'lessThanOrEqual': '6.16.*'}, {'status': 'unaffected', 'version': '6.17', 'versionType': 'original_commit_for_fix', 'lessThanOrEqual': '*'}], 'programFiles': ['drivers/accel/habanalabs/common/memory.c'], 'defaultStatus': 'affected'}]
  • Initial Analysis by [email protected]

    Nov. 25, 2025

    Action Type Old Value New Value
    Added CVSS V3.1 AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
    Added CWE CWE-416
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:6.17:rc1:*:*:*:*:*:* *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.13 up to (excluding) 6.15.11 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.16 up to (excluding) 6.16.2 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.12.43
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/40deceb38f9db759772d1c289c28fd2a543f57fc Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/55c232d7e0241f1d5120b595e7a9de24c75ed3d8 Types: Patch
    Added Reference Type kernel.org: https://git.kernel.org/stable/c/c07886761fd6251db6938d4e747002e3d150d231 Types: Patch
  • New CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Sep. 04, 2025

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: habanalabs: fix UAF in export_dmabuf() As soon as we'd inserted a file reference into descriptor table, another thread could close it. That's fine for the case when all we are doing is returning that descriptor to userland (it's a race, but it's a userland race and there's nothing the kernel can do about it). However, if we follow fd_install() with any kind of access to objects that would be destroyed on close (be it the struct file itself or anything destroyed by its ->release()), we have a UAF. dma_buf_fd() is a combination of reserving a descriptor and fd_install(). habanalabs export_dmabuf() calls it and then proceeds to access the objects destroyed on close. In particular, it grabs an extra reference to another struct file that will be dropped as part of ->release() for ours; that "will be" is actually "might have already been". Fix that by reserving descriptor before anything else and do fd_install() only when everything had been set up. As a side benefit, we no longer have the failure exit with file already created, but reference to underlying file (as well as ->dmabuf_export_cnt, etc.) not grabbed yet; unlike dma_buf_fd(), fd_install() can't fail.
    Added Reference https://git.kernel.org/stable/c/33927f3d0ecdcff06326d6e4edb6166aed42811c
    Added Reference https://git.kernel.org/stable/c/40deceb38f9db759772d1c289c28fd2a543f57fc
    Added Reference https://git.kernel.org/stable/c/55c232d7e0241f1d5120b595e7a9de24c75ed3d8
    Added Reference https://git.kernel.org/stable/c/c07886761fd6251db6938d4e747002e3d150d231
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.