CVE-2023-52748·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: f2fs: avoid format-overflow warning With gcc and W=1 option, there's a warning like this: fs/f2fs/compress.c: In function ‘f2fs_init_page_array_cache’: fs/f2fs/compress.c:1984:47: error: ‘%u’ directive writing between 1 and 7 bytes into a region of size between 5 and 8 [-Werror=format-overflow=] 1984 | sprintf(slab_name, "f2fs_page_array_entry-%u:%u", MAJOR(dev), MINOR(dev)); | ^~ String "f2fs_page_array_entry-%u:%u" can up to 35. The first "%u" can up to 4 and the second "%u" can up to 7, so total size is "24 + 4 + 7 = 35". slab_name's size should be 35 rather than 32.
- Severity
- high
- Software
- Kernel
- Fixed in
- 6.6.3
- Published
- 2024-05-21
Affected versions
From: 6.6
Until: 6.6.3
Fixed in: 6.6.3
How to fix this CVE
Update your Linux kernel to version 6.6.3 or later to patch a buffer overflow vulnerability in the f2fs compression module's slab naming logic. This fix corrects an undersized character array that could lead to stack corruption during kernel memory allocation. Apply the patch through your distribution's standard kernel update mechanism.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Run `uname -r` to check your current kernel version. Versions 6.6.0 through 6.6.2 are vulnerable.
- Check if f2fs is actively used by running `cat /proc/filesystems | grep f2fs`. If f2fs is listed and mounted, the vulnerability surface is exposed.
- Inspect kernel logs with `sudo dmesg | grep -i 'f2fs\|slab\|overflow'` for any memory allocation warnings or stack trace patterns related to f2fs_page_array_entry naming.
- After patching, verify the kernel version with `uname -r` confirms 6.6.3 or newer, and reboot if necessary with `sudo reboot` to load the patched kernel.
FAQ
What is CVE-2023-52748?
CVE-2023-52748 is a buffer overflow vulnerability in the Linux kernel's f2fs (Flash-Friendly File System) compression module where an undersized string buffer (32 bytes instead of 35) is used for formatting slab cache names, allowing stack memory corruption during kernel memory allocation operations.
Is CVE-2023-52748 being actively exploited?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog and has no public exploits available. However, the high CVSS score (7.8) indicates it poses significant risk if exploited by local attackers.
What versions of Kernel are affected by CVE-2023-52748?
Linux kernel versions 6.6.0 through 6.6.2 are vulnerable. The fix was released in kernel version 6.6.3.
How do I check if my server is vulnerable to CVE-2023-52748?
Run `uname -r` and check if the output shows a kernel version between 6.6.0 and 6.6.2. If so, your system is vulnerable. You can also verify with `cat /proc/version` for additional confirmation.
Does Defensia detect CVE-2023-52748?
Yes — Defensia's CVE advisory scanner compares installed package versions against the NVD database. If the Linux kernel is installed on a monitored server, CVE-2023-52748 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
- https://git.kernel.org/stable/c/3eebe636cac53886bd5d1cdd55e082ec9e84983f
- https://git.kernel.org/stable/c/526dd7540a09ecf87b5f54f3ab4e0a2528f25a79
- https://git.kernel.org/stable/c/6fca08fd3085253b48fcb1bd243a0a5e18821a00
- https://git.kernel.org/stable/c/c041f5ddef00c731c541e00bc8ae97b8c84c682f
- https://git.kernel.org/stable/c/e0d4e8acb3789c5a8651061fbab62ca24a45c063
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2023-52748. Free for 1 server.
Get started free