Skip to main content

CVE-2022-49522: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2022-49522cvecve-2022-49522
Published: Wed Feb 26 2025 (02/26/2025, 02:13:47 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: mmc: jz4740: Apply DMA engine limits to maximum segment size Do what is done in other DMA-enabled MMC host drivers (cf. host/mmci.c) and limit the maximum segment size based on the DMA engine's capabilities. This is needed to avoid warnings like the following with CONFIG_DMA_API_DEBUG=y. ------------[ cut here ]------------ WARNING: CPU: 0 PID: 21 at kernel/dma/debug.c:1162 debug_dma_map_sg+0x2f4/0x39c DMA-API: jz4780-dma 13420000.dma-controller: mapping sg segment longer than device claims to support [len=98304] [max=65536] CPU: 0 PID: 21 Comm: kworker/0:1H Not tainted 5.18.0-rc1 #19 Workqueue: kblockd blk_mq_run_work_fn Stack : 81575aec 00000004 80620000 80620000 80620000 805e7358 00000009 801537ac 814c832c 806276e3 806e34b4 80620000 81575aec 00000001 81575ab8 09291444 00000000 00000000 805e7358 81575958 ffffffea 8157596c 00000000 636f6c62 6220646b 80387a70 0000000f 6d5f6b6c 80620000 00000000 81575ba4 00000009 805e170c 80896640 00000001 00010000 00000000 00000000 00006098 806e0000 ... Call Trace: [<80107670>] show_stack+0x84/0x120 [<80528cd8>] __warn+0xb8/0xec [<80528d78>] warn_slowpath_fmt+0x6c/0xb8 [<8016f1d4>] debug_dma_map_sg+0x2f4/0x39c [<80169d4c>] __dma_map_sg_attrs+0xf0/0x118 [<8016a27c>] dma_map_sg_attrs+0x14/0x28 [<804f66b4>] jz4740_mmc_prepare_dma_data+0x74/0xa4 [<804f6714>] jz4740_mmc_pre_request+0x30/0x54 [<804f4ff4>] mmc_blk_mq_issue_rq+0x6e0/0x7bc [<804f5590>] mmc_mq_queue_rq+0x220/0x2d4 [<8038b2c0>] blk_mq_dispatch_rq_list+0x480/0x664 [<80391040>] blk_mq_do_dispatch_sched+0x2dc/0x370 [<80391468>] __blk_mq_sched_dispatch_requests+0xec/0x164 [<80391540>] blk_mq_sched_dispatch_requests+0x44/0x94 [<80387900>] __blk_mq_run_hw_queue+0xb0/0xcc [<80134c14>] process_one_work+0x1b8/0x264 [<80134ff8>] worker_thread+0x2ec/0x3b8 [<8013b13c>] kthread+0x104/0x10c [<80101dcc>] ret_from_kernel_thread+0x14/0x1c ---[ end trace 0000000000000000 ]---

AI-Powered Analysis

AILast updated: 06/29/2025, 21:56:01 UTC

Technical Analysis

CVE-2022-49522 is a vulnerability identified in the Linux kernel related to the MMC (MultiMediaCard) driver for the jz4740 platform. The issue arises because the driver does not properly limit the maximum segment size for DMA (Direct Memory Access) operations according to the DMA engine's capabilities. Specifically, the driver fails to apply the DMA engine limits to the maximum segment size, which can lead to warnings and potentially unstable behavior when CONFIG_DMA_API_DEBUG is enabled. The root cause is that the jz4740 MMC host driver does not enforce the maximum segment size limit, unlike other DMA-enabled MMC host drivers such as host/mmci.c. This can cause the DMA mapping of scatter-gather segments longer than the device supports, leading to kernel warnings and potential memory corruption or instability. The vulnerability is addressed by updating the driver to apply the DMA engine limits correctly, preventing segments longer than supported from being mapped. The technical details include kernel stack traces showing the warning triggered by debug_dma_map_sg when a segment length exceeds the device's maximum supported size. This vulnerability affects specific versions of the Linux kernel source identified by the commit hash 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2. There are no known exploits in the wild, and no CVSS score has been assigned yet. The vulnerability is primarily a stability and reliability issue rather than a direct security breach, but it could potentially be leveraged in complex attack scenarios to cause denial of service or kernel crashes.

Potential Impact

For European organizations, the impact of CVE-2022-49522 is mainly related to system stability and reliability rather than direct data breaches or privilege escalation. Systems running Linux kernels with the affected jz4740 MMC driver and using DMA for MMC devices could experience kernel warnings, crashes, or memory corruption under certain workloads. This could lead to denial of service conditions, affecting availability of critical systems, especially embedded devices or specialized hardware using this platform. While the vulnerability does not directly expose confidential data or allow unauthorized access, the instability could disrupt operations in industrial control systems, telecommunications infrastructure, or other environments relying on Linux-based embedded systems. European organizations with deployments of embedded Linux devices in sectors such as manufacturing, automotive, or telecommunications should be aware of this issue. The lack of known exploits reduces immediate risk, but unpatched systems remain vulnerable to potential future exploitation or accidental crashes. Overall, the impact is moderate but could be significant in environments where uptime and reliability are critical.

Mitigation Recommendations

To mitigate CVE-2022-49522, organizations should: 1) Identify and inventory all Linux systems using the jz4740 MMC driver or similar DMA-enabled MMC host drivers. 2) Apply the official Linux kernel patches that enforce DMA engine limits on maximum segment size as soon as they become available from trusted sources or Linux distributions. 3) Enable kernel debugging and monitoring (e.g., CONFIG_DMA_API_DEBUG) in test environments to detect any DMA mapping warnings or anomalies before deploying updates to production. 4) For embedded devices, coordinate with hardware vendors or device manufacturers to obtain updated firmware or kernel versions that include the fix. 5) Implement robust system monitoring and alerting to detect kernel warnings or crashes related to DMA operations. 6) Where possible, isolate affected devices or limit their exposure to critical networks until patched. 7) Maintain regular backups and recovery plans to minimize downtime in case of system instability. These steps go beyond generic advice by focusing on the specific driver and DMA configuration involved in this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d982bc4522896dcbe4322

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

Last enriched: 6/29/2025, 9:56:01 PM

Last updated: 8/15/2025, 11:57:34 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