{"id":"CVE-2026-63818","state":"PUBLISHED","title":"f2fs: validate orphan inode entry count","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: validate orphan inode entry count\n\nf2fs_recover_orphan_inodes() trusts the orphan block entry_count when\nreplaying orphan inodes from the checkpoint pack. A corrupted entry_count\nlarger than F2FS_ORPHANS_PER_BLOCK makes the recovery loop read past the\nino[] array and interpret footer or following data as inode numbers.\n\nOn a crafted image, mounting an unpatched kernel can drive orphan recovery\ninto f2fs_bug_on() and panic the kernel. Validate entry_count before\nconsuming entries so corrupted checkpoint data fails the mount with\n-EFSCORRUPTED and requests fsck instead.\n\nSet ERROR_INCONSISTENT_ORPHAN as well, so the corruption reason can be\nrecorded in the superblock s_errors[] field. This gives fsck a persistent\nhint even though mount-time orphan recovery failure may leave no chance to\npersist SBI_NEED_FSCK through a checkpoint.","publishedAt":"2026-07-19T12:02:17.022Z","updatedAt":"2026-08-17T04:51:25.680Z","severity":{"score":8.4,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/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":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"210c210c92d78fdf5051bc55c5c69044b1a2150a","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"ad101d15716f5a24d1fa82a849f80430c805a3dd","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"d18c81f5d0ecd5796aa47d66d98f2dd54d8d0f70","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"d2f236196d542ccd8505736e41c3a1d3f0305f6f","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"550511a2470f6d204fa07b331f048bd2d3c51280","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"8aad54746c251f2c2370118df766c0c82e2d2091","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"2e12381d4495dc8b0ff042c6856022b2e359835c","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"846c499a65816d13f1186e3090e825e8bb8bcb8b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/checkpoint.c","include/linux/f2fs_fs.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.8","versionType":"semver"},{"version":"5.10.261","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.212","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.178","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.145","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.96","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.38","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.3","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/checkpoint.c","include/linux/f2fs_fs.h"]}],"references":["https://git.kernel.org/stable/c/210c210c92d78fdf5051bc55c5c69044b1a2150a","https://git.kernel.org/stable/c/ad101d15716f5a24d1fa82a849f80430c805a3dd","https://git.kernel.org/stable/c/d18c81f5d0ecd5796aa47d66d98f2dd54d8d0f70","https://git.kernel.org/stable/c/d2f236196d542ccd8505736e41c3a1d3f0305f6f","https://git.kernel.org/stable/c/550511a2470f6d204fa07b331f048bd2d3c51280","https://git.kernel.org/stable/c/8aad54746c251f2c2370118df766c0c82e2d2091","https://git.kernel.org/stable/c/2e12381d4495dc8b0ff042c6856022b2e359835c","https://git.kernel.org/stable/c/846c499a65816d13f1186e3090e825e8bb8bcb8b"],"weaknesses":[],"ingestedAt":"2026-10-29T20:12:41.951Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/63xxx/CVE-2026-63818.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-63818","state":"PUBLISHED","datePublished":"2026-07-19T12:02:17.022Z","dateUpdated":"2026-08-17T04:51:25.680Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-07-19T07:54:57.014Z"},"containers":{"cna":{"title":"f2fs: validate orphan inode entry count","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: validate orphan inode entry count\n\nf2fs_recover_orphan_inodes() trusts the orphan block entry_count when\nreplaying orphan inodes from the checkpoint pack. A corrupted entry_count\nlarger than F2FS_ORPHANS_PER_BLOCK makes the recovery loop read past the\nino[] array and interpret footer or following data as inode numbers.\n\nOn a crafted image, mounting an unpatched kernel can drive orphan recovery\ninto f2fs_bug_on() and panic the kernel. Validate entry_count before\nconsuming entries so corrupted checkpoint data fails the mount with\n-EFSCORRUPTED and requests fsck instead.\n\nSet ERROR_INCONSISTENT_ORPHAN as well, so the corruption reason can be\nrecorded in the superblock s_errors[] field. This gives fsck a persistent\nhint even though mount-time orphan recovery failure may leave no chance to\npersist SBI_NEED_FSCK through a checkpoint."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"210c210c92d78fdf5051bc55c5c69044b1a2150a","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"ad101d15716f5a24d1fa82a849f80430c805a3dd","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"d18c81f5d0ecd5796aa47d66d98f2dd54d8d0f70","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"d2f236196d542ccd8505736e41c3a1d3f0305f6f","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"550511a2470f6d204fa07b331f048bd2d3c51280","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"8aad54746c251f2c2370118df766c0c82e2d2091","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"2e12381d4495dc8b0ff042c6856022b2e359835c","versionType":"git"},{"version":"127e670abfa7fa150f6550d620ded930f5bdb4e7","status":"affected","lessThan":"846c499a65816d13f1186e3090e825e8bb8bcb8b","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/checkpoint.c","include/linux/f2fs_fs.h"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.8","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.8","versionType":"semver"},{"version":"5.10.261","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.212","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.178","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.145","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.96","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.38","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.1.3","status":"unaffected","lessThanOrEqual":"7.1.*","versionType":"semver"},{"version":"7.2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/checkpoint.c","include/linux/f2fs_fs.h"]}],"references":[{"url":"https://git.kernel.org/stable/c/210c210c92d78fdf5051bc55c5c69044b1a2150a"},{"url":"https://git.kernel.org/stable/c/ad101d15716f5a24d1fa82a849f80430c805a3dd"},{"url":"https://git.kernel.org/stable/c/d18c81f5d0ecd5796aa47d66d98f2dd54d8d0f70"},{"url":"https://git.kernel.org/stable/c/d2f236196d542ccd8505736e41c3a1d3f0305f6f"},{"url":"https://git.kernel.org/stable/c/550511a2470f6d204fa07b331f048bd2d3c51280"},{"url":"https://git.kernel.org/stable/c/8aad54746c251f2c2370118df766c0c82e2d2091"},{"url":"https://git.kernel.org/stable/c/2e12381d4495dc8b0ff042c6856022b2e359835c"},{"url":"https://git.kernel.org/stable/c/846c499a65816d13f1186e3090e825e8bb8bcb8b"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.4,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The vulnerable code runs only during F2FS mount via the mount syscall path (fs_context → get_tree_bdev → f2fs_fill_super → f2fs_recover_orphan_inodes); it is not reachable from network protocols or device drivers.\nAC:L - An attacker fully controls the crafted on-disk orphan block including entry_count and ino[] contents, so triggering the bug is reliable once a victim or privileged auto-mount path mounts the image; no race or rare layout dependency is required.\nPR:N - The attacker needs no privileges on the victim system—only a malicious F2FS image delivered via removable media, downloaded disk image, or similar that a privileged mount/auto-mount daemon later processes.\nUI:N - No victim interaction is required when the attacker mounts their own crafted image (e.g., loop mount in a user namespace with CAP_SYS_ADMIN), and automated privileged mount paths can process attacker-supplied media without further user action.\nS:U - Impact is confined to kernel/filesystem integrity and availability on the host mounting the image; it does not cross a VM, container, or IOMMU security boundary.\nC:H - The unchecked loop indexes past ino[F2FS_ORPHANS_PER_BLOCK-1] into the block footer and beyond the 4 KiB orphan block, constituting an out-of-bounds read of attacker-influenced metadata that can leak kernel-adjacent memory contents.\nI:H - Misinterpreted inode numbers are passed to recover_orphan_inode(), which clear_nlink() and iput() (truncating data) on matching real inodes, enabling deliberate destruction of filesystem contents from a crafted image.\nA:H - Crafted entry_count values drive f2fs_bug_on() on -ENOENT (kernel BUG/panic with CONFIG_F2FS_CHECK_FS, or WARN/oops otherwise) and can hang or crash the system during mount via unbounded orphan recovery iteration."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-17T04:51:25.680Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"5.10.261"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"5.15.212"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.1.178"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.6.145"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.12.96"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"6.18.38"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"7.1.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.8","versionEndExcluding":"7.2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}