UBUNTU-CVE-2025-21887
Vulnerability Summary
Timeline
Description
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>
CVSS Metrics
- v3.1•HIGH•Score: 7.8CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected Systems
- ubuntu•linux
< 5.15.0-140.150 | < 6.8.0-79.79
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
< 5.15.0-1084.91 | < 6.8.0-1036.38
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.15
< 5.15.0-1084.91~20.04.1
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-aws-6.8
< 6.8.0-1036.38~22.04.1
- ubuntu•linux-aws-fips
all | < 5.15.0-1084.91+fips1 | < 6.8.0-1036.38+fips1
- ubuntu•linux-azure
all | < 5.15.0-1089.98 | < 6.8.0-1038.44
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.15
< 5.15.0-1089.98~20.04.1
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.11
< 6.11.0-1015.15~24.04.1
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-6.8
< 6.8.0-1036.42~22.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all | all
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-azure-fips
all | < 5.15.0-1089.98+fips1 | < 6.8.0-1040.46+fips1
- ubuntu•linux-azure-nvidia
< 6.8.0-1025.27
- ubuntu•linux-bluefield
< 5.15.0-1066.68 | < 5.15.0-1066.68 | all
- ubuntu•linux-fips
< 5.15.0-140.150+fips1 | < 6.8.0-79.79+fips1
- ubuntu•linux-gcp
all | < 5.15.0-1083.92 | < 6.8.0-1037.39
- ubuntu•linux-gcp-5.11
all
- ubuntu•linux-gcp-5.13
all
- ubuntu•linux-gcp-5.15
< 5.15.0-1083.92~20.04.1
- ubuntu•linux-gcp-5.19
all
- ubuntu•linux-gcp-5.3
all
- ubuntu•linux-gcp-5.8
all
- ubuntu•linux-gcp-6.11
< 6.11.0-1015.15~24.04.1
- ubuntu•linux-gcp-6.2
all
- ubuntu•linux-gcp-6.5
all
- ubuntu•linux-gcp-6.8
< 6.8.0-1037.39~22.04.1
- ubuntu•linux-gcp-fips
all | < 5.15.0-1083.92+fips1 | < 6.8.0-1037.39+fips1
- ubuntu•linux-gke
all | < 5.15.0-1081.87 | < 6.8.0-1033.37
- ubuntu•linux-gke-4.15
all
- ubuntu•linux-gke-5.15
all
- ubuntu•linux-gke-5.4
all
- ubuntu•linux-gkeop
all | < 5.15.0-1066.74 | < 6.8.0-1020.22
Showing first 50 affected entries in server-rendered view.
References (32)
- https://ubuntu.com/security/CVE-2025-21887
- https://www.cve.org/CVERecord?id=CVE-2025-21887
- https://git.kernel.org/linus/c84e125fff2615b4d9c259e762596134eddd2f27
- https://git.kernel.org/stable/c/3594aad97e7be2557ca9fa9c931b206b604028c8
- https://git.kernel.org/stable/c/4b49d939b5a79117f939b77cc67efae2694d9799
- https://git.kernel.org/stable/c/60b4b5c1277fc491da9e1e7abab307bfa39c2db7
- https://git.kernel.org/stable/c/64455c8051c3aedc71abb7ec8d47c80301f99f00
- https://git.kernel.org/stable/c/a7c41830ffcd17b2177a95a9b99b270302090c35
- https://git.kernel.org/stable/c/c84e125fff2615b4d9c259e762596134eddd2f27
- https://ubuntu.com/security/notices/USN-7510-1
- https://ubuntu.com/security/notices/USN-7510-2
- https://ubuntu.com/security/notices/USN-7511-1
- https://ubuntu.com/security/notices/USN-7511-2
- https://ubuntu.com/security/notices/USN-7512-1
- https://ubuntu.com/security/notices/USN-7521-1
- https://ubuntu.com/security/notices/USN-7510-3
- https://ubuntu.com/security/notices/USN-7510-4
- https://ubuntu.com/security/notices/USN-7510-5
- https://ubuntu.com/security/notices/USN-7511-3
- https://ubuntu.com/security/notices/USN-7521-2
- https://ubuntu.com/security/notices/USN-7510-6
- https://ubuntu.com/security/notices/USN-7521-3
- https://ubuntu.com/security/notices/USN-7510-7
- https://ubuntu.com/security/notices/USN-7510-8
- https://ubuntu.com/security/notices/USN-7593-1
- https://ubuntu.com/security/notices/USN-7602-1
- https://ubuntu.com/security/notices/USN-7725-1
- https://ubuntu.com/security/notices/USN-7725-2
- https://ubuntu.com/security/notices/USN-7725-3
- https://ubuntu.com/security/notices/USN-7779-1
- https://ubuntu.com/security/notices/USN-7802-1
- https://ubuntu.com/security/notices/USN-7809-1