Skip to main content

CVE-2021-47292: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47292cvecve-2021-47292
Published: Tue May 21 2024 (05/21/2024, 14:35:16 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: io_uring: fix memleak in io_init_wq_offload() I got memory leak report when doing fuzz test: BUG: memory leak unreferenced object 0xffff888107310a80 (size 96): comm "syz-executor.6", pid 4610, jiffies 4295140240 (age 20.135s) hex dump (first 32 bytes): 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... backtrace: [<000000001974933b>] kmalloc include/linux/slab.h:591 [inline] [<000000001974933b>] kzalloc include/linux/slab.h:721 [inline] [<000000001974933b>] io_init_wq_offload fs/io_uring.c:7920 [inline] [<000000001974933b>] io_uring_alloc_task_context+0x466/0x640 fs/io_uring.c:7955 [<0000000039d0800d>] __io_uring_add_tctx_node+0x256/0x360 fs/io_uring.c:9016 [<000000008482e78c>] io_uring_add_tctx_node fs/io_uring.c:9052 [inline] [<000000008482e78c>] __do_sys_io_uring_enter fs/io_uring.c:9354 [inline] [<000000008482e78c>] __se_sys_io_uring_enter fs/io_uring.c:9301 [inline] [<000000008482e78c>] __x64_sys_io_uring_enter+0xabc/0xc20 fs/io_uring.c:9301 [<00000000b875f18f>] do_syscall_x64 arch/x86/entry/common.c:50 [inline] [<00000000b875f18f>] do_syscall_64+0x3b/0x90 arch/x86/entry/common.c:80 [<000000006b0a8484>] entry_SYSCALL_64_after_hwframe+0x44/0xae CPU0 CPU1 io_uring_enter io_uring_enter io_uring_add_tctx_node io_uring_add_tctx_node __io_uring_add_tctx_node __io_uring_add_tctx_node io_uring_alloc_task_context io_uring_alloc_task_context io_init_wq_offload io_init_wq_offload hash = kzalloc hash = kzalloc ctx->hash_map = hash ctx->hash_map = hash <- one of the hash is leaked When calling io_uring_enter() in parallel, the 'hash_map' will be leaked, add uring_lock to protect 'hash_map'.

AI-Powered Analysis

AILast updated: 06/26/2025, 11:20:31 UTC

Technical Analysis

CVE-2021-47292 is a vulnerability identified in the Linux kernel's io_uring subsystem, specifically related to a memory leak in the function io_init_wq_offload(). The io_uring interface is a modern asynchronous I/O interface designed to improve performance and efficiency for Linux applications by allowing them to submit and complete I/O operations without excessive system calls. The vulnerability arises when io_uring_enter() is called concurrently in parallel threads or processes. During this operation, a hash_map object allocated via kzalloc is leaked due to insufficient locking around the hash_map data structure. The root cause is the lack of synchronization protecting the hash_map, which leads to a memory leak when multiple threads invoke io_uring_enter() simultaneously. The leak was identified through fuzz testing, which reported unreferenced kernel objects indicating memory not properly freed. The backtrace shows the leak occurs in the allocation and management of task contexts within io_uring. The fix involves adding a uring_lock to protect the hash_map, ensuring proper synchronization and preventing the memory leak. This vulnerability does not appear to have any known exploits in the wild as of the publication date. No CVSS score has been assigned yet. The affected Linux kernel versions are identified by specific commit hashes, indicating this is a recent discovery and patch. The vulnerability impacts the kernel's memory management and resource handling within io_uring, potentially leading to resource exhaustion over time if exploited by repeated parallel calls to io_uring_enter().

Potential Impact

For European organizations, the impact of this vulnerability primarily concerns systems running Linux kernels with the affected io_uring implementation, especially servers and infrastructure handling high volumes of asynchronous I/O operations. Memory leaks in kernel space can degrade system performance and stability, potentially leading to denial of service (DoS) conditions if memory exhaustion occurs. This is particularly critical for data centers, cloud providers, and enterprises relying on Linux-based infrastructure for critical applications, databases, or network services. While this vulnerability does not directly expose confidentiality or integrity risks, the availability impact can be significant in high-load environments. Organizations using containerized workloads or virtualized environments on Linux hosts may also be affected if the underlying kernel is vulnerable. Given the widespread use of Linux in European public sector, financial institutions, telecommunications, and manufacturing industries, the risk of service disruption due to this memory leak is non-trivial. However, the lack of known exploits and the requirement for parallel invocation of io_uring_enter() somewhat limits immediate exploitation risk. Still, persistent exploitation attempts could lead to system instability or crashes, impacting business continuity.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should prioritize updating their Linux kernels to versions that include the patch fixing CVE-2021-47292. Since the fix involves adding proper locking around the hash_map in io_uring, applying the official kernel update is the most effective measure. For environments where immediate patching is not feasible, organizations should monitor system memory usage closely on hosts running io_uring workloads, especially under high concurrency. Limiting or controlling the concurrency level of io_uring_enter() calls in applications can reduce the risk of triggering the leak. Additionally, organizations should audit and test applications using io_uring to identify if they perform parallel io_uring_enter() calls and consider applying application-level throttling or serialization as a temporary workaround. Employing kernel live patching solutions where available can also reduce downtime associated with patch deployment. Finally, integrating this vulnerability into vulnerability management and patching workflows will ensure timely remediation and reduce exposure duration.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-05-21T13:27:52.130Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea32f

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

Last enriched: 6/26/2025, 11:20:31 AM

Last updated: 7/28/2025, 10:46:47 PM

Views: 12

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