CVE-2023-52852·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: f2fs: compress: fix to avoid use-after-free on dic Call trace: __memcpy+0x128/0x250 f2fs_read_multi_pages+0x940/0xf7c f2fs_mpage_readpages+0x5a8/0x624 f2fs_readahead+0x5c/0x110 page_cache_ra_unbounded+0x1b8/0x590 do_sync_mmap_readahead+0x1dc/0x2e4 filemap_fault+0x254/0xa8c f2fs_filemap_fault+0x2c/0x104 __do_fault+0x7c/0x238 do_handle_mm_fault+0x11bc/0x2d14 do_mem_abort+0x3a8/0x1004 el0_da+0x3c/0xa0 el0t_64_sync_handler+0xc4/0xec el0t_64_sync+0x1b4/0x1b8 In f2fs_read_multi_pages(), once f2fs_decompress_cluster() was called if we hit cached page in compress_inode's cache, dic may be released, it needs break the loop rather than continuing it, in order to avoid accessing invalid dic pointer.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.6.2
- Published
- 2024-05-21
Affected versions
From: 6.6
Until: 6.6.2
Fixed in: 6.6.2
How to fix this CVE
Update your Linux kernel to version 6.6.2 or later to resolve a use-after-free vulnerability in the f2fs compression module. This flaw could allow local attackers with system access to trigger memory corruption during multi-page read operations on compressed filesystems. Apply the latest kernel patches immediately, especially if your systems use f2fs with compression enabled.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check your current kernel version with `uname -r` and compare against 6.6.2—if you see 6.6.0 through 6.6.1, you are vulnerable
- Step 2: Verify if f2fs compression is active on mounted filesystems by running `grep f2fs /proc/mounts | grep compress`
- Step 3: Search kernel logs for crash signatures using `dmesg | grep -i 'memcpy\|use-after-free\|f2fs_read_multi_pages'` or check `/var/log/kern.log` for similar patterns
- Step 4: After patching, reboot the system with `sudo reboot` and confirm the new kernel is running via `uname -r` showing version 6.6.2 or higher
FAQ
What is CVE-2023-52852?
CVE-2023-52852 is a use-after-free vulnerability in the Linux kernel's f2fs (Flash-Friendly File System) compression module. When decompressing multi-page read operations, the code may continue accessing an already-freed dictionary pointer if a cached page is encountered, leading to kernel memory corruption.
Is CVE-2023-52852 being actively exploited?
No, CVE-2023-52852 is not listed in CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available. However, the vulnerability remains critical due to its potential for denial-of-service or privilege escalation.
What versions of Kernel are affected by CVE-2023-52852?
Linux kernel versions 6.6.0, 6.6.1, and 6.6.2-rc versions are affected. The vulnerability was patched in kernel 6.6.2 stable release.
How do I check if my server is vulnerable to CVE-2023-52852?
Run `uname -r` to see your kernel version. If it shows 6.6.0 or 6.6.1, you are vulnerable. Additionally, check if f2fs with compression is in use via `grep f2fs /proc/mounts | grep compress`.
Does Defensia detect CVE-2023-52852?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If Kernel is installed on a monitored server, CVE-2023-52852 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/8c4504cc0c64862740a6acb301e0cfa59580dbc5
- https://git.kernel.org/stable/c/932ddb5c29e884cc6fac20417ece72ba4a35c401
- https://git.kernel.org/stable/c/9375ea7f269093d7c884857ae1f47633a91f429c
- https://git.kernel.org/stable/c/9d065aa52b6ee1b06f9c4eca881c9b4425a12ba2
- https://git.kernel.org/stable/c/b0327c84e91a0f4f0abced8cb83ec86a7083f086
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52852. Free for 1 server.
Get started free