Skip to main content

CVE-2024-42273: Vulnerability in Linux Linux

High
VulnerabilityCVE-2024-42273cvecve-2024-42273
Published: Sat Aug 17 2024 (08/17/2024, 08:54:27 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: f2fs: assign CURSEG_ALL_DATA_ATGC if blkaddr is valid mkdir /mnt/test/comp f2fs_io setflags compression /mnt/test/comp dd if=/dev/zero of=/mnt/test/comp/testfile bs=16k count=1 truncate --size 13 /mnt/test/comp/testfile In the above scenario, we can get a BUG_ON. kernel BUG at fs/f2fs/segment.c:3589! Call Trace: do_write_page+0x78/0x390 [f2fs] f2fs_outplace_write_data+0x62/0xb0 [f2fs] f2fs_do_write_data_page+0x275/0x740 [f2fs] f2fs_write_single_data_page+0x1dc/0x8f0 [f2fs] f2fs_write_multi_pages+0x1e5/0xae0 [f2fs] f2fs_write_cache_pages+0xab1/0xc60 [f2fs] f2fs_write_data_pages+0x2d8/0x330 [f2fs] do_writepages+0xcf/0x270 __writeback_single_inode+0x44/0x350 writeback_sb_inodes+0x242/0x530 __writeback_inodes_wb+0x54/0xf0 wb_writeback+0x192/0x310 wb_workfn+0x30d/0x400 The reason is we gave CURSEG_ALL_DATA_ATGC to COMPR_ADDR where the page was set the gcing flag by set_cluster_dirty().

AI-Powered Analysis

AILast updated: 06/27/2025, 20:43:23 UTC

Technical Analysis

CVE-2024-42273 is a vulnerability identified in the Linux kernel's f2fs (Flash-Friendly File System) module. The issue arises from improper assignment of the CURSEG_ALL_DATA_ATGC flag when the block address (blkaddr) is valid during certain file operations involving compression. Specifically, when performing a sequence of operations such as creating a directory, setting compression flags on it, writing data to a file, and then truncating the file, the kernel triggers a BUG_ON condition at fs/f2fs/segment.c line 3589. This bug trace indicates a kernel panic or crash caused by an invalid state related to garbage collection flags on pages (set by set_cluster_dirty) being incorrectly assigned to compression address flags. The vulnerability is rooted in the f2fs_outplace_write_data and related write functions that handle data page writes and writeback operations. The affected Linux kernel versions include several commits identified by their hashes, indicating this is a recent regression or bug introduced in specific kernel builds. While no public exploits are known at this time, the bug can cause a kernel panic, leading to denial of service (DoS) by crashing the system or causing instability when handling compressed files on f2fs partitions. This vulnerability is particularly relevant for systems using f2fs with compression enabled, which is common in embedded devices, mobile platforms, and some Linux distributions optimized for flash storage. The lack of a CVSS score suggests this is a newly disclosed issue pending further assessment. The root cause is a logic error in flag assignment during garbage collection and writeback, which can be triggered by specific file operations involving compression and truncation on f2fs filesystems.

Potential Impact

For European organizations, the primary impact of CVE-2024-42273 is the potential for denial of service due to kernel panics on systems using the f2fs filesystem with compression enabled. This can disrupt critical services, especially in environments relying on embedded Linux devices, IoT infrastructure, or mobile platforms that utilize f2fs for flash storage optimization. Enterprises running Linux servers or workstations with f2fs partitions could experience system crashes or data unavailability, affecting operational continuity. While this vulnerability does not appear to allow privilege escalation or remote code execution, the resulting instability can lead to service outages, data loss during crashes, and increased maintenance overhead. Organizations in sectors such as telecommunications, automotive, industrial control systems, and mobile device manufacturing—where f2fs is more prevalent—may face higher risks. Additionally, the inability to reliably write compressed data could degrade performance or cause data integrity issues if not patched. Given the kernel-level nature of the bug, recovery may require system reboots and kernel updates, impacting uptime and operational efficiency.

Mitigation Recommendations

To mitigate CVE-2024-42273, European organizations should: 1) Identify and inventory all systems using the f2fs filesystem with compression enabled, focusing on embedded devices, mobile platforms, and Linux servers. 2) Apply kernel updates or patches from trusted Linux kernel maintainers or distributions as soon as they become available to address this specific bug. Since no official patch links are provided yet, closely monitor Linux kernel mailing lists and vendor advisories for updates. 3) Temporarily disable compression on f2fs partitions where feasible to avoid triggering the vulnerability until a patch is applied. This can be done by remounting the filesystem without compression flags or reformatting if necessary. 4) Implement robust monitoring for kernel panics and system crashes related to f2fs operations to detect exploitation attempts or accidental triggers early. 5) For critical systems, consider isolating or limiting access to devices with f2fs compression enabled to reduce exposure. 6) Conduct thorough testing of kernel updates in staging environments to ensure stability before deployment. 7) Educate system administrators about the specific file operation sequences that trigger the bug to avoid inadvertent system crashes during maintenance or automated tasks.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-07-30T07:40:12.260Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdcce6

Added to database: 5/21/2025, 9:08:48 AM

Last enriched: 6/27/2025, 8:43:23 PM

Last updated: 7/29/2025, 1:56:43 AM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats