Skip to main content

CVE-2022-49062: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49062cvecve-2022-49062
Published: Wed Feb 26 2025 (02/26/2025, 01:54:31 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: cachefiles: Fix KASAN slab-out-of-bounds in cachefiles_set_volume_xattr Use the actual length of volume coherency data when setting the xattr to avoid the following KASAN report. BUG: KASAN: slab-out-of-bounds in cachefiles_set_volume_xattr+0xa0/0x350 [cachefiles] Write of size 4 at addr ffff888101e02af4 by task kworker/6:0/1347 CPU: 6 PID: 1347 Comm: kworker/6:0 Kdump: loaded Not tainted 5.18.0-rc1-nfs-fscache-netfs+ #13 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-4.fc34 04/01/2014 Workqueue: events fscache_create_volume_work [fscache] Call Trace: <TASK> dump_stack_lvl+0x45/0x5a print_report.cold+0x5e/0x5db ? __lock_text_start+0x8/0x8 ? cachefiles_set_volume_xattr+0xa0/0x350 [cachefiles] kasan_report+0xab/0x120 ? cachefiles_set_volume_xattr+0xa0/0x350 [cachefiles] kasan_check_range+0xf5/0x1d0 memcpy+0x39/0x60 cachefiles_set_volume_xattr+0xa0/0x350 [cachefiles] cachefiles_acquire_volume+0x2be/0x500 [cachefiles] ? __cachefiles_free_volume+0x90/0x90 [cachefiles] fscache_create_volume_work+0x68/0x160 [fscache] process_one_work+0x3b7/0x6a0 worker_thread+0x2c4/0x650 ? process_one_work+0x6a0/0x6a0 kthread+0x16c/0x1a0 ? kthread_complete_and_exit+0x20/0x20 ret_from_fork+0x22/0x30 </TASK> Allocated by task 1347: kasan_save_stack+0x1e/0x40 __kasan_kmalloc+0x81/0xa0 cachefiles_set_volume_xattr+0x76/0x350 [cachefiles] cachefiles_acquire_volume+0x2be/0x500 [cachefiles] fscache_create_volume_work+0x68/0x160 [fscache] process_one_work+0x3b7/0x6a0 worker_thread+0x2c4/0x650 kthread+0x16c/0x1a0 ret_from_fork+0x22/0x30 The buggy address belongs to the object at ffff888101e02af0 which belongs to the cache kmalloc-8 of size 8 The buggy address is located 4 bytes inside of 8-byte region [ffff888101e02af0, ffff888101e02af8) The buggy address belongs to the physical page: page:00000000a2292d70 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101e02 flags: 0x17ffffc0000200(slab|node=0|zone=2|lastcpupid=0x1fffff) raw: 0017ffffc0000200 0000000000000000 dead000000000001 ffff888100042280 raw: 0000000000000000 0000000080660066 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888101e02980: fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc ffff888101e02a00: 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 >ffff888101e02a80: fc fc fc fc 00 fc fc fc fc 00 fc fc fc fc 04 fc ^ ffff888101e02b00: fc fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc ffff888101e02b80: fc fc 00 fc fc fc fc 00 fc fc fc fc 00 fc fc fc ==================================================================

AI-Powered Analysis

AILast updated: 07/01/2025, 01:44:26 UTC

Technical Analysis

CVE-2022-49062 is a vulnerability identified in the Linux kernel's cachefiles module, specifically within the function cachefiles_set_volume_xattr. The flaw involves a slab-out-of-bounds write detected by the Kernel Address Sanitizer (KASAN). The root cause is the improper use of the length of volume coherency data when setting extended attributes (xattr), leading to a write operation that exceeds the allocated memory boundary by 4 bytes. This memory corruption occurs within a small 8-byte kmalloc slab object, indicating a critical boundary violation. The vulnerability manifests during the execution of the fscache_create_volume_work worker thread, which manages cache volumes. The out-of-bounds write can potentially corrupt kernel memory, leading to undefined behavior such as system crashes, data corruption, or privilege escalation. While no known exploits are currently reported in the wild, the nature of the bug—kernel memory corruption—makes it a significant security concern. The issue affects Linux kernel versions identified by the commit hash 413a4a6b0b5553f2423d210f65e98c211b99c3f8, and it was publicly disclosed on February 26, 2025. The vulnerability does not require user interaction but does require kernel-level execution context, typically triggered by kernel worker threads managing cachefiles. The patch involves correctly using the actual length of the volume coherency data to prevent the out-of-bounds write, thereby eliminating the KASAN slab violation.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running affected Linux kernel versions with the cachefiles module enabled. Given Linux's widespread use in servers, cloud infrastructure, and embedded devices across Europe, exploitation could lead to kernel crashes, denial of service, or potentially privilege escalation if attackers can trigger the vulnerable code path. This could disrupt critical services, especially in sectors relying heavily on Linux-based infrastructure such as finance, telecommunications, government, and manufacturing. The risk is heightened in environments where kernel modules like cachefiles are actively used for caching network filesystems or similar workloads. Although no active exploits are known, the potential for kernel memory corruption means attackers with local access or the ability to execute code at kernel level could leverage this flaw to compromise system integrity and availability. This could result in operational downtime, data loss, or unauthorized access, impacting compliance with European data protection regulations and operational resilience requirements.

Mitigation Recommendations

European organizations should prioritize updating their Linux kernels to versions that include the patch for CVE-2022-49062. Specifically, applying the official kernel updates that correct the length handling in cachefiles_set_volume_xattr is essential. Systems that do not require the cachefiles module should consider disabling it to reduce the attack surface. Additionally, organizations should implement strict access controls to limit who can load kernel modules or execute code with elevated privileges, reducing the risk of exploitation. Employing kernel hardening techniques such as Kernel Address Sanitizer (KASAN) in testing environments can help detect similar issues proactively. Monitoring kernel logs for KASAN reports or unusual cachefiles activity can provide early warning signs. For critical infrastructure, consider deploying intrusion detection systems capable of identifying anomalous kernel behavior. Finally, maintain a robust patch management process to ensure timely deployment of security updates across all Linux-based systems.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T01:49:39.243Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982fc4522896dcbe6a37

Added to database: 5/21/2025, 9:09:03 AM

Last enriched: 7/1/2025, 1:44:26 AM

Last updated: 8/17/2025, 2:17:16 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