CVE-2022-49464·Kernel vulnerability
In the Linux kernel, the following vulnerability has been resolved: erofs: fix buffer copy overflow of ztailpacking feature I got some KASAN report as below: [ 46.959738] ================================================================== [ 46.960430] BUG: KASAN: use-after-free in z_erofs_shifted_transform+0x2bd/0x370 [ 46.960430] Read of size 4074 at addr ffff8880300c2f8e by task fssum/188 ... [ 46.960430] Call Trace: [ 46.960430] <TASK> [ 46.960430] dump_stack_lvl+0x41/0x5e [ 46.960430] print_report.cold+0xb2/0x6b7 [ 46.960430] ? z_erofs_shifted_transform+0x2bd/0x370 [ 46.960430] kasan_report+0x8a/0x140 [ 46.960430] ? z_erofs_shifted_transform+0x2bd/0x370 [ 46.960430] kasan_check_range+0x14d/0x1d0 [ 46.960430] memcpy+0x20/0x60 [ 46.960430] z_erofs_shifted_transform+0x2bd/0x370 [ 46.960430] z_erofs_decompress_pcluster+0xaae/0x1080 The root cause is that the tail pcluster won't be a complete filesystem block anymore. So if ztailpacking is used, the second part of an uncompressed tail pcluster may not be ``rq->pageofs_out``.
- Severity
- high
- Software
- Kernel
- Fixed in
- 5.18.3
- Published
- 2025-02-26
Affected versions
From: 5.18
Until: 5.18.3
Fixed in: 5.18.3
How to fix this CVE
Update your Linux kernel to version 5.18.3 or later to address a buffer overflow vulnerability in the EROFS ztailpacking feature that can cause use-after-free memory access. Systems running kernel versions 5.18 through 5.18.2 should prioritize this update as the vulnerability affects compressed filesystem operations and can lead to memory corruption.
sudo dnf update kernel kernel-develDefensia detects this vulnerability
How to check if you are affected
- Step 1: Check kernel version with `uname -r` — vulnerable if output shows 5.18.0, 5.18.1, or 5.18.2
- Step 2: Verify EROFS support is enabled with `grep CONFIG_EROFS /boot/config-$(uname -r)` — if returns y or m, the module is active
- Step 3: Check system logs for KASAN memory safety warnings using `dmesg | grep -i 'KASAN\|use-after-free\|z_erofs'` — look for reports mentioning z_erofs_shifted_transform
- Step 4: After patching, confirm kernel version with `uname -r` returns 5.18.3 or later and reboot if necessary with `sudo reboot`
FAQ
What is CVE-2022-49464?
A buffer overflow vulnerability in the Linux kernel's EROFS (Enhanced Read-Only File System) ztailpacking feature that allows uncompressed tail clusters to exceed expected buffer boundaries, triggering use-after-free memory access during decompression operations.
Is CVE-2022-49464 being actively exploited?
No, this vulnerability is not listed on CISA's Known Exploited Vulnerabilities catalog and no public exploits are currently available.
What versions of Kernel are affected by CVE-2022-49464?
Linux kernel versions 5.18 through 5.18.2 are vulnerable; version 5.18.3 and later include the fix.
How do I check if my server is vulnerable to CVE-2022-49464?
Run `uname -r` and check if the output matches 5.18.0, 5.18.1, or 5.18.2; also verify EROFS is enabled with `grep CONFIG_EROFS /boot/config-$(uname -r)`.
Does Defensia detect CVE-2022-49464?
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-2022-49464 will appear in your dashboard with remediation steps.
Related Kernel CVEs
References
Track CVEs across your fleet automatically
Defensia scans your Linux servers and tells you exactly which ones are running vulnerable versions — including CVE-2022-49464. Free for 1 server.
Get started free