Skip to main content

CVE-2023-52770: Vulnerability in Linux Linux

High
VulnerabilityCVE-2023-52770cvecve-2023-52770
Published: Tue May 21 2024 (05/21/2024, 15:30:52 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: f2fs: split initial and dynamic conditions for extent_cache Let's allocate the extent_cache tree without dynamic conditions to avoid a missing condition causing a panic as below. # create a file w/ a compressed flag # disable the compression # panic while updating extent_cache F2FS-fs (dm-64): Swapfile: last extent is not aligned to section F2FS-fs (dm-64): Swapfile (3) is not align to section: 1) creat(), 2) ioctl(F2FS_IOC_SET_PIN_FILE), 3) fallocate(2097152 * N) Adding 124996k swap on ./swap-file. Priority:0 extents:2 across:17179494468k ================================================================== BUG: KASAN: null-ptr-deref in instrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline] BUG: KASAN: null-ptr-deref in atomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline] BUG: KASAN: null-ptr-deref in queued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline] BUG: KASAN: null-ptr-deref in __raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline] BUG: KASAN: null-ptr-deref in _raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295 Write of size 4 at addr 0000000000000030 by task syz-executor154/3327 CPU: 0 PID: 3327 Comm: syz-executor154 Tainted: G O 5.10.185 #1 Hardware name: emulation qemu-x86/qemu-x86, BIOS 2023.01-21885-gb3cc1cd24d 01/01/2023 Call Trace: __dump_stack out/common/lib/dump_stack.c:77 [inline] dump_stack_lvl+0x17e/0x1c4 out/common/lib/dump_stack.c:118 __kasan_report+0x16c/0x260 out/common/mm/kasan/report.c:415 kasan_report+0x51/0x70 out/common/mm/kasan/report.c:428 kasan_check_range+0x2f3/0x340 out/common/mm/kasan/generic.c:186 __kasan_check_write+0x14/0x20 out/common/mm/kasan/shadow.c:37 instrument_atomic_read_write out/common/include/linux/instrumented.h:101 [inline] atomic_try_cmpxchg_acquire out/common/include/asm-generic/atomic-instrumented.h:705 [inline] queued_write_lock out/common/include/asm-generic/qrwlock.h:92 [inline] __raw_write_lock out/common/include/linux/rwlock_api_smp.h:211 [inline] _raw_write_lock+0x5a/0x110 out/common/kernel/locking/spinlock.c:295 __drop_extent_tree+0xdf/0x2f0 out/common/fs/f2fs/extent_cache.c:1155 f2fs_drop_extent_tree+0x17/0x30 out/common/fs/f2fs/extent_cache.c:1172 f2fs_insert_range out/common/fs/f2fs/file.c:1600 [inline] f2fs_fallocate+0x19fd/0x1f40 out/common/fs/f2fs/file.c:1764 vfs_fallocate+0x514/0x9b0 out/common/fs/open.c:310 ksys_fallocate out/common/fs/open.c:333 [inline] __do_sys_fallocate out/common/fs/open.c:341 [inline] __se_sys_fallocate out/common/fs/open.c:339 [inline] __x64_sys_fallocate+0xb8/0x100 out/common/fs/open.c:339 do_syscall_64+0x35/0x50 out/common/arch/x86/entry/common.c:46

AI-Powered Analysis

AILast updated: 06/28/2025, 01:39:59 UTC

Technical Analysis

CVE-2023-52770 is a vulnerability identified in the Linux kernel's F2FS (Flash-Friendly File System) implementation. The issue arises from improper handling of extent_cache allocation, specifically due to a missing condition when splitting initial and dynamic conditions for the extent_cache tree. This flaw can lead to a kernel panic triggered by certain file operations involving compressed files and swapfiles on F2FS. The vulnerability manifests when a file is created with a compressed flag, compression is subsequently disabled, and then the extent_cache is updated, causing a null pointer dereference and kernel panic. The detailed kernel stack trace indicates that the panic is related to null pointer dereferences in atomic read/write operations and locking mechanisms within the kernel's memory management and file system code. The root cause is the allocation of the extent_cache tree without properly applying dynamic conditions, leading to inconsistent state and memory corruption. This vulnerability affects Linux kernel versions referenced by the provided commit hashes, and it is particularly relevant for systems using the F2FS file system, which is optimized for flash storage devices. Although no known exploits are currently reported in the wild, the nature of the bug suggests it could be triggered by local users or processes with the ability to manipulate files on F2FS partitions, potentially causing denial of service through kernel panics. The vulnerability does not require authentication beyond local access but does require specific file operations to trigger the fault. The fix involves separating initial and dynamic conditions for extent_cache allocation to prevent the missing condition that leads to the panic.

Potential Impact

For European organizations, the impact of CVE-2023-52770 primarily involves potential denial of service (DoS) conditions on Linux systems using the F2FS file system. This could disrupt critical services, especially in environments relying on flash storage devices where F2FS is deployed for performance reasons. Systems affected may experience kernel panics leading to crashes and forced reboots, resulting in downtime and possible data loss if swapfiles or compressed files are involved. While the vulnerability does not appear to allow privilege escalation or remote code execution, the DoS impact can affect availability of services, which is critical for sectors such as finance, healthcare, and industrial control systems prevalent in Europe. Additionally, the complexity of the bug and the requirement for specific file operations mean that exploitation is less likely remotely but could be leveraged by malicious insiders or compromised local accounts. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to accidental or intentional triggering of the kernel panic, impacting system stability and reliability.

Mitigation Recommendations

European organizations should implement the following specific mitigation steps: 1) Apply the official Linux kernel patches that address CVE-2023-52770 as soon as they become available from trusted Linux distributions or the kernel maintainers. 2) Audit and monitor systems using the F2FS file system, particularly those with swapfiles or compressed files, to identify any unusual file operations that could trigger the vulnerability. 3) Limit local user permissions to prevent unauthorized file manipulations on F2FS partitions, reducing the risk of intentional exploitation. 4) Consider migrating critical workloads from F2FS to more widely used and mature file systems like ext4 or XFS if immediate patching is not feasible, especially on systems where availability is paramount. 5) Implement robust system monitoring and alerting for kernel panics or crashes to enable rapid response and recovery. 6) For virtualized or containerized environments using Linux kernels with F2FS, ensure host and guest kernels are updated to prevent propagation of the issue. These measures go beyond generic advice by focusing on the specific file system and operational contexts affected by this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T15:19:24.239Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9821c4522896dcbdd832

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

Last enriched: 6/28/2025, 1:39:59 AM

Last updated: 7/25/2025, 4:08:03 PM

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