{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2024-27034","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2024-02-19T14:20:24.211Z","datePublished":"2024-05-01T12:53:39.767Z","dateUpdated":"2026-08-05T11:29:08.856Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-08-05T11:29:08.856Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: compress: fix to cover normal cluster write with cp_rwsem\n\nWhen we overwrite compressed cluster w/ normal cluster, we should\nnot unlock cp_rwsem during f2fs_write_raw_pages(), otherwise data\nwill be corrupted if partial blocks were persisted before CP & SPOR,\ndue to cluster metadata wasn't updated atomically."}],"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 ordinary local file I/O on an f2fs filesystem — write(2)/mmap dirty pages on a compression-enabled file plus writeback, with syncfs(2) driving the concurrent checkpoint. No network protocol handler is involved.\nAC:L - The attacker controls both sides of the race: one thread overwrites a compressed cluster with incompressible data to enter f2fs_write_raw_pages(), while another thread repeatedly calls the unprivileged syncfs(2), which takes cp_rwsem for write in the window the writer drops it between pages. No condition outside attacker influence is needed to create the inconsistent on-disk cluster state.\nPR:L - Only an unprivileged local account with write access to a file on the f2fs mount is required; f2fs_setflags_common() permits any file owner to set F2FS_COMPR_FL via FS_IOC_SETFLAGS, and compress_extension= mount options enable it automatically. No capability check exists on the write, writeback, or syncfs paths.\nUI:N - The attacker performs every step itself — creating the compressed file, overwriting the cluster, and forcing checkpoints. On Android and embedded devices the f2fs volume is already mounted at boot, so no victim action is needed.\nS:U - The corruption is confined to the f2fs filesystem and kernel managing it; no security authority boundary such as a VM, hypervisor, or IOMMU domain is crossed.\nC:H - Non-atomic cluster conversion corrupts dnode block addresses together with i_compr_blocks and total_valid_block_count, so blocks can become cross-linked — an attacker-controlled file ends up referencing blocks the allocator has reassigned to another user's file, exposing their contents on read. Half-converted clusters also cause stale compressed blocks to be decompressed into the attacker's page cache.\nI:H - This is fundamentally an integrity bug: the commit states data will be corrupted because cluster metadata is not updated atomically, and the resulting inconsistent dnode blkaddrs, i_blocks, and total_valid_block_count are persistent on-disk filesystem corruption that requires fsck. Cross-linked blocks additionally let the attacker overwrite data belonging to other files.\nA:H - The corrupted cluster makes f2fs_sanity_check_cluster()/__f2fs_cluster_blocks() return -EFSCORRUPTED and set SBI_NEED_FSCK, and f2fs_handle_error() can force the filesystem read-only or panic the kernel under errors=panic. On an embedded, automotive, or Android device whose rootfs/userdata is f2fs, the corrupted volume renders the system unbootable until repaired."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/f2fs/compress.c","fs/f2fs/data.c"],"versions":[{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"7d420eaaa18ec8e2bb4eeab8c65c00492ef6f416","status":"affected","versionType":"git"},{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"542c8b3c774a480bfd0804291a12f6f2391b0cd1","status":"affected","versionType":"git"},{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"75abfd61392b1db391bde6d738a30d685b843286","status":"affected","versionType":"git"},{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"2b1b14d9fc94b8feae20808684c8af28ec80f45b","status":"affected","versionType":"git"},{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"52982edfcefd475cc34af663d5c47c0cddaa5739","status":"affected","versionType":"git"},{"version":"4c8ff7095bef64fc47e996a938f7d57f9e077da3","lessThan":"fd244524c2cf07b5f4c3fe8abd6a99225c76544b","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/f2fs/compress.c","fs/f2fs/data.c"],"versions":[{"version":"5.6","status":"affected"},{"version":"0","lessThan":"5.6","status":"unaffected","versionType":"semver"},{"version":"5.15.153","lessThanOrEqual":"5.15.*","status":"unaffected","versionType":"semver"},{"version":"6.1.83","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.6.23","lessThanOrEqual":"6.6.*","status":"unaffected","versionType":"semver"},{"version":"6.7.11","lessThanOrEqual":"6.7.*","status":"unaffected","versionType":"semver"},{"version":"6.8.2","lessThanOrEqual":"6.8.*","status":"unaffected","versionType":"semver"},{"version":"6.9","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.6","versionEndExcluding":"5.15.153"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.1.83"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.6.23"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.7.11"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.8.2"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.6","versionEndExcluding":"6.9"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/7d420eaaa18ec8e2bb4eeab8c65c00492ef6f416"},{"url":"https://git.kernel.org/stable/c/542c8b3c774a480bfd0804291a12f6f2391b0cd1"},{"url":"https://git.kernel.org/stable/c/75abfd61392b1db391bde6d738a30d685b843286"},{"url":"https://git.kernel.org/stable/c/2b1b14d9fc94b8feae20808684c8af28ec80f45b"},{"url":"https://git.kernel.org/stable/c/52982edfcefd475cc34af663d5c47c0cddaa5739"},{"url":"https://git.kernel.org/stable/c/fd244524c2cf07b5f4c3fe8abd6a99225c76544b"}],"title":"f2fs: compress: fix to cover normal cluster write with cp_rwsem","x_generator":{"engine":"bippy-1.2.0"}},"adp":[{"metrics":[{"other":{"type":"ssvc","content":{"id":"CVE-2024-27034","role":"CISA Coordinator","options":[{"Exploitation":"none"},{"Automatable":"no"},{"Technical Impact":"partial"}],"version":"2.0.3","timestamp":"2024-05-09T18:39:02.187775Z"}}}],"title":"CISA ADP Vulnrichment","providerMetadata":{"orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP","dateUpdated":"2024-07-05T17:22:46.153Z"}},{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-02T00:21:05.902Z"},"title":"CVE Program Container","references":[{"url":"https://git.kernel.org/stable/c/7d420eaaa18ec8e2bb4eeab8c65c00492ef6f416","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/542c8b3c774a480bfd0804291a12f6f2391b0cd1","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/75abfd61392b1db391bde6d738a30d685b843286","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/2b1b14d9fc94b8feae20808684c8af28ec80f45b","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/52982edfcefd475cc34af663d5c47c0cddaa5739","tags":["x_transferred"]},{"url":"https://git.kernel.org/stable/c/fd244524c2cf07b5f4c3fe8abd6a99225c76544b","tags":["x_transferred"]}]}]}}