{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2025-38615",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2025-04-16T04:51:24.029Z",
        "datePublished": "2025-08-19T17:03:57.164Z",
        "dateUpdated": "2026-08-05T12:03:30.645Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-08-05T12:03:30.645Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfs/ntfs3: cancle set bad inode after removing name fails\n\nThe reproducer uses a file0 on a ntfs3 file system with a corrupted i_link.\nWhen renaming, the file0's inode is marked as a bad inode because the file\nname cannot be deleted.\n\nThe underlying bug is that make_bad_inode() is called on a live inode.\nIn some cases it's \"icache lookup finds a normal inode, d_splice_alias()\nis called to attach it to dentry, while another thread decides to call\nmake_bad_inode() on it - that would evict it from icache, but we'd already\nfound it there earlier\".\nIn some it's outright \"we have an inode attached to dentry - that's how we\ngot it in the first place; let's call make_bad_inode() on it just for shits\nand giggles\"."
                }
            ],
            "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 vulnerability is reached purely through local syscalls — `renameat2()` on a mounted ntfs3 volume followed by `openat()` on the affected path; there is no remote or network-facing consumer of this code.\nAC:L - The attacker crafts the NTFS image so `ni_remove_name()` deterministically fails, and drives both sides of the `d_splice_alias()`/`make_bad_inode()` window with its own threads (a rename loop plus a lookup/open loop), so no condition lies outside its control; the downstream `S_ISDIR` bypass and inode-unhashing consequences need no race at all.\nPR:L - Renaming and opening files on a mounted ntfs3 volume are ordinary unprivileged operations, and ntfs3 mounts default to permissive uid/gid/fmask/dmask permissions; the mount itself is obtained without any elevated credentials via udisks2 loop-setup/filesystem-mount, which are granted to active local sessions by default.\nUI:N - The attacker performs every step alone — supplying the crafted image, mounting it through udisks2 or removable-media auto-mount, then issuing the rename and open; no action by any other user is required.\nS:U - The wild-pointer dereference and inode/dcache state corruption occur entirely within the kernel's own security authority, crossing no VM, IOMMU, or sandbox boundary.\nC:H - `pick_link()` dereferences `inode->i_link`, which actually holds `i_dir_seq` — a value the attacker inflates by adding directory entries — and consumes the target bytes as a symlink body steering path resolution, so on configurations without SMAP/PAN this yields an attacker-directed read primitive; the duplicate-inode aliasing additionally cross-links clusters between unrelated files.\nI:H - The corrupted symlink body redirects path resolution to attacker-chosen targets, the `S_IFDIR→S_IFREG` flip bypasses the non-empty-directory guard in `ntfs_unlink_inode()` allowing live directories to be unlinked, and duplicate `ntfs_inode`s for one MFT record double-free clusters — a memory- and metadata-corruption primitive steerable toward control-flow hijack.\nA:H - syzbot reproduced a general protection fault / KASAN null-ptr-deref in `pick_link()` from `do_sys_openat2()`, and the unhashed live inode plus `ni->dir`/`ni->file` union confusion produce further oopses — any of which panics the kernel."
                        }
                    ]
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ntfs3/frecord.c",
                        "fs/ntfs3/namei.c",
                        "fs/ntfs3/ntfs_fs.h"
                    ],
                    "versions": [
                        {
                            "version": "78ab59fee07f22464f32eafebab2bd97ba94ff2d",
                            "lessThan": "b35a50d639ca5259466ef5fea85529bb4fb17d5b",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "78ab59fee07f22464f32eafebab2bd97ba94ff2d",
                            "lessThan": "3ed2cc6a6e93fbeb8c0cafce1e7fb1f64a331dcc",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "78ab59fee07f22464f32eafebab2bd97ba94ff2d",
                            "lessThan": "358d4f821c03add421a4c49290538a705852ccf1",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "78ab59fee07f22464f32eafebab2bd97ba94ff2d",
                            "lessThan": "a285395020780adac1ffbc844069c3d700bf007a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "78ab59fee07f22464f32eafebab2bd97ba94ff2d",
                            "lessThan": "d99208b91933fd2a58ed9ed321af07dacd06ddc3",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "fs/ntfs3/frecord.c",
                        "fs/ntfs3/namei.c",
                        "fs/ntfs3/ntfs_fs.h"
                    ],
                    "versions": [
                        {
                            "version": "5.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "5.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.6.102",
                            "lessThanOrEqual": "6.6.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.12.42",
                            "lessThanOrEqual": "6.12.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.15.10",
                            "lessThanOrEqual": "6.15.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.16.1",
                            "lessThanOrEqual": "6.16.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.17",
                            "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.15",
                                    "versionEndExcluding": "6.6.102"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.12.42"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.15.10"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.16.1"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "5.15",
                                    "versionEndExcluding": "6.17"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/b35a50d639ca5259466ef5fea85529bb4fb17d5b"
                },
                {
                    "url": "https://git.kernel.org/stable/c/3ed2cc6a6e93fbeb8c0cafce1e7fb1f64a331dcc"
                },
                {
                    "url": "https://git.kernel.org/stable/c/358d4f821c03add421a4c49290538a705852ccf1"
                },
                {
                    "url": "https://git.kernel.org/stable/c/a285395020780adac1ffbc844069c3d700bf007a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/d99208b91933fd2a58ed9ed321af07dacd06ddc3"
                }
            ],
            "title": "fs/ntfs3: cancle set bad inode after removing name fails",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}