{"id":"CVE-2025-38615","state":"PUBLISHED","title":"fs/ntfs3: cancle set bad inode after removing name fails","description":"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\".","publishedAt":"2025-08-19T17:03:57.164Z","updatedAt":"2026-10-30T12:22:08.400Z","severity":{"score":7.8,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"47856e10f8d5e066aa26b1f9c02d933fe0620399","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"b35a50d639ca5259466ef5fea85529bb4fb17d5b","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"3ed2cc6a6e93fbeb8c0cafce1e7fb1f64a331dcc","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"358d4f821c03add421a4c49290538a705852ccf1","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"a285395020780adac1ffbc844069c3d700bf007a","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"d99208b91933fd2a58ed9ed321af07dacd06ddc3","versionType":"git"}],"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"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"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"]}],"references":["https://git.kernel.org/stable/c/47856e10f8d5e066aa26b1f9c02d933fe0620399","https://git.kernel.org/stable/c/b35a50d639ca5259466ef5fea85529bb4fb17d5b","https://git.kernel.org/stable/c/3ed2cc6a6e93fbeb8c0cafce1e7fb1f64a331dcc","https://git.kernel.org/stable/c/358d4f821c03add421a4c49290538a705852ccf1","https://git.kernel.org/stable/c/a285395020780adac1ffbc844069c3d700bf007a","https://git.kernel.org/stable/c/d99208b91933fd2a58ed9ed321af07dacd06ddc3"],"weaknesses":[],"ingestedAt":"2026-10-30T12:38:04.623Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/38xxx/CVE-2025-38615.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-38615","state":"PUBLISHED","datePublished":"2025-08-19T17:03:57.164Z","dateUpdated":"2026-10-30T12:22:08.400Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-04-16T04:51:24.029Z"},"containers":{"cna":{"title":"fs/ntfs3: cancle set bad inode after removing name fails","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\"."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"47856e10f8d5e066aa26b1f9c02d933fe0620399","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"b35a50d639ca5259466ef5fea85529bb4fb17d5b","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"3ed2cc6a6e93fbeb8c0cafce1e7fb1f64a331dcc","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"358d4f821c03add421a4c49290538a705852ccf1","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"a285395020780adac1ffbc844069c3d700bf007a","versionType":"git"},{"version":"78ab59fee07f22464f32eafebab2bd97ba94ff2d","status":"affected","lessThan":"d99208b91933fd2a58ed9ed321af07dacd06ddc3","versionType":"git"}],"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"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.15","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.15","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.102","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.42","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.15.10","status":"unaffected","lessThanOrEqual":"6.15.*","versionType":"semver"},{"version":"6.16.1","status":"unaffected","lessThanOrEqual":"6.16.*","versionType":"semver"},{"version":"6.17","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"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"]}],"references":[{"url":"https://git.kernel.org/stable/c/47856e10f8d5e066aa26b1f9c02d933fe0620399"},{"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"}],"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."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:22:08.400Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"6.1.191"},{"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"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}