CVE-2025-39881 json
kernfs: Fix UAF in polling when open file is released
published last yr. modified 21d ago also EUVD-2025-30850
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 4%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 6.1.153, 6.6.107, 6.12.48, 6.16.8, 6.17
- linux Debian 12 6.1.153-1
- linux Debian 13 6.12.48-1
- linux Debian 14 6.16.8-1
debian advisories DEBIAN-CVE-2025-39881
- linux Ubuntu 24.04 LTS 6.8.0-106.106
- linux-aws Ubuntu 24.04 LTS 6.8.0-1050.53
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1052.55
- linux-gke Ubuntu 24.04 LTS 6.8.0-1048.53
- linux-ibm Ubuntu 24.04 LTS 6.8.0-1049.49
- linux-azure Ubuntu 24.04 LTS 6.8.0-1051.57
- linux-gkeop Ubuntu 24.04 LTS 6.8.0-1035.38
- linux-raspi Ubuntu 24.04 LTS 6.8.0-1050.54
ubuntu advisories UBUNTU-CVE-2025-39881
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel RHEL 9 5.14.0-611.8.1.el9_7
- rv RHEL 9 5.14.0-611.8.1.el9_7
- perf RHEL 9 5.14.0-611.8.1.el9_7
- rtla RHEL 9 5.14.0-611.8.1.el9_7
- libperf RHEL 9 5.14.0-611.8.1.el9_7
- kernel-rt RHEL 9 5.14.0-611.8.1.el9_7
- kernel-64k RHEL 9 5.14.0-611.8.1.el9_7
- kernel-core RHEL 9 5.14.0-611.8.1.el9_7
red hat advisories RHSA-2025:22392RHSA-2025:21469RHSA-2025:21118RHSA-2025:19469
- kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
- kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
- kernel-rt_debug Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
- kernel-source-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.58.1
- kernel-rt Linux Micro 6.2 6.12.0-160000.7.1
- kernel-64kb SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.7.1
- kernel-source SLES 16.0, Linux Micro 6.2, SLES for SAP applications 16.0 6.12.0-160000.7.1
- kernel-default SLES 16.0, SLE High Availability Extension 16.0, Linux Micro 6.2 +1 more 6.12.0-160000.7.1
suse advisories SUSE-SU-2025:4301-1SUSE-SU-2025:21080-1SUSE-SU-2025:21147-1SUSE-SU-2025:21180-1SUSE-SU-2026:20561-1SUSE-SU-2025:21052-1
- kernel-rt openSUSE Leap 16.0 6.12.0-160000.7.1
- dtb-aarch64 openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-64kb openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-syms openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-obs-qa openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-source openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-default openSUSE Leap 16.0 6.12.0-160000.7.1
- kernel-kvmsmall openSUSE Leap 16.0 6.12.0-160000.7.1
opensuse advisories openSUSE-SU-2025:20091-1
- kernel-abi-stablelists AlmaLinux 10 6.12.0-55.42.1.el10_0
almalinux advisories ALSA-2025:19469
- git.kernel.org/stable/c/34d9cafd469c69ad85e6a36b4303c78382cf5c79 commit
- git.kernel.org/stable/c/854baafc00c433cccbe0ab4231b77aeb9b637b77 commit
- git.kernel.org/stable/c/7e64474aba78d240f7804f48f2d454dcca78b15f commit
- git.kernel.org/stable/c/ac5cda4fae8818cf1963317bb699f7f2f85b60af commit
- git.kernel.org/stable/c/3c9ba2777d6c86025e1ba4186dc5cd930e40ec5f commit
Is CVE-2025-39881 in your stack? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerVendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-39881 updated cvss 7.3
kernel: kernfs: Fix UAF in polling when open file is released
-
Red Hat CodeReady Linux Builder EUS (v.9.6) libperf 5.14.0-570.69.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.69.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.69.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.69.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.69.1.el9_6fixed: vendor fix RHSA-2025:22392
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-611.8.1.el9_7, perf 5.14.0-611.8.1.el9_7, rtla 5.14.0-611.8.1.el9_7, python3-perf 5.14.0-611.8.1.el9_7, kernel-devel-matched 5.14.0-611.8.1.el9_7, kernel-64k-devel-matched 5.14.0-611.8.1.el9_7, +7 morefixed: vendor fix RHSA-2025:21469
-
Red Hat Enterprise Linux AppStream (v. 10) rv 6.12.0-124.9.1.el10_1, rv 6.12.0-55.42.1.el10_0, perf 6.12.0-124.9.1.el10_1, perf 6.12.0-55.42.1.el10_0, rtla 6.12.0-124.9.1.el10_1, rtla 6.12.0-55.42.1.el10_0, +20 morefixed: vendor fix RHSA-2025:19469
-
Red Hat Enterprise Linux AppStream EUS (v.9.6) rv 5.14.0-570.69.1.el9_6, perf 5.14.0-570.69.1.el9_6, rtla 5.14.0-570.69.1.el9_6, python3-perf 5.14.0-570.69.1.el9_6, kernel-devel-matched 5.14.0-570.69.1.el9_6, kernel-64k-devel-matched 5.14.0-570.69.1.el9_6, +7 morefixed: vendor fix RHSA-2025:22392
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-611.8.1.el9_7, kernel-64k 5.14.0-611.8.1.el9_7, kernel-core 5.14.0-611.8.1.el9_7, kernel-tools 5.14.0-611.8.1.el9_7, kernel-modules 5.14.0-611.8.1.el9_7, kernel-64k-core 5.14.0-611.8.1.el9_7, +27 morefixed: vendor fix RHSA-2025:21469
-
Red Hat Enterprise Linux BaseOS (v. 10) kernel 6.12.0-124.9.1.el10_1, kernel 6.12.0-55.42.1.el10_0, kernel-64k 6.12.0-124.9.1.el10_1, kernel-64k 6.12.0-55.42.1.el10_0, kernel-core 6.12.0-124.9.1.el10_1, kernel-core 6.12.0-55.42.1.el10_0, +61 morefixed: vendor fix RHSA-2025:19469
-
Red Hat Enterprise Linux BaseOS EUS (v.9.6) kernel 5.14.0-570.69.1.el9_6, kernel-64k 5.14.0-570.69.1.el9_6, kernel-core 5.14.0-570.69.1.el9_6, kernel-tools 5.14.0-570.69.1.el9_6, kernel-modules 5.14.0-570.69.1.el9_6, kernel-64k-core 5.14.0-570.69.1.el9_6, +27 morefixed: vendor fix RHSA-2025:22392
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-611.8.1.el9_7, kernel-debuginfo-common-s390x 5.14.0-611.8.1.el9_7, kernel-debuginfo-common-x86_64 5.14.0-611.8.1.el9_7, kernel-debuginfo-common-aarch64 5.14.0-611.8.1.el9_7, kernel-debuginfo-common-ppc64le 5.14.0-611.8.1.el9_7fixed: vendor fix RHSA-2025:21469
show 8 moreshow fewer
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) libperf 6.12.0-124.9.1.el10_1, libperf 6.12.0-55.42.1.el10_0, kernel-debuginfo-common-s390x 6.12.0-124.9.1.el10_1, kernel-debuginfo-common-s390x 6.12.0-55.42.1.el10_0, kernel-debuginfo-common-x86_64 6.12.0-124.9.1.el10_1, kernel-debuginfo-common-x86_64 6.12.0-55.42.1.el10_0, +4 morefixed: vendor fix RHSA-2025:19469
-
Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-611.8.1.el9_7, kernel-rt-64k 5.14.0-611.8.1.el9_7, kernel-rt-core 5.14.0-611.8.1.el9_7, kernel-rt-modules 5.14.0-611.8.1.el9_7, kernel-rt-64k-core 5.14.0-611.8.1.el9_7, kernel-rt-debug-core 5.14.0-611.8.1.el9_7, +14 morefixed: vendor fix RHSA-2025:21469
-
Red Hat Enterprise Linux Real Time (v. 10) kernel-rt 6.12.0-124.9.1.el10_1, kernel-rt 6.12.0-55.42.1.el10_0, kernel-rt-64k 6.12.0-124.9.1.el10_1, kernel-rt-64k 6.12.0-55.42.1.el10_0, kernel-rt-core 6.12.0-124.9.1.el10_1, kernel-rt-core 6.12.0-55.42.1.el10_0, +34 morefixed: vendor fix RHSA-2025:19469
-
Red Hat Enterprise Linux Real Time EUS (v.9.6) kernel-rt 5.14.0-570.69.1.el9_6, kernel-rt-64k 5.14.0-570.69.1.el9_6, kernel-rt-core 5.14.0-570.69.1.el9_6, kernel-rt-modules 5.14.0-570.69.1.el9_6, kernel-rt-64k-core 5.14.0-570.69.1.el9_6, kernel-rt-debug-core 5.14.0-570.69.1.el9_6, +14 morefixed: vendor fix RHSA-2025:22392
-
Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-611.8.1.el9_7, kernel-rt-core 5.14.0-611.8.1.el9_7, kernel-rt-modules 5.14.0-611.8.1.el9_7, kernel-rt-debug-core 5.14.0-611.8.1.el9_7, kernel-rt-modules-core 5.14.0-611.8.1.el9_7, kernel-rt-debug-modules 5.14.0-611.8.1.el9_7, +4 morefixed: vendor fix RHSA-2025:21469
-
Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt 6.12.0-124.9.1.el10_1, kernel-rt 6.12.0-55.42.1.el10_0, kernel-rt-kvm 6.12.0-55.42.1.el10_0, kernel-rt-core 6.12.0-124.9.1.el10_1, kernel-rt-core 6.12.0-55.42.1.el10_0, kernel-rt-modules 6.12.0-124.9.1.el10_1, +16 morefixed: vendor fix RHSA-2025:19469
-
Red Hat Enterprise Linux Real Time for NFV EUS (v.9.6) kernel-rt 5.14.0-570.69.1.el9_6, kernel-rt-kvm 5.14.0-570.69.1.el9_6, kernel-rt-core 5.14.0-570.69.1.el9_6, kernel-rt-modules 5.14.0-570.69.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.69.1.el9_6, kernel-rt-debug-core 5.14.0-570.69.1.el9_6, +6 morefixed: vendor fix RHSA-2025:22392
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 more Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 kernel-rt, kernel-rt-kvm, kernel-rt-core, kernel-rt-modules, kernel-rt-debug-kvm, kernel-rt-debug-core, +12 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
0.15% chance of exploitation in the next 30 days, higher than 4% of all scored CVEs (FIRST EPSS, 2026-11-09).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
Affected products
- Linux Linux
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/34d9cafd469c69ad85e6a36b4303c78382cf5c79
patch
-
git.kernel.org
/stable/c/854baafc00c433cccbe0ab4231b77aeb9b637b77
patch
-
git.kernel.org
/stable/c/7e64474aba78d240f7804f48f2d454dcca78b15f
patch
-
git.kernel.org
/stable/c/ac5cda4fae8818cf1963317bb699f7f2f85b60af
patch
-
git.kernel.org
/stable/c/3c9ba2777d6c86025e1ba4186dc5cd930e40ec5f
patch
-
lists.debian.org
/debian-lts-announce/2025/10/msg00008.html
third-party-advisory
Sources
- CVE List CVE-2025-39881
- NVD CVE-2025-39881
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.