{"id":"CVE-2023-54187","state":"PUBLISHED","title":"f2fs: fix potential corruption when moving a directory","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix potential corruption when moving a directory\n\nF2FS has the same issue in ext4_rename causing crash revealed by\nxfstests/generic/707.\n\nSee also commit 0813299c586b (\"ext4: Fix possible corruption when moving a directory\")","publishedAt":"2025-12-30T12:08:56.562Z","updatedAt":"2026-08-05T09:17:54.804Z","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":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"3e77036246123ff710fa2661dcaa12a45284f09b","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"957904f531fd857a92743b11fbc9c9ffdf7f3207","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"8a0b544b7caedfbc05065b6377fd1d8bf7ef5e70","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"f20191100952013f0916418cdaed0ab55c7b634c","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"0a76082a4a32a90d1ef33dee8b400efc082b4b6f","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"d94772154e524b329a168678836745d2773a6e02","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/namei.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.19","versionType":"semver"},{"version":"5.4.243","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.180","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.112","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.29","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.16","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3.3","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/namei.c"]}],"references":["https://git.kernel.org/stable/c/3e77036246123ff710fa2661dcaa12a45284f09b","https://git.kernel.org/stable/c/957904f531fd857a92743b11fbc9c9ffdf7f3207","https://git.kernel.org/stable/c/8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9","https://git.kernel.org/stable/c/8a0b544b7caedfbc05065b6377fd1d8bf7ef5e70","https://git.kernel.org/stable/c/f20191100952013f0916418cdaed0ab55c7b634c","https://git.kernel.org/stable/c/0a76082a4a32a90d1ef33dee8b400efc082b4b6f","https://git.kernel.org/stable/c/d94772154e524b329a168678836745d2773a6e02"],"weaknesses":[],"ingestedAt":"2026-10-29T20:06:42.242Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2023/54xxx/CVE-2023-54187.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2023-54187","state":"PUBLISHED","datePublished":"2025-12-30T12:08:56.562Z","dateUpdated":"2026-08-05T09:17:54.804Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-30T12:06:44.497Z"},"containers":{"cna":{"title":"f2fs: fix potential corruption when moving a directory","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix potential corruption when moving a directory\n\nF2FS has the same issue in ext4_rename causing crash revealed by\nxfstests/generic/707.\n\nSee also commit 0813299c586b (\"ext4: Fix possible corruption when moving a directory\")"}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"3e77036246123ff710fa2661dcaa12a45284f09b","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"957904f531fd857a92743b11fbc9c9ffdf7f3207","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"8a0b544b7caedfbc05065b6377fd1d8bf7ef5e70","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"f20191100952013f0916418cdaed0ab55c7b634c","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"0a76082a4a32a90d1ef33dee8b400efc082b4b6f","versionType":"git"},{"version":"622f28ae9ba4fa89b4ff0f4a6cf75d153ea838ce","status":"affected","lessThan":"d94772154e524b329a168678836745d2773a6e02","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/namei.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"3.19","status":"affected"},{"version":"0","status":"unaffected","lessThan":"3.19","versionType":"semver"},{"version":"5.4.243","status":"unaffected","lessThanOrEqual":"5.4.*","versionType":"semver"},{"version":"5.10.180","status":"unaffected","lessThanOrEqual":"5.10.*","versionType":"semver"},{"version":"5.15.112","status":"unaffected","lessThanOrEqual":"5.15.*","versionType":"semver"},{"version":"6.1.29","status":"unaffected","lessThanOrEqual":"6.1.*","versionType":"semver"},{"version":"6.2.16","status":"unaffected","lessThanOrEqual":"6.2.*","versionType":"semver"},{"version":"6.3.3","status":"unaffected","lessThanOrEqual":"6.3.*","versionType":"semver"},{"version":"6.4","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/namei.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/3e77036246123ff710fa2661dcaa12a45284f09b"},{"url":"https://git.kernel.org/stable/c/957904f531fd857a92743b11fbc9c9ffdf7f3207"},{"url":"https://git.kernel.org/stable/c/8f57f3e112cf1d16682b6ff9c31c72f40f7da9c9"},{"url":"https://git.kernel.org/stable/c/8a0b544b7caedfbc05065b6377fd1d8bf7ef5e70"},{"url":"https://git.kernel.org/stable/c/f20191100952013f0916418cdaed0ab55c7b634c"},{"url":"https://git.kernel.org/stable/c/0a76082a4a32a90d1ef33dee8b400efc082b4b6f"},{"url":"https://git.kernel.org/stable/c/d94772154e524b329a168678836745d2773a6e02"}],"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 through the ordinary rename()/renameat2() syscall on a locally mounted f2fs filesystem, requiring local system access. No network protocol handler is involved.\nAC:L - The attacker controls both sides of the race — one thread issues the cross-directory rename while another creates entries in the moved directory to force inline-to-normal dentry conversion — and the unprotected window spans f2fs_balance_fs() (which can run GC and block for a long time), f2fs_lock_op() and f2fs_add_link(), making it wide and retryable indefinitely.\nPR:L - Any unprivileged local user with write access to two directories on an f2fs mount can trigger this; on Android every app has writable directories on the f2fs /data partition, and inline_dentry is enabled by default in default_options().\nUI:N - The attacker performs both the rename and the concurrent directory-modifying operations itself; no victim action is needed on an already-mounted filesystem.\nS:U - The corruption stays within the kernel/filesystem security authority; there is no crossing into a hypervisor, IOMMU, or other separate security scope.\nC:H - The stale write lands inside the inode's i_addr[] block-address array, planting an attacker-influenced physical block number into the directory, so subsequent readdir/lookup reads and exposes disk blocks belonging to other users' files.\nI:H - This is persistent on-disk metadata corruption — an attacker-influenced 32-bit value is written into a directory inode's block pointer and marked dirty, causing later directory writes to overwrite blocks owned by other files and producing double-allocated blocks requiring fsck.\nA:H - The commit states the race causes a crash (reproduced by xfstests/generic/707), and the resulting mismatched page-type writeback wait can hang under the page lock while the corrupted metadata triggers -EFSCORRUPTED/SBI_NEED_FSCK filesystem shutdown."}]}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-08-05T09:17:54.804Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"5.4.243"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"5.10.180"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"5.15.112"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.1.29"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.2.16"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.3.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"3.19","versionEndExcluding":"6.4"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}