Skip to main content

CVE-2022-49830: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49830cvecve-2022-49830
Published: Thu May 01 2025 (05/01/2025, 14:09:48 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: drm/drv: Fix potential memory leak in drm_dev_init() drm_dev_init() will add drm_dev_init_release() as a callback. When drmm_add_action() failed, the release function won't be added. As the result, the ref cnt added by device_get() in drm_dev_init() won't be put by drm_dev_init_release(), which leads to the memleak. Use drmm_add_action_or_reset() instead of drmm_add_action() to prevent memleak. unreferenced object 0xffff88810bc0c800 (size 2048): comm "modprobe", pid 8322, jiffies 4305809845 (age 15.292s) hex dump (first 32 bytes): e8 cc c0 0b 81 88 ff ff ff ff ff ff 00 00 00 00 ................ 20 24 3c 0c 81 88 ff ff 18 c8 c0 0b 81 88 ff ff $<............. backtrace: [<000000007251f72d>] __kmalloc+0x4b/0x1c0 [<0000000045f21f26>] platform_device_alloc+0x2d/0xe0 [<000000004452a479>] platform_device_register_full+0x24/0x1c0 [<0000000089f4ea61>] 0xffffffffa0736051 [<00000000235b2441>] do_one_initcall+0x7a/0x380 [<0000000001a4a177>] do_init_module+0x5c/0x230 [<000000002bf8a8e2>] load_module+0x227d/0x2420 [<00000000637d6d0a>] __do_sys_finit_module+0xd5/0x140 [<00000000c99fc324>] do_syscall_64+0x3f/0x90 [<000000004d85aa77>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

AI-Powered Analysis

AILast updated: 06/30/2025, 02:12:19 UTC

Technical Analysis

CVE-2022-49830 is a vulnerability identified in the Linux kernel's Direct Rendering Manager (DRM) subsystem, specifically within the drm_dev_init() function. The issue arises due to improper handling of reference counting and cleanup callbacks when initializing DRM devices. In detail, drm_dev_init() adds drm_dev_init_release() as a cleanup callback via drmm_add_action(). However, if drmm_add_action() fails, the release callback is not registered, resulting in the reference count incremented by device_get() not being decremented. This leads to a memory leak where allocated device objects are not properly freed. The vulnerability is triggered during module initialization, as evidenced by the backtrace involving modprobe and module loading functions. The root cause is the use of drmm_add_action() which does not guarantee rollback on failure, and the fix involves replacing it with drmm_add_action_or_reset(), which ensures cleanup actions are properly executed even if the addition fails. Although this vulnerability is a memory leak rather than a direct code execution or privilege escalation flaw, it can degrade system stability and performance over time, especially on systems frequently loading and unloading DRM modules or drivers. The leak involves unreferenced kernel objects of size 2048 bytes, which can accumulate and exhaust kernel memory resources. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability affects Linux kernel versions identified by the given commit hashes, and the fix is incorporated in updated kernel releases.

Potential Impact

For European organizations, the impact of CVE-2022-49830 primarily concerns system reliability and resource management on Linux-based infrastructure. Organizations relying on Linux servers or workstations with DRM components—such as those using graphical interfaces, multimedia processing, or GPU-accelerated workloads—may experience gradual memory exhaustion leading to degraded performance or potential system crashes if the vulnerability is exploited repeatedly or over extended periods. This can affect sectors like media production, scientific computing, and any enterprise using Linux-based virtualization or container platforms that leverage DRM. While the vulnerability does not directly compromise confidentiality or integrity, the availability of critical systems could be impaired, potentially disrupting business operations. The absence of known exploits reduces immediate risk, but unpatched systems remain vulnerable to memory leaks that could be leveraged in combination with other issues to cause denial of service. European organizations with strict uptime requirements or those operating in regulated industries should prioritize remediation to maintain system stability and compliance.

Mitigation Recommendations

To mitigate CVE-2022-49830, European organizations should: 1) Apply the latest Linux kernel updates that include the fix replacing drmm_add_action() with drmm_add_action_or_reset() in drm_dev_init(). This is the definitive solution to prevent the memory leak. 2) Monitor system logs and kernel memory usage for unusual increases that may indicate leaking DRM device objects. 3) Limit frequent loading and unloading of DRM modules where possible, especially in automated environments, to reduce exposure. 4) For custom or embedded Linux distributions, ensure kernel patches are backported and tested thoroughly. 5) Employ kernel memory leak detection tools and runtime monitoring to identify and respond to leaks proactively. 6) Maintain a robust patch management process to rapidly deploy kernel updates across all Linux systems, prioritizing those with graphical or GPU-related workloads. 7) Engage with Linux vendor support channels for guidance on backporting fixes if immediate kernel upgrades are not feasible. These steps go beyond generic advice by focusing on proactive monitoring, patch management, and operational adjustments specific to the DRM subsystem and kernel memory management.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-05-01T14:05:17.228Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d982cc4522896dcbe4d7b

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

Last enriched: 6/30/2025, 2:12:19 AM

Last updated: 8/16/2025, 12:22:58 AM

Views: 20

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