Cloudanix VulnDB

CVE-2025-39966

High · 7.0

CVSS

7.0

EPSS

0.1%

Published

Oct 15, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A timing flaw in the Linux kernel can let a program accidentally access memory that has already been freed, potentially crashing the system or allowing an attacker with local access to take control.

Exploitation
Local Privilege
Attacker needs
Low Privilege
Complexity
High
Impact
Full Compromise
Component
OS kernel
Class
Race Condition
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Race condition during abort of iommufd object allocation allows fput() to complete asynchronously after kfree(), causing use-after-free when release handler decrements refcount on already-freed object.

Why it matters to the business

Linux systems using IOMMUFD may experience kernel crashes, memory corruption, or local privilege escalation; high ecosystem prevalence increases exposure for servers and embedded devices until patched.

How an attack unfolds

Attacker triggers allocation of iommufd object that aborts before file installation, causing fput followed by immediate kfree; later workqueue-driven release attempts to access freed memory leading to UAF.

How to fix it

Update Linux kernel to commit 17195a7d754a5c6a31888702ca93f6f08f3383ad or later; apply vendor patches for affected distributions such as util-linux 2.31.1-9.3.1 where applicable.

How to confirm the fix worked

Verify kernel version contains the fix commit; attempt reproduction of the allocation-abort race under KASAN to confirm absence of slab-use-after-free reports.

Typical attack path

  1. Trigger IOMMUFD object allocation path that aborts before fd installation
  2. Invoke fput on the file while object is still referenced
  3. Immediately kfree the object before asynchronous fput completes
  4. Workqueue executes release handler that dereferences freed memory

How to detect it

Search kernel logs for KASAN slab-use-after-free reports referencing iommufd_eventq_fops_release or refcount_dec in eventq.c; inspect task_work and syscall exit traces for fput-related UAF patterns.

  • iommufd_eventq_fops_release+0x45/0xc0
  • BUG: KASAN: slab-use-after-free
  • atomic_fetch_sub_release.*refcount_dec
  • drivers/iommu/iommufd/eventq.c:376

What your security team should do

  • Prioritize kernel updates on all systems exposing IOMMUFD interfaces
  • Monitor for KASAN or similar memory safety reports in iommufd code paths
  • Restrict untrusted local access to IOMMUFD until patches are deployed

The record

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 packages

Ecosystem Package Introduced Fixed
AlmaLinux:10 kernel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-devel-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-debug-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-devel-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-64k-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-abi-stablelists 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-cross-headers 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-devel-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-debug-uki-virt 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-devel-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-doc 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-headers 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-modules-extra-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-debug-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-64k-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-debug-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-rt-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-tools 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-tools-libs 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-tools-libs-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-uki-virt 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-uki-virt-addons 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-devel 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-devel-matched 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-modules 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-modules-core 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 kernel-zfcpdump-modules-extra 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 libperf 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 perf 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 python3-perf 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 rtla 0 6.12.0-124.27.1.el10_1
AlmaLinux:10 rv 0 6.12.0-124.27.1.el10_1
AlmaLinux:9 kernel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-devel-matched 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-debug-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-devel-matched 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-64k-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-abi-stablelists 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-cross-headers 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-devel-matched 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-debug-uki-virt 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-devel-matched 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-doc 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-headers 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-debug-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-64k-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-debug-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-rt-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-tools 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-tools-libs 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-tools-libs-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-uki-virt 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-uki-virt-addons 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-devel 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-devel-matched 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-modules 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-modules-core 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 kernel-zfcpdump-modules-extra 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 libperf 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 perf 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 python3-perf 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 rtla 0 5.14.0-611.16.1.el9_7
AlmaLinux:9 rv 0 5.14.0-611.16.1.el9_7
Linux Kernel 6.11.0 6.12.50

Related vulnerabilities