{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-21887",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2024-12-29T08:45:45.782Z",
        "datePublished": "2025-03-27T14:57:14.524Z",
        "dateUpdated": "2026-08-05T11:55:09.027Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T11:55:09.027Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\novl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up\n\nThe issue was caused by dput(upper) being called before\novl_dentry_update_reval(), while upper->d_flags was still\naccessed in ovl_dentry_remote().\n\nMove dput(upper) after its last use to prevent use-after-free.\n\nBUG: KASAN: slab-use-after-free in ovl_dentry_remote fs/overlayfs/util.c:162 [inline]\nBUG: KASAN: slab-use-after-free in ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167\n\nCall Trace:\n <TASK>\n __dump_stack lib/dump_stack.c:88 [inline]\n dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114\n print_address_description mm/kasan/report.c:377 [inline]\n print_report+0xc3/0x620 mm/kasan/report.c:488\n kasan_report+0xd9/0x110 mm/kasan/report.c:601\n ovl_dentry_remote fs/overlayfs/util.c:162 [inline]\n ovl_dentry_update_reval+0xd2/0xf0 fs/overlayfs/util.c:167\n ovl_link_up fs/overlayfs/copy_up.c:610 [inline]\n ovl_copy_up_one+0x2105/0x3490 fs/overlayfs/copy_up.c:1170\n ovl_copy_up_flags+0x18d/0x200 fs/overlayfs/copy_up.c:1223\n ovl_rename+0x39e/0x18c0 fs/overlayfs/dir.c:1136\n vfs_rename+0xf84/0x20a0 fs/namei.c:4893\n...\n </TASK>"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    },
                    "scenarios": [
                        {
                            "lang": "en",
                            "value": "AV:L - The bug is reached through local syscalls only — mounting overlayfs (and a FUSE upper) and issuing rename(2)/open(O_TRUNC) to trigger copy-up. No network-facing component processes attacker data on this path.\nAC:L - The attacker controls both halves of the timing: the FUSE server sets entry_valid=0 so dput() deterministically kills the dentry, and it stalls the SETATTR in ovl_set_timestamps() to hold the window open arbitrarily long for RCU to free the object and for a heap spray to refill the slot. No condition depends on chance or on unrelated system state.\nPR:L - Both overlayfs and fuse are FS_USERNS_MOUNT, so an ordinary unprivileged user can create the whole setup inside `unshare -Urm`, and several distros permit unprivileged overlayfs outright; the copy-up path contains no capability check. Some form of local account is required, so not None.\nUI:N - The attacker performs the mount, the FUSE service, and the rename entirely on their own, within their own namespace. No victim action of any kind is needed.\nS:U - The corrupted and disclosed state is kernel memory reached from a kernel-mode fault; the impact stays within the kernel's own security authority with no crossing into a hypervisor, IOMMU, or other authority.\nC:H - This is a slab use-after-free read of a freed struct dentry whose contents the attacker can shape by spraying the dentry_cache during the FUSE-controlled stall, and the read value is propagated into live VFS state, yielding an observable oracle on freed kernel memory. Per UAF scoring guidance this is High.\nI:H - Content read out of a freed, attacker-refillable slab object is written into a live dentry's d_flags, corrupting VFS revalidation state (stale dentries accepted on remote upper/lower filesystems). Use-after-free primitives of this class are treated as High integrity impact.\nA:H - KASAN confirms a slab-use-after-free; once the dentry slab page is returned to the page allocator — which the attacker can encourage by draining the dcache during the stall — the dereference faults and oopses the kernel, and the fault occurs with the upper directory inode lock held, wedging further operations."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/overlayfs/copy_up.c"
                    ],
                    "versions": [
                        {
                            "version": "714ba10a6dd19752a349e59aa875f3288ccb59b9",
                            "lessThan": "f77618291836168eca99e89cd175256f928f5e64",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "62f29ca45f832e281fc14966ac25f6ff3bd121ca",
                            "lessThan": "4b49d939b5a79117f939b77cc67efae2694d9799",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "e4f2a1feebb3f209a0fca82aa53507a5b8be4d53",
                            "lessThan": "a7c41830ffcd17b2177a95a9b99b270302090c35",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b07d5cc93e1b28df47a72c519d09d0a836043613",
                            "lessThan": "64455c8051c3aedc71abb7ec8d47c80301f99f00",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b07d5cc93e1b28df47a72c519d09d0a836043613",
                            "lessThan": "3594aad97e7be2557ca9fa9c931b206b604028c8",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b07d5cc93e1b28df47a72c519d09d0a836043613",
                            "lessThan": "60b4b5c1277fc491da9e1e7abab307bfa39c2db7",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "b07d5cc93e1b28df47a72c519d09d0a836043613",
                            "lessThan": "c84e125fff2615b4d9c259e762596134eddd2f27",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "33ab4dd6202f359558a0a2678b94d1b9994c17e5",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "1ecdc55e5cd9f70f8d7513802971d4cffb9f77af",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "5.10.188",
                            "lessThan": "5.10.247",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.121",
                            "lessThan": "5.15.179",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.39",
                            "lessThan": "6.1.130",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.3.13",
                            "lessThan": "6.4",
                            "status": "affected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.4.4",
                            "lessThan": "6.5",
                            "status": "affected",
                            "versionType": "semver"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/overlayfs/copy_up.c"
                    ],
                    "versions": [
                        {
                            "version": "6.5",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.5",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.10.247",
                            "lessThanOrEqual": "5.10.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "5.15.179",
                            "lessThanOrEqual": "5.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.1.130",
                            "lessThanOrEqual": "6.1.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.81",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.18",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.13.6",
                            "lessThanOrEqual": "6.13.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.14",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.10.188",
                                    "versionEndExcluding": "5.10.247"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15.121",
                                    "versionEndExcluding": "5.15.179"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.1.39",
                                    "versionEndExcluding": "6.1.130"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.5",
                                    "versionEndExcluding": "6.6.81"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.5",
                                    "versionEndExcluding": "6.12.18"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.5",
                                    "versionEndExcluding": "6.13.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.5",
                                    "versionEndExcluding": "6.14"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.3.13"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.4.4"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/f77618291836168eca99e89cd175256f928f5e64"
                },
                {
                    "url": "https://git.kernel.org/stable/c/4b49d939b5a79117f939b77cc67efae2694d9799"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a7c41830ffcd17b2177a95a9b99b270302090c35"
                },
                {
                    "url": "https://git.kernel.org/stable/c/64455c8051c3aedc71abb7ec8d47c80301f99f00"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3594aad97e7be2557ca9fa9c931b206b604028c8"
                },
                {
                    "url": "https://git.kernel.org/stable/c/60b4b5c1277fc491da9e1e7abab307bfa39c2db7"
                },
                {
                    "url": "https://git.kernel.org/stable/c/c84e125fff2615b4d9c259e762596134eddd2f27"
                }
            ],
            "title": "ovl: fix UAF in ovl_dentry_update_reval by moving dput() in ovl_link_up",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        },
        "adp": [
            {
                "metrics": [
                    {
                        "cvssV3_1": {
                            "scope": "UNCHANGED",
                            "version": "3.1",
                            "baseScore": 7.8,
                            "attackVector": "LOCAL",
                            "baseSeverity": "HIGH",
                            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                            "integrityImpact": "HIGH",
                            "userInteraction": "NONE",
                            "attackComplexity": "LOW",
                            "availabilityImpact": "HIGH",
                            "privilegesRequired": "LOW",
                            "confidentialityImpact": "HIGH"
                        }
                    },
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "id": "CVE-2025-21887",
                                "role": "CISA Coordinator",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "version": "2.0.3",
                                "timestamp": "2025-03-27T16:59:58.510815Z"
                            }
                        }
                    }
                ],
                "problemTypes": [
                    {
                        "descriptions": [
                            {
                                "lang": "en",
                                "type": "CWE",
                                "cweId": "CWE-416",
                                "description": "CWE-416 Use After Free"
                            }
                        ]
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2025-03-27T17:08:22.888Z"
                }
            },
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2025-11-03T19:38:40.259Z"
                }
            },
            {
                "x_adpType": "supplier",
                "providerMetadata": {
                    "orgId": "0b142b55-0307-4c5a-b3c9-f314f3fb7c5e",
                    "shortName": "siemens-SADP",
                    "dateUpdated": "2026-07-14T12:40:26.912Z"
                },
                "affected": [
                    {
                        "vendor": "Siemens",
                        "product": "SIMATIC S7-1500 CPU 1518-4 PN/DP MFP",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "V3.1.6",
                                "lessThan": "*",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    },
                    {
                        "vendor": "Siemens",
                        "product": "SIMATIC S7-1500 CPU 1518-4 PN/DP MFP",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "V3.1.6",
                                "lessThan": "*",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    },
                    {
                        "vendor": "Siemens",
                        "product": "SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "V3.1.6",
                                "lessThan": "*",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    },
                    {
                        "vendor": "Siemens",
                        "product": "SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "V3.1.6",
                                "lessThan": "*",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    },
                    {
                        "vendor": "Siemens",
                        "product": "SIPLUS S7-1500 CPU 1518-4 PN/DP MFP",
                        "versions": [
                            {
                                "status": "affected",
                                "version": "V3.1.6",
                                "lessThan": "*",
                                "versionType": "custom"
                            }
                        ],
                        "defaultStatus": "unknown"
                    }
                ],
                "references": [
                    {
                        "url": "https://cert-portal.siemens.com/productcert/html/ssa-019113.html"
                    }
                ]
            }
        ]
    }
}