{ "dataType": "CVE_RECORD", "dataVersion": "5.2", "cveMetadata": { "cveId": "CVE-2024-53220", "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "state": "PUBLISHED", "assignerShortName": "Linux", "dateReserved": "2024-11-19T17:17:25.024Z", "datePublished": "2024-12-27T13:50:05.416Z", "dateUpdated": "2026-08-05T11:44:43.413Z" }, "containers": { "cna": { "providerMetadata": { "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67", "shortName": "Linux", "dateUpdated": "2026-08-05T11:44:43.413Z" }, "descriptions": [ { "lang": "en", "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nf2fs: fix to account dirty data in __get_secs_required()\n\nIt will trigger system panic w/ testcase in [1]:\n\n------------[ cut here ]------------\nkernel BUG at fs/f2fs/segment.c:2752!\nRIP: 0010:new_curseg+0xc81/0x2110\nCall Trace:\n f2fs_allocate_data_block+0x1c91/0x4540\n do_write_page+0x163/0xdf0\n f2fs_outplace_write_data+0x1aa/0x340\n f2fs_do_write_data_page+0x797/0x2280\n f2fs_write_single_data_page+0x16cd/0x2190\n f2fs_write_cache_pages+0x994/0x1c80\n f2fs_write_data_pages+0x9cc/0xea0\n do_writepages+0x194/0x7a0\n filemap_fdatawrite_wbc+0x12b/0x1a0\n __filemap_fdatawrite_range+0xbb/0xf0\n file_write_and_wait_range+0xa1/0x110\n f2fs_do_sync_file+0x26f/0x1c50\n f2fs_sync_file+0x12b/0x1d0\n vfs_fsync_range+0xfa/0x230\n do_fsync+0x3d/0x80\n __x64_sys_fsync+0x37/0x50\n x64_sys_call+0x1e88/0x20d0\n do_syscall_64+0x4b/0x110\n entry_SYSCALL_64_after_hwframe+0x76/0x7e\n\nThe root cause is if checkpoint_disabling and lfs_mode are both on,\nit will trigger OPU for all overwritten data, it may cost more free\nsegment than expected, so f2fs must account those data correctly to\ncalculate cosumed free segments later, and return ENOSPC earlier to\navoid run out of free segment during block allocation.\n\n[1] https://lore.kernel.org/fstests/20241015025106.3203676-1-chao@kernel.org/" } ], "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 filesystem syscalls (write(2)/fsync(2)/create/setattr on a mounted f2fs volume), with the reported trace running from __x64_sys_fsync down to f2fs_allocate_data_block. No network or remote peer data is involved.\nAC:L - Once the volume is mounted in the affected configuration (mode=lfs — mandatory for zoned block devices — plus checkpoint=disable, the standard Android userdata-checkpointing mode), the attacker deterministically triggers it by overwriting data and fsync'ing until free sections are exhausted; no race and no attacker-uncontrollable state is required.\nPR:L - Any unprivileged local user with write access to the f2fs mount (e.g. any Android app on /data, or any user on a shared f2fs volume) can drive the dirty-data accounting error; no capability, CAP_SYS_ADMIN, or mount privilege is needed since the mount is performed by the system.\nUI:N - Exploitation needs only the attacker's own file writes and fsync on an already-mounted filesystem; no action by another user or administrator is required at exploit time.\nS:U - The miscounting, the BUG_ON, and the resulting out-of-bounds accesses are all confined to the kernel's own security authority; no VM, IOMMU, or sandbox boundary is crossed.\nC:H - On the affected trees the allocation failure is not propagated, so execution continues with an out-of-range secno/segno, performing out-of-bounds reads on free_segmap and on sit_i->sentries[] past their allocations, giving an attacker-influenced heap read primitive that can disclose adjacent kernel memory.\nI:H - The same out-of-range segno drives out-of-bounds writes — set_bit()/test_and_set_bit() past free_segmap/free_secmap and sit_i->sentries[segno].type = type past the sentries array — plus block allocation at invalid addresses and on-disk metadata inconsistency (SBI_NEED_FSCK), i.e. attacker-reachable kernel heap corruption.\nA:H - The reported symptom is a hard kernel panic (BUG at fs/f2fs/segment.c:2752 via f2fs_bug_on with CONFIG_F2FS_CHECK_FS); without that config it warns and calls f2fs_stop_checkpoint(STOP_CP_REASON_NO_SEGMENT), shutting the filesystem down and failing all subsequent I/O." } ] } ], "affected": [ { "product": "Linux", "vendor": "Linux", "defaultStatus": "unaffected", "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git", "programFiles": [ "fs/f2fs/segment.h" ], "versions": [ { "version": "4354994f097d068a894aa1a0860da54571df3582", "lessThan": "6e58b2987960efcd917bc42da781cee256213618", "status": "affected", "versionType": "git" }, { "version": "4354994f097d068a894aa1a0860da54571df3582", "lessThan": "f1b8bfe8d2f2fdf905d37c174d5bc1cd2b6910c5", "status": "affected", "versionType": "git" }, { "version": "4354994f097d068a894aa1a0860da54571df3582", "lessThan": "9313b85ddc120e2d2f0efaf86d0204d4c98d60b1", "status": "affected", "versionType": "git" }, { "version": "4354994f097d068a894aa1a0860da54571df3582", "lessThan": "e812871c068cc0f91ff9f5cee87d00df1c44aae4", "status": "affected", "versionType": "git" }, { "version": "4354994f097d068a894aa1a0860da54571df3582", "lessThan": "1acd73edbbfef2c3c5b43cba4006a7797eca7050", "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/segment.h" ], "versions": [ { "version": "4.20", "status": "affected" }, { "version": "0", "lessThan": "4.20", "status": "unaffected", "versionType": "semver" }, { "version": "6.1.120", "lessThanOrEqual": "6.1.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.6.64", "lessThanOrEqual": "6.6.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.11.11", "lessThanOrEqual": "6.11.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.12.2", "lessThanOrEqual": "6.12.*", "status": "unaffected", "versionType": "semver" }, { "version": "6.13", "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": "4.20", "versionEndExcluding": "6.1.120" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.20", "versionEndExcluding": "6.6.64" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.20", "versionEndExcluding": "6.11.11" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.20", "versionEndExcluding": "6.12.2" }, { "vulnerable": true, "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*", "versionStartIncluding": "4.20", "versionEndExcluding": "6.13" } ] } ] } ], "references": [ { "url": "https://git.kernel.org/stable/c/6e58b2987960efcd917bc42da781cee256213618" }, { "url": "https://git.kernel.org/stable/c/f1b8bfe8d2f2fdf905d37c174d5bc1cd2b6910c5" }, { "url": "https://git.kernel.org/stable/c/9313b85ddc120e2d2f0efaf86d0204d4c98d60b1" }, { "url": "https://git.kernel.org/stable/c/e812871c068cc0f91ff9f5cee87d00df1c44aae4" }, { "url": "https://git.kernel.org/stable/c/1acd73edbbfef2c3c5b43cba4006a7797eca7050" } ], "title": "f2fs: fix to account dirty data in __get_secs_required()", "x_generator": { "engine": "bippy-1.2.0" } }, "adp": [ { "title": "CVE Program Container", "references": [ { "url": "https://lists.debian.org/debian-lts-announce/2025/03/msg00001.html" } ], "providerMetadata": { "orgId": "af854a3a-2127-422b-91ae-364da2661108", "shortName": "CVE", "dateUpdated": "2025-11-03T20:47:48.528Z" } } ] } }