CVE-2025-21887 json
ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up
published 2025-03-27 19 mo ago modified 2026-10-15 25 d ago also EUVD-2025-8469
- 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 12%
- public exploits
- 0
- none known
Summary
In the Linux kernel, the following vulnerability has been resolved:
ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up
The issue was caused by dput(upper) being called before ovl_dentry_update_reval(), while upper->d_flags was still accessed in ovl_dentry_remote().
Move dput(upper) after its last use to prevent use-after-free.
BUG: KASAN: slab-use-after-free in ovl_dentry_remote fs/overlayfs/util.c:162 [inline] BUG: KASAN: slab-use-after-free in ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167
Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_address_description mm/kasan/report.c:377 [inline] print_report+0xc3/0x620 mm/kasan/report.c:488 kasan_report+0xd9/0x110 mm/kasan/report.c:601 ovl_dentry_remote fs/overlayfs/util.c:162 [inline] ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167 ovl_link_up fs/overlayfs/copy_up.c:610 [inline] ovl_copy_up_one+0x2105/0x3490 fs/overlayfs/copy_up.c:1170 ovl_copy_up_flags+0x18d/0x200 fs/overlayfs/copy_up.c:1223 ovl_rename+0x39e/0x18c0 fs/overlayfs/dir.c:1136 vfs_rename+0xf84/0x20a0 fs/namei.c:4893 ... </TASK>
Patch / fix
- Linux Linux 5.10.247, 5.15.179, 6.1.130, 6.4, 6.5, 6.6.81, 6.12.18, 6.13.6, 6.14
- linux Debian 12 6.1.133-1
- linux Debian 14, Debian 13 6.12.19-1
debian advisories DEBIAN-CVE-2025-21887
- linux Ubuntu 22.04 LTS 5.15.0-140.150
- linux Ubuntu 24.04 LTS 6.8.0-79.79
- linux-aws Ubuntu 22.04 LTS 5.15.0-1084.91
- linux-aws Ubuntu 24.04 LTS 6.8.0-1036.38
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1083.92
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1037.39
- linux-gke Ubuntu 22.04 LTS 5.15.0-1081.87
- linux-gke Ubuntu 24.04 LTS 6.8.0-1033.37
ubuntu advisories UBUNTU-CVE-2025-21887
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-570.25.1.el9_6
- rv RHEL 9 5.14.0-570.25.1.el9_6
- perf RHEL 9 5.14.0-570.25.1.el9_6
- rtla RHEL 9 5.14.0-570.25.1.el9_6
- libperf RHEL 9 5.14.0-570.25.1.el9_6
- kernel-rt RHEL 9 5.14.0-570.25.1.el9_6
- kernel-64k RHEL 9 5.14.0-570.25.1.el9_6
- kernel-core RHEL 9 5.14.0-570.25.1.el9_6
red hat advisories RHSA-2025:11810RHSA-2025:10379RHSA-2025:9079
- kernel-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-syms-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-source-azure SLE Module for Public Cloud 15 SP7 6.4.0-150700.20.3.1
- kernel-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
- kernel-syms-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
- kernel-rt_debug Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
- kernel-source-rt Real Time Module 15 SP6, openSUSE Leap 15.6 6.4.0-150600.10.39.1
- kernel-64kb SLE Module for Basesystem 15 SP7 6.4.0-150700.53.3.1
suse advisories SUSE-SU-2025:01967-1SUSE-SU-2025:01964-1SUSE-SU-2025:01951-1SUSE-SU-2025:01919-1SUSE-SU-2025:01707-1SUSE-SU-2025:01614-1
- kernel AlmaLinux 9 5.14.0-570.25.1.el9_6
- rv AlmaLinux 9 5.14.0-570.25.1.el9_6
- perf AlmaLinux 9 5.14.0-570.25.1.el9_6
- rtla AlmaLinux 9 5.14.0-570.25.1.el9_6
- libperf AlmaLinux 9 5.14.0-570.25.1.el9_6
- kernel-rt AlmaLinux 9 5.14.0-570.25.1.el9_6
- kernel-64k AlmaLinux 9 5.14.0-570.25.1.el9_6
- kernel-core AlmaLinux 9 5.14.0-570.25.1.el9_6
almalinux advisories ALSA-2025:10379
- kernel Rocky Linux 9 5.14.0-570.25.1.el9_6
- kernel Rocky Linux 10 6.12.0-55.17.1.el10_0
rocky linux advisories RLSA-2025:10379RLSA-2025:9079
- git.kernel.org/stable/c/f77618291836168eca99e89cd175256f928f5e64 commit
- git.kernel.org/stable/c/4b49d939b5a79117f939b77cc67efae2694d9799 commit
- git.kernel.org/stable/c/a7c41830ffcd17b2177a95a9b99b270302090c35 commit
- git.kernel.org/stable/c/64455c8051c3aedc71abb7ec8d47c80301f99f00 commit
- git.kernel.org/stable/c/3594aad97e7be2557ca9fa9c931b206b604028c8 commit
- git.kernel.org/stable/c/60b4b5c1277fc491da9e1e7abab307bfa39c2db7 commit
- git.kernel.org/stable/c/c84e125fff2615b4d9c259e762596134eddd2f27 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-21887 updated cvss 7.1
kernel: ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up
-
Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 moreaffected: workaround, no fix planned “Out of support scope”
-
Red Hat CodeReady Linux Builder EUS (v.9.4) libperf 5.14.0-427.79.1.el9_4, kernel-debuginfo-common-s390x 5.14.0-427.79.1.el9_4, kernel-debuginfo-common-x86_64 5.14.0-427.79.1.el9_4, kernel-debuginfo-common-aarch64 5.14.0-427.79.1.el9_4, kernel-debuginfo-common-ppc64le 5.14.0-427.79.1.el9_4fixed: vendor fix RHSA-2025:11810
-
Red Hat Enterprise Linux AppStream (v. 9) rv 5.14.0-570.25.1.el9_6, perf 5.14.0-570.25.1.el9_6, rtla 5.14.0-570.25.1.el9_6, python3-perf 5.14.0-570.25.1.el9_6, kernel-devel-matched 5.14.0-570.25.1.el9_6, kernel-64k-devel-matched 5.14.0-570.25.1.el9_6, +7 morefixed: vendor fix RHSA-2025:10379
-
Red Hat Enterprise Linux AppStream (v. 10) rv 6.12.0-55.17.1.el10_0, perf 6.12.0-55.17.1.el10_0, rtla 6.12.0-55.17.1.el10_0, python3-perf 6.12.0-55.17.1.el10_0, kernel-devel-matched 6.12.0-55.17.1.el10_0, kernel-64k-devel-matched 6.12.0-55.17.1.el10_0, +7 morefixed: vendor fix RHSA-2025:9079
-
Red Hat Enterprise Linux AppStream EUS (v.9.4) rv 5.14.0-427.79.1.el9_4, perf 5.14.0-427.79.1.el9_4, rtla 5.14.0-427.79.1.el9_4, kernel-devel-matched 5.14.0-427.79.1.el9_4, kernel-64k-devel-matched 5.14.0-427.79.1.el9_4, kernel-debug-devel-matched 5.14.0-427.79.1.el9_4, +6 morefixed: vendor fix RHSA-2025:11810
-
Red Hat Enterprise Linux BaseOS (v. 9) kernel 5.14.0-570.25.1.el9_6, kernel-64k 5.14.0-570.25.1.el9_6, kernel-core 5.14.0-570.25.1.el9_6, kernel-tools 5.14.0-570.25.1.el9_6, kernel-modules 5.14.0-570.25.1.el9_6, kernel-64k-core 5.14.0-570.25.1.el9_6, +27 morefixed: vendor fix RHSA-2025:10379
-
Red Hat Enterprise Linux BaseOS (v. 10) kernel 6.12.0-55.17.1.el10_0, kernel-64k 6.12.0-55.17.1.el10_0, kernel-core 6.12.0-55.17.1.el10_0, kernel-tools 6.12.0-55.17.1.el10_0, kernel-modules 6.12.0-55.17.1.el10_0, kernel-64k-core 6.12.0-55.17.1.el10_0, +27 morefixed: vendor fix RHSA-2025:9079
-
Red Hat Enterprise Linux BaseOS EUS (v.9.4) bpftool 7.3.0-427.79.1.el9_4, kernel 5.14.0-427.79.1.el9_4, kernel-64k 5.14.0-427.79.1.el9_4, kernel-core 5.14.0-427.79.1.el9_4, kernel-tools 5.14.0-427.79.1.el9_4, python3-perf 5.14.0-427.79.1.el9_4, +28 morefixed: vendor fix RHSA-2025:11810
show 9 moreshow fewer
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 9) libperf 5.14.0-570.25.1.el9_6, kernel-debuginfo-common-s390x 5.14.0-570.25.1.el9_6, kernel-debuginfo-common-x86_64 5.14.0-570.25.1.el9_6, kernel-debuginfo-common-aarch64 5.14.0-570.25.1.el9_6, kernel-debuginfo-common-ppc64le 5.14.0-570.25.1.el9_6fixed: vendor fix RHSA-2025:10379
-
Red Hat Enterprise Linux CodeReady Linux Builder (v. 10) libperf 6.12.0-55.17.1.el10_0, kernel-debuginfo-common-s390x 6.12.0-55.17.1.el10_0, kernel-debuginfo-common-x86_64 6.12.0-55.17.1.el10_0, kernel-debuginfo-common-aarch64 6.12.0-55.17.1.el10_0, kernel-debuginfo-common-ppc64le 6.12.0-55.17.1.el10_0fixed: vendor fix RHSA-2025:9079
-
Red Hat Enterprise Linux Real Time (v. 9) kernel-rt 5.14.0-570.25.1.el9_6, kernel-rt-64k 5.14.0-570.25.1.el9_6, kernel-rt-core 5.14.0-570.25.1.el9_6, kernel-rt-modules 5.14.0-570.25.1.el9_6, kernel-rt-64k-core 5.14.0-570.25.1.el9_6, kernel-rt-debug-core 5.14.0-570.25.1.el9_6, +14 morefixed: vendor fix RHSA-2025:10379
-
Red Hat Enterprise Linux Real Time (v. 10) kernel-rt 6.12.0-55.17.1.el10_0, kernel-rt-64k 6.12.0-55.17.1.el10_0, kernel-rt-core 6.12.0-55.17.1.el10_0, kernel-rt-modules 6.12.0-55.17.1.el10_0, kernel-rt-64k-core 6.12.0-55.17.1.el10_0, kernel-rt-debug-core 6.12.0-55.17.1.el10_0, +14 morefixed: vendor fix RHSA-2025:9079
-
Red Hat Enterprise Linux Real Time EUS (v.9.4) kernel-rt 5.14.0-427.79.1.el9_4, kernel-rt-core 5.14.0-427.79.1.el9_4, kernel-rt-modules 5.14.0-427.79.1.el9_4, kernel-rt-debug-core 5.14.0-427.79.1.el9_4, kernel-rt-modules-core 5.14.0-427.79.1.el9_4, kernel-rt-debug-modules 5.14.0-427.79.1.el9_4, +4 morefixed: vendor fix RHSA-2025:11810
-
Red Hat Enterprise Linux Real Time for NFV (v. 9) kernel-rt 5.14.0-570.25.1.el9_6, kernel-rt-kvm 5.14.0-570.25.1.el9_6, kernel-rt-core 5.14.0-570.25.1.el9_6, kernel-rt-modules 5.14.0-570.25.1.el9_6, kernel-rt-debug-kvm 5.14.0-570.25.1.el9_6, kernel-rt-debug-core 5.14.0-570.25.1.el9_6, +6 morefixed: vendor fix RHSA-2025:10379
-
Red Hat Enterprise Linux Real Time for NFV (v. 10) kernel-rt 6.12.0-55.17.1.el10_0, kernel-rt-kvm 6.12.0-55.17.1.el10_0, kernel-rt-core 6.12.0-55.17.1.el10_0, kernel-rt-modules 6.12.0-55.17.1.el10_0, kernel-rt-debug-kvm 6.12.0-55.17.1.el10_0, kernel-rt-debug-core 6.12.0-55.17.1.el10_0, +6 morefixed: vendor fix RHSA-2025:9079
-
Red Hat Enterprise Linux Real Time for NFV EUS (v.9.4) kernel-rt 5.14.0-427.79.1.el9_4, kernel-rt-kvm 5.14.0-427.79.1.el9_4, kernel-rt-core 5.14.0-427.79.1.el9_4, kernel-rt-modules 5.14.0-427.79.1.el9_4, kernel-rt-debug-kvm 5.14.0-427.79.1.el9_4, kernel-rt-debug-core 5.14.0-427.79.1.el9_4, +6 morefixed: vendor fix RHSA-2025:11810
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 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
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 SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 19 mo ago
Exploit prediction
0.22% chance of exploitation in the next 30 days, higher than 12% 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 |
| CISA ADP | 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 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/f77618291836168eca99e89cd175256f928f5e64
-
git.kernel.org
/stable/c/4b49d939b5a79117f939b77cc67efae2694d9799
patch
-
git.kernel.org
/stable/c/a7c41830ffcd17b2177a95a9b99b270302090c35
patch
-
git.kernel.org
/stable/c/64455c8051c3aedc71abb7ec8d47c80301f99f00
patch
-
git.kernel.org
/stable/c/3594aad97e7be2557ca9fa9c931b206b604028c8
patch
-
git.kernel.org
/stable/c/60b4b5c1277fc491da9e1e7abab307bfa39c2db7
patch
-
git.kernel.org
/stable/c/c84e125fff2615b4d9c259e762596134eddd2f27
patch
- lists.debian.org /debian-lts-announce/2025/05/msg00045.html
- cert-portal.siemens.com /productcert/html/ssa-019113.html
- cert-portal.siemens.com /productcert/html/ssa-457936.html
Sources
- CVE List CVE-2025-21887
- NVD CVE-2025-21887
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.