CVE-2025-39881
NoneCVSS
—
EPSS
0.2%
Published
Sep 23, 2025
CISA due date
—
Cloudanix analysis
A flaw in Linux kernel file handling for system pressure monitoring can let local attackers crash machines or potentially run code with higher privileges.
- Exploitation
- Local Privilege
- Attacker needs
- Local User
- Complexity
- Moderate
- Impact
- Privilege Gain
- Component
- OS kernel
- Class
- Use After Free
- Remediation
- Patch
- Effort
- Medium
- Patch risk
- Low
What it actually does
Use-after-free in psi_trigger_poll when an open kernfs file for cgroup pressure monitoring is released via kernfs_drain_open_files while epoll still holds a reference, allowing access to freed of->priv on subsequent poll operations.
Why it matters to the business
Linux systems using PSI monitoring in cgroups may experience kernel instability, crashes, or local privilege escalation; high prevalence in container and server environments increases operational risk and patch urgency despite low observed exploitation.
How an attack unfolds
An attacker opens a cpu.pressure file, attaches epoll monitoring, then issues echo 0 followed by echo 1 to cgroup.pressure to trigger the release path while the poll path still executes, dereferencing freed memory; listed threat actors such as VMSCAPE and related container privilege-escalation campaigns demonstrate similar kernel race patterns.
How to fix it
Upgrade the Linux kernel to commit 34d9cafd469c69ad85e6a36b4303c78382cf5c79 or later stable releases containing the kernfs_get_active_of fix; apply vendor kernels that backport the change and restart affected workloads.
How to confirm the fix worked
Confirm kernel version contains the fix commit; attempt the documented reproduction sequence (open pressure file, epoll, disable/enable writes) under KASAN or with lockdep enabled to verify absence of UAF; monitor for removal of the slab-use-after-free stack trace.
Typical attack path
- Open cgroup pressure file and establish epoll watch
- Disable monitoring via write to cgroup.pressure
- Re-enable monitoring to race with drain and poll paths
- Trigger UAF read in psi_trigger_poll during kernfs_fop_poll
- Leverage freed object for kernel memory corruption or DoS
How to detect it
Search kernel logs for KASAN slab-use-after-free reports referencing psi_trigger_poll, cgroup_pressure_poll, or kernfs_fop_poll; inspect audit logs for sequences of open/write/close on cgroup.pressure files followed by epoll activity; correlate with process creation around systemd or container init tasks.
What your security team should do
- Prioritize kernel updates on container hosts and systems exposing cgroup pressure files
- Restrict unprivileged access to cgroup.pressure interfaces via mount options or namespaces
- Enable kernel hardening features such as KASAN in test environments and monitor for related races
- Review container runtime configurations to limit PSI monitoring exposure
The record
In the Linux kernel, the following vulnerability has been resolved: kernfs: Fix UAF in polling when open file is released A use-after-free (UAF) vulnerability was identified in the PSI (Pressure Stall Information) monitoring mechanism: BUG: KASAN: slab-use-after-free in psi_trigger_poll+0x3c/0x140 Read of size 8 at addr ffff3de3d50bd308 by task systemd/1 psi_trigger_poll+0x3c/0x140 cgroup_pressure_poll+0x70/0xa0 cgroup_file_poll+0x8c/0x100 kernfs_fop_poll+0x11c/0x1c0 ep_item_poll.isra.0+0x188/0x2c0 Allocated by task 1: cgroup_file_open+0x88/0x388 kernfs_fop_open+0x73c/0xaf0 do_dentry_open+0x5fc/0x1200 vfs_open+0xa0/0x3f0 do_open+0x7e8/0xd08 path_openat+0x2fc/0x6b0 do_filp_open+0x174/0x368 Freed by task 8462: cgroup_file_release+0x130/0x1f8 kernfs_drain_open_files+0x17c/0x440 kernfs_drain+0x2dc/0x360 kernfs_show+0x1b8/0x288 cgroup_file_show+0x150/0x268 cgroup_pressure_write+0x1dc/0x340 cgroup_file_write+0x274/0x548 Reproduction Steps: 1. Open test/cpu.pressure and establish epoll monitoring 2. Disable monitoring: echo 0 > test/cgroup.pressure 3. Re-enable monitoring: echo 1 > test/cgroup.pressure The race condition occurs because: 1. When cgroup.pressure is disabled (echo 0 > cgroup.pressure), it: - Releases PSI triggers via cgroup_file_release() - Frees of->priv through kernfs_drain_open_files() 2. While epoll still holds reference to the file and continues polling 3. Re-enabling (echo 1 > cgroup.pressure) accesses freed of->priv epolling disable/enable cgroup.pressure fd=open(cpu.pressure) while(1) ... epoll_wait kernfs_fop_poll kernfs_get_active = true echo 0 > cgroup.pressure ... cgroup_file_show kernfs_show // inactive kn kernfs_drain_open_files cft->release(of); kfree(ctx); ... kernfs_get_active = false echo 1 > cgroup.pressure kernfs_show kernfs_activate_one(kn); kernfs_fop_poll kernfs_get_active = true cgroup_file_poll psi_trigger_poll // UAF ... end: close(fd) To address this issue, introduce kernfs_get_active_of() for kernfs open files to obtain active references. This function will fail if the open file has been released. Replace kernfs_get_active() with kernfs_get_active_of() to prevent further operations on released file descriptors.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| AlmaLinux:10 | kernel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-devel-matched | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-debug-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-devel-matched | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-64k-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-abi-stablelists | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-cross-headers | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-devel-matched | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-debug-uki-virt | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-devel-matched | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-doc | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-headers | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-debug-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-64k-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-kvm | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-debug-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-kvm | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-rt-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-tools | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-tools-libs | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-tools-libs-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-uki-virt | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-uki-virt-addons | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-devel | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-devel-matched | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules-core | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | kernel-zfcpdump-modules-extra | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | libperf | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | perf | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | python3-perf | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | rtla | 0 | 6.12.0-55.42.1.el10_0 |
| AlmaLinux:10 | rv | 0 | 6.12.0-55.42.1.el10_0 |
| Debian:12 | linux | 0 | 6.1.153-1 |
| Debian:13 | linux | 0 | 6.12.48-1 |
| Debian:14 | linux | 0 | No fix |
| Linux | Kernel | 6.1.0 | 6.1.153 |
| Mageia:9 | kernel | 0 | 6.6.116-1.mga9 |
| Mageia:9 | kernel-linus | 0 | 6.6.116-1.mga9 |
| Mageia:9 | kmod-virtualbox | 0 | 7.1.14-13.mga9 |
| Mageia:9 | kmod-xtables-addons | 0 | 3.24-87.mga9 |
| SUSE:Linux Enterprise High Availability Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise High Availability Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6-RT_Update_17 | 0 | 1-150600.1.3.1 |
| SUSE:Linux Enterprise Live Patching 15 SP6 | kernel-livepatch-SLE15-SP6_Update_17 | 0 | 1-150600.13.5.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Live Patching 15 SP7 | kernel-livepatch-SLE15-SP7_Update_6 | 0 | 1-150700.15.3.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-64kb | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-default-base | 0 | 6.4.0-150600.23.78.1.150600.12.34.2 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-64kb | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-default-base | 0 | 6.4.0-150700.53.22.1.150700.17.15.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Basesystem 15 SP7 | kernel-zfcpdump | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-docs | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-obs-build | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP6 | kernel-syms | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-docs | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-obs-build | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-source | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Development Tools 15 SP7 | kernel-syms | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Module for Legacy 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-source-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP6 | kernel-syms-azure | 0 | 6.4.0-150600.8.55.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-source-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Module for Public Cloud 15 SP7 | kernel-syms-azure | 0 | 6.4.0-150700.20.18.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| SUSE:Linux Enterprise Workstation Extension 15 SP7 | kernel-default | 0 | 6.4.0-150700.53.22.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-rt_debug | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-source-rt | 0 | 6.4.0-150600.10.58.1 |
| SUSE:Real Time Module 15 SP6 | kernel-syms-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | dtb-aarch64 | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-64kb | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-debug | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-default | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-default-base | 0 | 6.4.0-150600.23.78.1.150600.12.34.2 |
| openSUSE:Leap 15.6 | kernel-docs | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-kvmsmall | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-obs-build | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-obs-qa | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-rt_debug | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-source | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-source-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-source-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-syms | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 15.6 | kernel-syms-azure | 0 | 6.4.0-150600.8.55.1 |
| openSUSE:Leap 15.6 | kernel-syms-rt | 0 | 6.4.0-150600.10.58.1 |
| openSUSE:Leap 15.6 | kernel-zfcpdump | 0 | 6.4.0-150600.23.78.1 |
| openSUSE:Leap 16.0 | dtb-aarch64 | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-64kb | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-default-base | 0 | 6.12.0-160000.6.1.160000.2.4 |
| openSUSE:Leap 16.0 | kernel-docs | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-kvmsmall | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-build | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-obs-qa | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-rt | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-source | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-syms | 0 | 6.12.0-160000.7.1 |
| openSUSE:Leap 16.0 | kernel-zfcpdump | 0 | 6.12.0-160000.7.1 |
Related vulnerabilities
- CVE-2025-68285 In the Linux kernel, the following vulnerability has been resolved: libceph: fix… Also affects kernel
- CVE-2025-68287 In the Linux kernel, the following vulnerability has been resolved: usb: dwc3: Fix race… Also affects kernel
- CVE-2025-40277 In the Linux kernel, the following vulnerability has been resolved: drm/vmwgfx: Validate… Also affects kernel
- CVE-2025-40240 In the Linux kernel, the following vulnerability has been resolved: sctp: avoid NULL… Also affects kernel
- CVE-2025-40185 In the Linux kernel, the following vulnerability has been resolved: ice: ice_adapter… Also affects kernel
- CVE-2025-40176 In the Linux kernel, the following vulnerability has been resolved: tls: wait for pending… Also affects kernel
- CVE-2025-40058 In the Linux kernel, the following vulnerability has been resolved: iommu/vt-d: Disallow… Also affects kernel
- CVE-2025-40047 In the Linux kernel, the following vulnerability has been resolved: io_uring/waitid… Also affects kernel