# CVE-2025-39966: iommufd: Fix race during abort for file descriptors

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.11% (percentile 2, 2026-12-01)
- **CWE:** CWE-362
- **Published:** 2025-10-15T07:55:50.843Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 17195a7d754a5c6a31888702ca93f6f08f3383ad; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< e4825368285e33d6360c6c6a6a10d2d83da06e55; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 4e034bf045b12852a24d5d33f2451850818ba0c1
- Anyone running Linux 6.11

## Description

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

iommufd: Fix race during abort for file descriptors

fput() doesn't actually call file\_operations release() synchronously, it
puts the file on a work queue and it will be released eventually.

This is normally fine, except for iommufd the file and the iommufd\_object
are tied to gether. The file has the object as it's private\_data and holds
a users refcount, while the object is expected to remain alive as long as
the file is.

When the allocation of a new object aborts before installing the file it
will fput() the file and then go on to immediately kfree() the obj. This
causes a UAF once the workqueue completes the fput() and tries to
decrement the users refcount.

Fix this by putting the core code in charge of the file lifetime, and call
\_\_fput\_sync() during abort to ensure that release() is called before
kfree. \_\_fput\_sync() is a bit too tricky to open code in all the object
implementations. Instead the objects tell the core code where the file
pointer is and the core will take care of the life cycle.

If the object is successfully allocated then the file will hold a users
refcount and the iommufd\_object cannot be destroyed.

It is worth noting that close(); ioctl(IOMMU\_DESTROY); doesn't have an
issue because close() is already using a synchronous version of fput().

The UAF looks like this:

    BUG: KASAN: slab-use-after-free in iommufd\_eventq\_fops\_release+0x45/0xc0 drivers/iommu/iommufd/eventq.c:376
    Write of size 4 at addr ffff888059c97804 by task syz.0.46/6164

    CPU: 0 UID: 0 PID: 6164 Comm: syz.0.46 Not tainted syzkaller \#0 PREEMPT(full)
    Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025
    Call Trace:
     \<TASK\>
     \_\_dump\_stack lib/dump\_stack.c:94 \[inline\]
     dump\_stack\_lvl+0x116/0x1f0 lib/dump\_stack.c:120
     print\_address\_description mm/kasan/report.c:378 \[inline\]
     print\_report+0xcd/0x630 mm/kasan/report.c:482
     kasan\_report+0xe0/0x110 mm/kasan/report.c:595
     check\_region\_inline mm/kasan/generic.c:183 \[inline\]
     kasan\_check\_range+0x100/0x1b0 mm/kasan/generic.c:189
     instrument\_atomic\_read\_write include/linux/instrumented.h:96 \[inline\]
     atomic\_fetch\_sub\_release include/linux/atomic/atomic-instrumented.h:400 \[inline\]
     \_\_refcount\_dec include/linux/refcount.h:455 \[inline\]
     refcount\_dec include/linux/refcount.h:476 \[inline\]
     iommufd\_eventq\_fops\_release+0x45/0xc0 drivers/iommu/iommufd/eventq.c:376
     \_\_fput+0x402/0xb70 fs/file\_table.c:468
     task\_work\_run+0x14d/0x240 kernel/task\_work.c:227
     resume\_user\_mode\_work include/linux/resume\_user\_mode.h:50 \[inline\]
     exit\_to\_user\_mode\_loop+0xeb/0x110 kernel/entry/common.c:43
     exit\_to\_user\_mode\_prepare include/linux/irq-entry-common.h:225 \[inline\]
     syscall\_exit\_to\_user\_mode\_work include/linux/entry-common.h:175 \[inline\]
     syscall\_exit\_to\_user\_mode include/linux/entry-common.h:210 \[inline\]
     do\_syscall\_64+0x41c/0x4c0 arch/x86/entry/syscall\_64.c:100
     entry\_SYSCALL\_64\_after\_hwframe+0x77/0x7f

## Affected and fixed versions

- Linux: \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 17195a7d754a5c6a31888702ca93f6f08f3383ad; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< e4825368285e33d6360c6c6a6a10d2d83da06e55; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 4e034bf045b12852a24d5d33f2451850818ba0c1 (cvelist)
- Linux: 6.11 (cvelist)

## Mitigation

- Upgrade Linux to 4e034bf045b12852a24d5d33f2451850818ba0c1 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-39966. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-39966.md
Affected: Linux >= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, < 17195a7d754a5c6a31888702ca93f6f08f3383ad; >= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, < e4825368285e33d6360c6c6a6a10d2d83da06e55; >= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, < 4e034bf045b12852a24d5d33f2451850818ba0c1; Linux 6.11
Fixed in: Linux 17195a7d754a5c6a31888702ca93f6f08f3383ad, Linux 4e034bf045b12852a24d5d33f2451850818ba0c1

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-39966 being exploited?

There is no confirmed exploitation: CVE-2025-39966 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.11% chance of exploitation in the next 30 days (as of 2026-12-01).

### How serious is CVE-2025-39966?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-39966?

Linux \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 17195a7d754a5c6a31888702ca93f6f08f3383ad; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< e4825368285e33d6360c6c6a6a10d2d83da06e55; \>= 07838f7fd529c8a6de44b601d4b7057e6c8d36ed, \< 4e034bf045b12852a24d5d33f2451850818ba0c1; Linux 6.11.

### Is there a fix for CVE-2025-39966?

Yes. Fixed in Linux 17195a7d754a5c6a31888702ca93f6f08f3383ad, Linux 4e034bf045b12852a24d5d33f2451850818ba0c1. Upgrade Linux to 4e034bf045b12852a24d5d33f2451850818ba0c1 or later.

### How do I check if I'm affected by CVE-2025-39966?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/17195a7d754a5c6a31888702ca93f6f08f3383ad>
- patch: <https://git.kernel.org/stable/c/e4825368285e33d6360c6c6a6a10d2d83da06e55>
- patch: <https://git.kernel.org/stable/c/4e034bf045b12852a24d5d33f2451850818ba0c1>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-39966>

HTML: <https://flawdb.com/CVE-2025-39966> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-39966>
