{"id":"CVE-2026-46175","state":"PUBLISHED","title":"f2fs: fix fsck inconsistency caused by FGGC of node block","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix fsck inconsistency caused by FGGC of node block\n\nDuring FGGC node block migration, fsck may incorrectly treat the\nmigrated node block as fsync-written data.\n\nThe reproduction scenario:\nroot@vm:/mnt/f2fs# seq 1 2048 | xargs -n 1 ./test_sync // write inline inode and sync\nroot@vm:/mnt/f2fs# rm -f 1\nroot@vm:/mnt/f2fs# sync\nroot@vm:/mnt/f2fs# f2fs_io gc_range // move data block in sync mode and not write CP\n  SPO, \"fsck --dry-run\" find inode has already checkpointed but still\n  with DENT_BIT_SHIFT set\n\nThe root cause is that GC does not clear the dentry mark and fsync mark\nduring node block migration, leading fsck to misinterpret them as\nuser-issued fsync writes.\n\nIn BGGC mode, node block migration is handled by f2fs_sync_node_pages(),\nwhich guarantees the dentry and fsync marks are cleared before writing.\n\nThis patch move the set/clear of the fsync|dentry marks into\n__write_node_folio to make the logic clearer, and ensures the\nfsync|dentry mark is cleared in FGGC.","publishedAt":"2026-05-28T09:36:29.522Z","updatedAt":"2026-10-30T12:26:03.732Z","severity":{"score":7.1,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","source":"Linux"},"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"3b7a0bbb3444addddb139f42a74ab4492052fa27","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"d1820a5814eadb8e63ab6c7c8d04e28ce49836be","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"8ac93964658d0649337dcb3f6e38d77f8cdd86f3","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"8be551f538dc5b64183e27bd45a7a0795263f760","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"e7c6d30169b03307d27c4479563df79c08f3a746","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"c3e238bd1f56993f205ef83889d406dfeaf717a8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/node.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.7","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.30","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.7","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/node.c"]}],"references":["https://git.kernel.org/stable/c/3b7a0bbb3444addddb139f42a74ab4492052fa27","https://git.kernel.org/stable/c/d1820a5814eadb8e63ab6c7c8d04e28ce49836be","https://git.kernel.org/stable/c/8ac93964658d0649337dcb3f6e38d77f8cdd86f3","https://git.kernel.org/stable/c/8be551f538dc5b64183e27bd45a7a0795263f760","https://git.kernel.org/stable/c/e7c6d30169b03307d27c4479563df79c08f3a746","https://git.kernel.org/stable/c/c3e238bd1f56993f205ef83889d406dfeaf717a8"],"weaknesses":[],"ingestedAt":"2026-10-30T12:42:04.495Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/46xxx/CVE-2026-46175.json","commit":"db8103c5921aac81d5d90efcf3745980dafabf49","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-46175","state":"PUBLISHED","datePublished":"2026-05-28T09:36:29.522Z","dateUpdated":"2026-10-30T12:26:03.732Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-05-13T15:03:33.103Z"},"containers":{"cna":{"title":"f2fs: fix fsck inconsistency caused by FGGC of node block","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix fsck inconsistency caused by FGGC of node block\n\nDuring FGGC node block migration, fsck may incorrectly treat the\nmigrated node block as fsync-written data.\n\nThe reproduction scenario:\nroot@vm:/mnt/f2fs# seq 1 2048 | xargs -n 1 ./test_sync // write inline inode and sync\nroot@vm:/mnt/f2fs# rm -f 1\nroot@vm:/mnt/f2fs# sync\nroot@vm:/mnt/f2fs# f2fs_io gc_range // move data block in sync mode and not write CP\n  SPO, \"fsck --dry-run\" find inode has already checkpointed but still\n  with DENT_BIT_SHIFT set\n\nThe root cause is that GC does not clear the dentry mark and fsync mark\nduring node block migration, leading fsck to misinterpret them as\nuser-issued fsync writes.\n\nIn BGGC mode, node block migration is handled by f2fs_sync_node_pages(),\nwhich guarantees the dentry and fsync marks are cleared before writing.\n\nThis patch move the set/clear of the fsync|dentry marks into\n__write_node_folio to make the logic clearer, and ensures the\nfsync|dentry mark is cleared in FGGC."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"3b7a0bbb3444addddb139f42a74ab4492052fa27","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"d1820a5814eadb8e63ab6c7c8d04e28ce49836be","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"8ac93964658d0649337dcb3f6e38d77f8cdd86f3","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"8be551f538dc5b64183e27bd45a7a0795263f760","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"e7c6d30169b03307d27c4479563df79c08f3a746","versionType":"git"},{"version":"da011cc0da8cf4a60ddf4d2ae8b42902a3d71e5f","status":"affected","lessThan":"c3e238bd1f56993f205ef83889d406dfeaf717a8","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/node.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.7","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.7","versionType":"semver"},{"version":"6.1.191","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.6.160","status":"unaffected","lessThanOrEqual":"6.6.*","versionType":"semver"},{"version":"6.12.114","status":"unaffected","lessThanOrEqual":"6.12.*","versionType":"semver"},{"version":"6.18.30","status":"unaffected","lessThanOrEqual":"6.18.*","versionType":"semver"},{"version":"7.0.7","status":"unaffected","lessThanOrEqual":"7.0.*","versionType":"semver"},{"version":"7.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/node.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3b7a0bbb3444addddb139f42a74ab4492052fa27"},{"url":"https://git.kernel.org/stable/c/d1820a5814eadb8e63ab6c7c8d04e28ce49836be"},{"url":"https://git.kernel.org/stable/c/8ac93964658d0649337dcb3f6e38d77f8cdd86f3"},{"url":"https://git.kernel.org/stable/c/8be551f538dc5b64183e27bd45a7a0795263f760"},{"url":"https://git.kernel.org/stable/c/e7c6d30169b03307d27c4479563df79c08f3a746"},{"url":"https://git.kernel.org/stable/c/c3e238bd1f56993f205ef83889d406dfeaf717a8"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:H","baseScore":7.1,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - f2fs is a local block-device filesystem (default on Android/embedded); the vulnerable FGGC path is reached only by a local actor writing to a mounted f2fs volume, not over any network.\nAC:L - The attacker fully sets up the trigger (write+fsync an inline inode, delete it, exhaust free space to force FGGC of its node block); the corrupt on-disk state then persists until the next checkpoint, and routine power cycles/reboots on the target devices reliably invoke the faulty recovery.\nPR:L - While the GC ioctls require CAP_SYS_ADMIN, automatic foreground GC (f2fs_balance_fs → f2fs_gc promoting to FG_GC on low free space) runs the exact vulnerable path for any unprivileged user with write access to the filesystem.\nUI:N - Roll-forward recovery runs automatically during the next mount after a crash; no victim action is needed beyond the normal, automatic crash-and-remount cycle.\nS:U - The corruption is confined to the f2fs on-disk structures and the kernel managing them; it does not cross into a different security authority.\nC:N - The bug corrupts filesystem-consistency metadata but provides no read primitive over kernel memory or otherwise-inaccessible data, so there is no information disclosure.\nI:H - The migrated node block is misinterpreted as fsynced data, causing incorrect roll-forward recovery that resurrects deleted/stale inode metadata and leaves the on-disk filesystem inconsistent (fsck-detected) — a serious integrity compromise of stored data.\nA:H - A bad recovery can return an error, aborting the mount and rendering the filesystem/data unavailable until offline fsck (e.g. /data mount failure), and with CONFIG_F2FS_CHECK_FS the recovery error path hits BUG_ON(), crashing the kernel."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-10-30T12:26:03.732Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"6.1.191"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"6.6.160"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"6.12.114"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"6.18.30"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"7.0.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.7","versionEndExcluding":"7.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}