Skip to main content

CVE-2022-49753: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-49753cvecve-2022-49753
Published: Thu Mar 27 2025 (03/27/2025, 16:43:01 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: dmaengine: Fix double increment of client_count in dma_chan_get() The first time dma_chan_get() is called for a channel the channel client_count is incorrectly incremented twice for public channels, first in balance_ref_count(), and again prior to returning. This results in an incorrect client count which will lead to the channel resources not being freed when they should be. A simple test of repeated module load and unload of async_tx on a Dell Power Edge R7425 also shows this resulting in a kref underflow warning. [ 124.329662] async_tx: api initialized (async) [ 129.000627] async_tx: api initialized (async) [ 130.047839] ------------[ cut here ]------------ [ 130.052472] refcount_t: underflow; use-after-free. [ 130.057279] WARNING: CPU: 3 PID: 19364 at lib/refcount.c:28 refcount_warn_saturate+0xba/0x110 [ 130.065811] Modules linked in: async_tx(-) rfkill intel_rapl_msr intel_rapl_common amd64_edac edac_mce_amd ipmi_ssif kvm_amd dcdbas kvm mgag200 drm_shmem_helper acpi_ipmi irqbypass drm_kms_helper ipmi_si syscopyarea sysfillrect rapl pcspkr ipmi_devintf sysimgblt fb_sys_fops k10temp i2c_piix4 ipmi_msghandler acpi_power_meter acpi_cpufreq vfat fat drm fuse xfs libcrc32c sd_mod t10_pi sg ahci crct10dif_pclmul libahci crc32_pclmul crc32c_intel ghash_clmulni_intel igb megaraid_sas i40e libata i2c_algo_bit ccp sp5100_tco dca dm_mirror dm_region_hash dm_log dm_mod [last unloaded: async_tx] [ 130.117361] CPU: 3 PID: 19364 Comm: modprobe Kdump: loaded Not tainted 5.14.0-185.el9.x86_64 #1 [ 130.126091] Hardware name: Dell Inc. PowerEdge R7425/02MJ3T, BIOS 1.18.0 01/17/2022 [ 130.133806] RIP: 0010:refcount_warn_saturate+0xba/0x110 [ 130.139041] Code: 01 01 e8 6d bd 55 00 0f 0b e9 72 9d 8a 00 80 3d 26 18 9c 01 00 75 85 48 c7 c7 f8 a3 03 9d c6 05 16 18 9c 01 01 e8 4a bd 55 00 <0f> 0b e9 4f 9d 8a 00 80 3d 01 18 9c 01 00 0f 85 5e ff ff ff 48 c7 [ 130.157807] RSP: 0018:ffffbf98898afe68 EFLAGS: 00010286 [ 130.163036] RAX: 0000000000000000 RBX: ffff9da06028e598 RCX: 0000000000000000 [ 130.170172] RDX: ffff9daf9de26480 RSI: ffff9daf9de198a0 RDI: ffff9daf9de198a0 [ 130.177316] RBP: ffff9da7cddf3970 R08: 0000000000000000 R09: 00000000ffff7fff [ 130.184459] R10: ffffbf98898afd00 R11: ffffffff9d9e8c28 R12: ffff9da7cddf1970 [ 130.191596] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 130.198739] FS: 00007f646435c740(0000) GS:ffff9daf9de00000(0000) knlGS:0000000000000000 [ 130.206832] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 130.212586] CR2: 00007f6463b214f0 CR3: 00000008ab98c000 CR4: 00000000003506e0 [ 130.219729] Call Trace: [ 130.222192] <TASK> [ 130.224305] dma_chan_put+0x10d/0x110 [ 130.227988] dmaengine_put+0x7a/0xa0 [ 130.231575] __do_sys_delete_module.constprop.0+0x178/0x280 [ 130.237157] ? syscall_trace_enter.constprop.0+0x145/0x1d0 [ 130.242652] do_syscall_64+0x5c/0x90 [ 130.246240] ? exc_page_fault+0x62/0x150 [ 130.250178] entry_SYSCALL_64_after_hwframe+0x63/0xcd [ 130.255243] RIP: 0033:0x7f6463a3f5ab [ 130.258830] Code: 73 01 c3 48 8b 0d 75 a8 1b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 45 a8 1b 00 f7 d8 64 89 01 48 [ 130.277591] RSP: 002b:00007fff22f972c8 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 130.285164] RAX: ffffffffffffffda RBX: 000055b6786edd40 RCX: 00007f6463a3f5ab [ 130.292303] RDX: 0000000000000000 RSI: 0000000000000800 RDI: 000055b6786edda8 [ 130.299443] RBP: 000055b6786edd40 R08: 0000000000000000 R09: 0000000000000000 [ 130.306584] R10: 00007f6463b9eac0 R11: 0000000000000206 R12: 000055b6786edda8 [ 130.313731] R13: 0000000000000000 R14: 000055b6786edda8 R15: 00007fff22f995f8 [ 130.320875] </TASK> [ 130.323081] ---[ end trace eff7156d56b5cf25 ]--- cat /sys/class/dma/dma0chan*/in_use would get the wrong result. 2 2 2 Test-by: Jie Hai <haijie1@huawei.com>

AI-Powered Analysis

AILast updated: 07/03/2025, 02:26:32 UTC

Technical Analysis

CVE-2022-49753 is a high-severity vulnerability in the Linux kernel's dmaengine subsystem, specifically in the dma_chan_get() function. The flaw involves a double increment of the client_count reference counter for DMA channels. When dma_chan_get() is called for the first time on a public DMA channel, the client_count is incremented twice: once in balance_ref_count() and again before returning. This incorrect reference counting leads to an inflated client_count, preventing the proper release of channel resources when they should be freed. Over time, this can cause resource leaks and eventually trigger a reference count underflow, resulting in use-after-free conditions. The vulnerability was demonstrated on a Dell PowerEdge R7425 server running Linux kernel version 5.14.0-185.el9.x86_64, where repeated loading and unloading of the async_tx module caused kernel warnings and tracebacks indicative of refcount underflow and use-after-free. The issue is rooted in improper reference management, classified under CWE-416 (Use After Free). The CVSS v3.1 score is 7.8 (high), with attack vector local (AV:L), low attack complexity (AC:L), requiring low privileges (PR:L), no user interaction (UI:N), and impacts confidentiality, integrity, and availability (C:H/I:H/A:H). No known exploits are reported in the wild yet. This vulnerability affects Linux kernel versions identified by the commit hash d2f4f99db3e9ec8b063cf2e45704e2bb95428317 and likely other versions with the same flawed code. The root cause is a logic error in reference counting that can lead to kernel memory corruption and potential privilege escalation or denial of service if exploited by a local attacker.

Potential Impact

For European organizations, this vulnerability poses a significant risk especially to enterprises and data centers running Linux-based servers and infrastructure, including cloud providers, telecom operators, and critical infrastructure. The flaw can lead to kernel memory corruption through use-after-free, potentially allowing local attackers to escalate privileges, execute arbitrary code in kernel context, or cause denial of service via system crashes. Since the vulnerability requires local access with low privileges, it is particularly concerning in multi-tenant environments or where untrusted users have shell access. The impact on confidentiality, integrity, and availability is high, as attackers could gain unauthorized access to sensitive data or disrupt critical services. Organizations relying on Dell PowerEdge servers or similar hardware running affected Linux kernel versions are at increased risk. The vulnerability could also affect embedded Linux systems in industrial or telecom equipment prevalent in Europe. Although no public exploits are known yet, the high severity and kernel-level impact warrant urgent attention to prevent potential exploitation.

Mitigation Recommendations

1. Apply the official Linux kernel patches that fix the double increment in dma_chan_get() as soon as they become available from your Linux distribution vendor. Monitor vendor advisories for updated kernel packages. 2. If patching immediately is not feasible, restrict local access to trusted users only and enforce strict access controls to limit potential attackers. 3. Monitor kernel logs for refcount underflow warnings or related kernel tracebacks that may indicate exploitation attempts. 4. Employ kernel hardening techniques such as Kernel Address Space Layout Randomization (KASLR), Kernel Page Table Isolation (KPTI), and use of security modules like SELinux or AppArmor to reduce exploitation likelihood. 5. In virtualized or containerized environments, isolate workloads and minimize the attack surface by limiting module loading/unloading capabilities to privileged users. 6. Conduct regular audits of kernel modules and DMA channel usage to detect anomalies. 7. Coordinate with hardware vendors, especially if using Dell PowerEdge servers, to ensure firmware and driver compatibility with patched kernels. 8. Educate system administrators about the risks of local privilege escalation vulnerabilities and the importance of timely patching.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2025-03-27T16:39:17.988Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d982cc4522896dcbe4a6a

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

Last enriched: 7/3/2025, 2:26:32 AM

Last updated: 8/5/2025, 10:30:24 PM

Views: 16

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