Skip to main content

CVE-2022-48674: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-48674cvecve-2022-48674
Published: Fri May 03 2024 (05/03/2024, 14:51:57 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: erofs: fix pcluster use-after-free on UP platforms During stress testing with CONFIG_SMP disabled, KASAN reports as below: ================================================================== BUG: KASAN: use-after-free in __mutex_lock+0xe5/0xc30 Read of size 8 at addr ffff8881094223f8 by task stress/7789 CPU: 0 PID: 7789 Comm: stress Not tainted 6.0.0-rc1-00002-g0d53d2e882f9 #3 Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2011 Call Trace: <TASK> .. __mutex_lock+0xe5/0xc30 .. z_erofs_do_read_page+0x8ce/0x1560 .. z_erofs_readahead+0x31c/0x580 .. Freed by task 7787 kasan_save_stack+0x1e/0x40 kasan_set_track+0x20/0x30 kasan_set_free_info+0x20/0x40 __kasan_slab_free+0x10c/0x190 kmem_cache_free+0xed/0x380 rcu_core+0x3d5/0xc90 __do_softirq+0x12d/0x389 Last potentially related work creation: kasan_save_stack+0x1e/0x40 __kasan_record_aux_stack+0x97/0xb0 call_rcu+0x3d/0x3f0 erofs_shrink_workstation+0x11f/0x210 erofs_shrink_scan+0xdc/0x170 shrink_slab.constprop.0+0x296/0x530 drop_slab+0x1c/0x70 drop_caches_sysctl_handler+0x70/0x80 proc_sys_call_handler+0x20a/0x2f0 vfs_write+0x555/0x6c0 ksys_write+0xbe/0x160 do_syscall_64+0x3b/0x90 The root cause is that erofs_workgroup_unfreeze() doesn't reset to orig_val thus it causes a race that the pcluster reuses unexpectedly before freeing. Since UP platforms are quite rare now, such path becomes unnecessary. Let's drop such specific-designed path directly instead.

AI-Powered Analysis

AILast updated: 06/27/2025, 23:55:34 UTC

Technical Analysis

CVE-2022-48674 is a use-after-free vulnerability identified in the Linux kernel's EROFS (Enhanced Read-Only File System) implementation, specifically affecting the pcluster handling on UP (Uniprocessor) platforms. The vulnerability arises due to a race condition caused by the erofs_workgroup_unfreeze() function failing to reset a value (orig_val), which leads to the pcluster being reused unexpectedly before it is properly freed. This flaw was detected during stress testing with the CONFIG_SMP (Symmetric Multi-Processing) option disabled, where Kernel Address Sanitizer (KASAN) reported a use-after-free error in the __mutex_lock function. The issue manifests as a read of freed memory, which can cause kernel instability or crashes. The root cause is tied to legacy code paths designed for UP platforms, which are now largely obsolete given the prevalence of SMP systems. The Linux kernel maintainers addressed this vulnerability by removing the unnecessary UP-specific code path, thereby eliminating the race condition. The vulnerability is assigned a CVSS 3.1 base score of 6.2, indicating a medium severity level, with an attack vector of local access (AV:L), low attack complexity (AC:L), no privileges required (PR:N), and no user interaction (UI:N). The impact is limited to availability (A:H), with no confidentiality or integrity loss. No known exploits are reported in the wild. The affected versions correspond to specific Linux kernel commits prior to the fix. This vulnerability is categorized under CWE-416 (Use After Free).

Potential Impact

For European organizations, the primary impact of CVE-2022-48674 is potential denial of service (DoS) due to kernel crashes or system instability when the vulnerable EROFS code path is exercised. Since the vulnerability requires local access and affects only uniprocessor configurations, the risk is somewhat mitigated in modern multi-core server environments. However, embedded systems, legacy devices, or specialized appliances running Linux kernels with SMP disabled or configured for UP platforms could be vulnerable. Such systems might be found in industrial control systems, IoT devices, or older infrastructure components within European enterprises. A successful exploitation could disrupt critical services, leading to operational downtime and impacting availability. Confidentiality and integrity are not directly affected, reducing the risk of data breaches or unauthorized data modification. Given the medium severity and local attack vector, the threat is moderate but should not be ignored, especially in environments where uptime and reliability are critical.

Mitigation Recommendations

European organizations should take the following specific mitigation steps: 1) Identify and inventory Linux systems running kernels with the affected versions or commits, especially those configured for uniprocessor operation or embedded use cases. 2) Apply the latest Linux kernel patches that remove the vulnerable UP-specific code path in the EROFS implementation. If immediate patching is not feasible, consider disabling or avoiding the use of the EROFS filesystem on affected systems. 3) For embedded or legacy devices where kernel updates are challenging, evaluate the possibility of upgrading firmware or replacing devices with supported hardware running updated kernels. 4) Implement strict local access controls and monitoring to prevent unauthorized local users from triggering the vulnerability. 5) Use kernel hardening and runtime protection tools such as KASAN during testing phases to detect similar memory corruption issues proactively. 6) Incorporate this vulnerability into vulnerability management and patching cycles, prioritizing systems with UP configurations or those using EROFS. 7) Conduct stress testing and stability assessments post-patching to ensure the fix does not introduce regressions.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-02-25T13:44:28.322Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdd4d9

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

Last enriched: 6/27/2025, 11:55:34 PM

Last updated: 8/14/2025, 7:59:29 PM

Views: 15

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