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

> A race condition in the Linux kernel iommufd subsystem allows a use-after-free, potentially enabling local attackers to execute code or escalate privileges.

- **Severity:** High 7.8 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **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:** Yes
- **Published:** 15 Oct 2025
- **Updated:** 5 Aug 2026
- **Also known as:** BELL-CVE-2025-39966, DEBIAN-CVE-2025-39966, GHSA-jrgc-8xmv-4r2m, RHSA-2025:22802, ROOT-OS-DEBIAN-13-CVE-2025-39966, UBUNTU-CVE-2025-39966

## What is CVE-2025-39966?

CVE-2025-39966 is a high-severity use after free vulnerability in Linux kernel, published on 15 Oct 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:

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

Weakness: CWE-362 (Concurrent Execution using Shared Resource with Improper Synchronization)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `kernel-64k-debug-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-devel` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-devel-matched` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-devel` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-devel-matched` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debug-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debug-devel` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debug-devel-matched` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debuginfo-common-aarch64` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debuginfo-common-ppc64le` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debuginfo-common-s390x` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-debuginfo-common-x86_64` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-devel` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-devel-matched` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-doc` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-rt-64k-debug-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-rt-64k-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-rt-debug-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-rt-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-tools-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-zfcpdump-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-zfcpdump-devel` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-zfcpdump-devel-matched` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `libperf-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `perf` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `perf-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `python3-perf` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `python3-perf-debuginfo` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `rtla` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `rv` | Red Hat:rhel_eus:9.6::appstream | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-core` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-core` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-debuginfo` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-modules` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |
| `kernel-64k-debug-modules-core` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:5.14.0-570.72.1.el9_6 |

Products: Linux kernel.

## How do I fix CVE-2025-39966?

Apply the vendor's patch.

## Is CVE-2025-39966 being exploited?

There is no known exploitation of CVE-2025-39966 in the wild and no public exploit code.

## Other vulnerabilities in Linux kernel

- [CVE-2026-53266](https://insights.sbomify.com/CVE-2026-53266/): Linux Kernel Out-of-Bounds Write (high 8.8, exploited in the wild)
- [CVE-2013-6282](https://insights.sbomify.com/CVE-2013-6282/): Linux Kernel Improper Input Validation (high 8.8, exploited in the wild)
- [CVE-2022-0185](https://insights.sbomify.com/CVE-2022-0185/): Linux Kernel Heap-Based Buffer Overflow (high 8.4, exploited in the wild)
- [CVE-2013-2094](https://insights.sbomify.com/CVE-2013-2094/): Linux Kernel Privilege Escalation (high 8.4, exploited in the wild)
- [CVE-2026-53362](https://insights.sbomify.com/CVE-2026-53362/): Linux Kernel Unspecified (high 7.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2025-39966 and fix it if it is affected.

What it is: CVE-2025-39966 is a high-severity use after free vulnerability in Linux kernel, published on 15 Oct 2025. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2025-39966 in the wild and no public exploit code.

Affected product: Linux kernel. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2025-39966/ (Markdown: https://insights.sbomify.com/CVE-2025-39966/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2025-39966
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2025-39966
- OSV: https://osv.dev/vulnerability/CVE-2025-39966

---
From sbomify Insights: https://insights.sbomify.com/CVE-2025-39966/
Summaries are generated and may contain mistakes; the official description above is the record.
