Skip to main content

CVE-2022-49381: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49381cvecve-2022-49381
Published: Wed Feb 26 2025 (02/26/2025, 02:11:18 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: jffs2: fix memory leak in jffs2_do_fill_super If jffs2_iget() or d_make_root() in jffs2_do_fill_super() returns an error, we can observe the following kmemleak report: -------------------------------------------- unreferenced object 0xffff888105a65340 (size 64): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<ffffffff859c45e5>] kmem_cache_alloc_trace+0x475/0x8a0 [<ffffffff86160146>] jffs2_sum_init+0x96/0x1a0 [<ffffffff86140e25>] jffs2_do_mount_fs+0x745/0x2120 [<ffffffff86149fec>] jffs2_do_fill_super+0x35c/0x810 [<ffffffff8614aae9>] jffs2_fill_super+0x2b9/0x3b0 [...] unreferenced object 0xffff8881bd7f0000 (size 65536): comm "mount", pid 710, jiffies 4302851558 (age 58.239s) hex dump (first 32 bytes): bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb bb ................ backtrace: [<ffffffff858579ba>] kmalloc_order+0xda/0x110 [<ffffffff85857a11>] kmalloc_order_trace+0x21/0x130 [<ffffffff859c2ed1>] __kmalloc+0x711/0x8a0 [<ffffffff86160189>] jffs2_sum_init+0xd9/0x1a0 [<ffffffff86140e25>] jffs2_do_mount_fs+0x745/0x2120 [<ffffffff86149fec>] jffs2_do_fill_super+0x35c/0x810 [<ffffffff8614aae9>] jffs2_fill_super+0x2b9/0x3b0 [...] -------------------------------------------- This is because the resources allocated in jffs2_sum_init() are not released. Call jffs2_sum_exit() to release these resources to solve the problem.

AI-Powered Analysis

AILast updated: 06/30/2025, 06:40:58 UTC

Technical Analysis

CVE-2022-49381 is a vulnerability identified in the Linux kernel's JFFS2 (Journaling Flash File System version 2) implementation. The issue arises in the function jffs2_do_fill_super, which is responsible for mounting the JFFS2 filesystem. Specifically, when either jffs2_iget() or d_make_root() calls within jffs2_do_fill_super() return an error, allocated memory resources are not properly released, leading to a memory leak. The root cause is that resources allocated in the jffs2_sum_init() function are not freed if an error occurs during the mounting process. The fix involves invoking jffs2_sum_exit() to release these resources appropriately. The vulnerability manifests as unreferenced kernel memory objects detected by kmemleak, indicating that allocated memory blocks remain allocated but are no longer referenced, thus leaking memory. The leak sizes can be significant, with examples showing allocations of 64 bytes and 65536 bytes leaking during failed mount attempts. This vulnerability does not appear to have an associated CVSS score and no known exploits in the wild have been reported as of the publication date. The vulnerability affects Linux kernel versions identified by the commit hash e631ddba588783edd521c5a89f7b2902772fb691 and likely other versions containing the same code pattern. Since JFFS2 is primarily used in embedded systems and devices with flash memory, the impact is mostly relevant to such environments rather than general-purpose Linux servers or desktops. The vulnerability could lead to gradual memory exhaustion in affected systems if an attacker or malfunctioning process repeatedly triggers mount failures on JFFS2 filesystems, potentially causing denial of service due to resource depletion. However, exploitation requires the ability to mount or remount JFFS2 filesystems, which typically requires privileged access or specific operational contexts.

Potential Impact

For European organizations, the impact of CVE-2022-49381 is primarily relevant to those using embedded Linux devices or specialized hardware running JFFS2 filesystems, such as industrial control systems, IoT devices, routers, or network appliances. Memory leaks in kernel space can degrade system stability and availability over time, potentially leading to denial of service conditions. This could disrupt critical infrastructure or industrial operations that rely on embedded Linux devices. However, the vulnerability does not directly expose confidentiality or integrity risks, as it is a resource management flaw rather than a code execution or privilege escalation vulnerability. The impact is thus mostly availability-related and may require sustained triggering to cause noticeable effects. European organizations with large deployments of embedded Linux devices or those in sectors like manufacturing, telecommunications, or critical infrastructure should be aware of this vulnerability. Since no known exploits exist in the wild, the immediate risk is low, but patching is recommended to prevent potential future exploitation or accidental system degradation.

Mitigation Recommendations

1. Apply the official Linux kernel patches that fix the memory leak by ensuring jffs2_sum_exit() is called to release allocated resources during mount failures. Monitor Linux kernel updates and backport patches to embedded device kernels where necessary. 2. For embedded device vendors and integrators, update firmware images to include the patched kernel version and distribute updates to end users. 3. Implement monitoring on embedded devices for abnormal memory usage or frequent JFFS2 mount failures to detect potential exploitation attempts or malfunctioning software. 4. Restrict access to mounting operations on JFFS2 filesystems to trusted administrators or processes to reduce the risk of repeated triggering. 5. Conduct regular audits of embedded Linux devices in the environment to identify those using JFFS2 and verify patch levels. 6. Consider alternative filesystems if feasible, especially in new deployments, to reduce reliance on JFFS2 where this vulnerability exists. 7. For critical infrastructure, implement redundancy and failover mechanisms to mitigate availability impacts from device instability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-02-26T02:08:31.559Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982dc4522896dcbe5869

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

Last enriched: 6/30/2025, 6:40:58 AM

Last updated: 7/31/2025, 10:04:23 AM

Views: 14

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