CVE-2025-39866 json
fs: writeback: fix use-after-free in __mark_inode_dirty()
published 2025-09-19 13 mo ago modified 2026-10-19 20 d ago also EUVD-2025-30334
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 24%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
fs: writeback: fix use-after-free in __mark_inode_dirty()
An use-after-free issue occurred when __mark_inode_dirty() get the bdi_writeback that was in the progress of switching.
CPU: 1 PID: 562 Comm: systemd-random- Not tainted 6.6.56-gb4403bd46a8e #1 ...... pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __mark_inode_dirty+0x124/0x418 lr : __mark_inode_dirty+0x118/0x418 sp : ffffffc08c9dbbc0 ........ Call trace: __mark_inode_dirty+0x124/0x418 generic_update_time+0x4c/0x60 file_modified+0xcc/0xd0 ext4_buffered_write_iter+0x58/0x124 ext4_file_write_iter+0x54/0x704 vfs_write+0x1c0/0x308 ksys_write+0x74/0x10c __arm64_sys_write+0x1c/0x28 invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0xc0/0xe0 do_el0_svc+0x1c/0x28 el0_svc+0x40/0xe4 el0t_64_sync_handler+0x120/0x12c el0t_64_sync+0x194/0x198
Root cause is:
systemd-random-seed kworker ---------------------------------------------------------------------- ___mark_inode_dirty inode_switch_wbs_work_fn
spin_lock(&inode->i_lock); inode_attach_wb locked_inode_to_wb_and_lock_list get inode->i_wb spin_unlock(&inode->i_lock); spin_lock(&wb->list_lock) spin_lock(&inode->i_lock) inode_io_list_move_locked spin_unlock(&wb->list_lock) spin_unlock(&inode->i_lock) spin_lock(&old_wb->list_lock) inode_do_switch_wbs spin_lock(&inode->i_lock) inode->i_wb = new_wb spin_unlock(&inode->i_lock) spin_unlock(&old_wb->list_lock) wb_put_many(old_wb, nr_switched) cgwb_release old wb released wb_wakeup_delayed() accesses wb, then trigger the use-after-free issue
Fix this race condition by holding inode spinlock until wb_wakeup_delayed() finished.
Patch / fix
- Linux Linux 5.10.247, 5.15.192, 6.1.151, 6.6.105, 6.12.46, 6.16.6, 6.17
- Siemens SIMATIC CN 4100 V5.0
- linux Debian 12 6.1.153-1
- linux Debian 13 6.12.48-1
- linux Debian 14 6.16.6-1
debian advisories DEBIAN-CVE-2025-39866
- linux Ubuntu 22.04 LTS 5.15.0-163.173
- linux Ubuntu 24.04 LTS 6.8.0-106.106
- linux-aws Ubuntu 22.04 LTS 5.15.0-1097.104
- linux-aws Ubuntu 24.04 LTS 6.8.0-1050.53
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1097.106
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1052.55
- linux-gke Ubuntu 22.04 LTS 5.15.0-1093.99
- linux-gke Ubuntu 24.04 LTS 6.8.0-1048.53
ubuntu advisories UBUNTU-CVE-2025-39866
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-687.5.1.el9_8
- rv RHEL 9 5.14.0-687.5.1.el9_8
- perf RHEL 9 5.14.0-687.5.1.el9_8
- rtla RHEL 9 5.14.0-687.5.1.el9_8
- libperf RHEL 9 5.14.0-687.5.1.el9_8
- kernel-rt RHEL 9 5.14.0-687.5.1.el9_8
- kernel-64k RHEL 9 5.14.0-687.5.1.el9_8
- kernel-core RHEL 9 5.14.0-687.5.1.el9_8
red hat advisories RHSA-2026:18587RHSA-2026:18134
- 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 AlmaLinux 10 6.12.0-211.7.1.el10_2
- rv AlmaLinux 10 6.12.0-211.7.1.el10_2
- perf AlmaLinux 10 6.12.0-211.7.1.el10_2
- rtla AlmaLinux 10 6.12.0-211.7.1.el10_2
- libperf AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-rt AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-64k AlmaLinux 10 6.12.0-211.7.1.el10_2
- kernel-core AlmaLinux 10 6.12.0-211.7.1.el10_2
almalinux advisories ALSA-2026:18134ALSA-2026:18587
- kernel Azure Linux 3.0 6.6.112.1-1
- kernel CBL-Mariner 2.0 5.15.200.1-1
azure linux advisories AZL-67578AZL-75119
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- git.kernel.org/stable/c/e2a14bbae5d8bacaa301362744a110e2be40a3a3 commit
- git.kernel.org/stable/c/b187c976111960e6e54a6b1fff724f6e3d39406c commit
- git.kernel.org/stable/c/1edc2feb9c759a9883dfe81cb5ed231412d8b2e4 commit
- git.kernel.org/stable/c/bf89b1f87c72df79cf76203f71fbf8349cd5c9de commit
- git.kernel.org/stable/c/e63052921f1b25a836feb1500b841bff7a4a0456 commit
- git.kernel.org/stable/c/c8c14adf80bd1a6e4a1d7ee9c2a816881c26d17a commit
- git.kernel.org/stable/c/d02d2c98d25793902f65803ab853b592c7a96b29 commit
Vendor 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-39866 updated cvss 4.7
kernel: fs: writeback: fix use-after-free in __mark_inode_dirty()
-
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 moreaffected: workaround, no fix available, no fix planned “Will not fix”
-
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 moreaffected: workaround, no fix available “Fix deferred”
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-687.5.1.el9_8, perf 5.14.0-687.5.1.el9_8, rtla 5.14.0-687.5.1.el9_8, python3-perf 5.14.0-687.5.1.el9_8, kernel-devel-matched 5.14.0-687.5.1.el9_8, kernel-64k-devel-matched 5.14.0-687.5.1.el9_8, +7 morefixed: vendor fix RHSA-2026:18587
-
Red Hat Enterprise Linux AppStream (v. 10) rv 6.12.0-211.7.1.el10_2, perf 6.12.0-211.7.1.el10_2, rtla 6.12.0-211.7.1.el10_2, python3-perf 6.12.0-211.7.1.el10_2, kernel-devel-matched 6.12.0-211.7.1.el10_2, kernel-64k-devel-matched 6.12.0-211.7.1.el10_2, +7 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-687.5.1.el9_8, kernel-64k 5.14.0-687.5.1.el9_8, kernel-core 5.14.0-687.5.1.el9_8, kernel-tools 5.14.0-687.5.1.el9_8, kernel-modules 5.14.0-687.5.1.el9_8, kernel-64k-core 5.14.0-687.5.1.el9_8, +27 morefixed: vendor fix RHSA-2026:18587
-
Red Hat Enterprise Linux BaseOS (v. 10) kernel 6.12.0-211.7.1.el10_2, kernel-64k 6.12.0-211.7.1.el10_2, kernel-core 6.12.0-211.7.1.el10_2, kernel-tools 6.12.0-211.7.1.el10_2, kernel-modules 6.12.0-211.7.1.el10_2, kernel-64k-core 6.12.0-211.7.1.el10_2, +28 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-687.5.1.el9_8, kernel-debuginfo-common-s390x 5.14.0-687.5.1.el9_8, kernel-debuginfo-common-x86_64 5.14.0-687.5.1.el9_8, kernel-debuginfo-common-aarch64 5.14.0-687.5.1.el9_8, kernel-debuginfo-common-ppc64le 5.14.0-687.5.1.el9_8fixed: vendor fix RHSA-2026:18587
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) libperf 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-s390x 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-x86_64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-aarch64 6.12.0-211.7.1.el10_2, kernel-debuginfo-common-ppc64le 6.12.0-211.7.1.el10_2fixed: vendor fix RHSA-2026:18134
show 5 moreshow fewer
-
Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-687.5.1.el9_8, kernel-rt-64k 5.14.0-687.5.1.el9_8, kernel-rt-core 5.14.0-687.5.1.el9_8, kernel-rt-modules 5.14.0-687.5.1.el9_8, kernel-rt-64k-core 5.14.0-687.5.1.el9_8, kernel-rt-debug-core 5.14.0-687.5.1.el9_8, +14 morefixed: vendor fix RHSA-2026:18587
-
Red Hat Enterprise Linux Real Time (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-64k 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-64k-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, +14 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-687.5.1.el9_8, kernel-rt-core 5.14.0-687.5.1.el9_8, kernel-rt-modules 5.14.0-687.5.1.el9_8, kernel-rt-debug-core 5.14.0-687.5.1.el9_8, kernel-rt-modules-core 5.14.0-687.5.1.el9_8, kernel-rt-debug-modules 5.14.0-687.5.1.el9_8, +4 morefixed: vendor fix RHSA-2026:18587
-
Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt 6.12.0-211.7.1.el10_2, kernel-rt-core 6.12.0-211.7.1.el10_2, kernel-rt-modules 6.12.0-211.7.1.el10_2, kernel-rt-debug-core 6.12.0-211.7.1.el10_2, kernel-rt-modules-core 6.12.0-211.7.1.el10_2, kernel-rt-debug-modules 6.12.0-211.7.1.el10_2, +4 morefixed: vendor fix RHSA-2026:18134
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 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
cisa ICSA-26-295-11 updated cvss 7.8
Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.7 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.7 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.7 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.7 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.7affected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
cisa ICSA-26-209-04 updated cvss 7.8
Siemens SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.6 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.6 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.6 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.6 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.6affected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
cisa ICSA-25-162-05 updated cvss 7.8
Siemens SIMATIC S7-1500 CPU family
-
Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= 3.1.5 Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AC0) >= 3.1.5 Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP (6AG1518-4AX00-4AC0) >= 3.1.5affected: mitigation, no fix available
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
cisa ICSA-26-134-10 updated cvss 7.8
Siemens SIMATIC
-
Siemens SIMATIC CN 4100 < 5.0affected: fixed in V5.0 support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 24 d ago
Exploit prediction
0.31% chance of exploitation in the next 30 days, higher than 24% of all scored CVEs (FIRST EPSS, 2026-11-08).
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
- Siemens SIMATIC CN 4100
- Siemens SIMATIC S7-1500 CPU 1518-4 PN/DP MFP
- Siemens SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP
- Siemens SIPLUS S7-1500 CPU 1518-4 PN/DP MFP
Classification
- Weakness
-
- CWE-416 Use After Free
- Technology feeds
References
-
git.kernel.org
/stable/c/e2a14bbae5d8bacaa301362744a110e2be40a3a3
patch
-
git.kernel.org
/stable/c/b187c976111960e6e54a6b1fff724f6e3d39406c
patch
-
git.kernel.org
/stable/c/1edc2feb9c759a9883dfe81cb5ed231412d8b2e4
patch
-
git.kernel.org
/stable/c/bf89b1f87c72df79cf76203f71fbf8349cd5c9de
patch
-
git.kernel.org
/stable/c/e63052921f1b25a836feb1500b841bff7a4a0456
patch
-
git.kernel.org
/stable/c/c8c14adf80bd1a6e4a1d7ee9c2a816881c26d17a
patch
-
git.kernel.org
/stable/c/d02d2c98d25793902f65803ab853b592c7a96b29
patch
-
lists.debian.org
/debian-lts-announce/2025/10/msg00008.html
third-party-advisory
- cert-portal.siemens.com /productcert/html/ssa-082556.html
- cert-portal.siemens.com /productcert/html/ssa-032379.html
- cert-portal.siemens.com /productcert/html/ssa-019113.html
- cert-portal.siemens.com /productcert/html/ssa-457936.html
Sources
- CVE List CVE-2025-39866
- NVD CVE-2025-39866
Fencer Vulns 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.