Skip to main content

CVE-2021-47124: Vulnerability in Linux Linux

High
VulnerabilityCVE-2021-47124cvecve-2021-47124
Published: Fri Mar 15 2024 (03/15/2024, 20:14:29 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: io_uring: fix link timeout refs WARNING: CPU: 0 PID: 10242 at lib/refcount.c:28 refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28 RIP: 0010:refcount_warn_saturate+0x15b/0x1a0 lib/refcount.c:28 Call Trace: __refcount_sub_and_test include/linux/refcount.h:283 [inline] __refcount_dec_and_test include/linux/refcount.h:315 [inline] refcount_dec_and_test include/linux/refcount.h:333 [inline] io_put_req fs/io_uring.c:2140 [inline] io_queue_linked_timeout fs/io_uring.c:6300 [inline] __io_queue_sqe+0xbef/0xec0 fs/io_uring.c:6354 io_submit_sqe fs/io_uring.c:6534 [inline] io_submit_sqes+0x2bbd/0x7c50 fs/io_uring.c:6660 __do_sys_io_uring_enter fs/io_uring.c:9240 [inline] __se_sys_io_uring_enter+0x256/0x1d60 fs/io_uring.c:9182 io_link_timeout_fn() should put only one reference of the linked timeout request, however in case of racing with the master request's completion first io_req_complete() puts one and then io_put_req_deferred() is called.

AI-Powered Analysis

AILast updated: 06/28/2025, 04:55:45 UTC

Technical Analysis

CVE-2021-47124 is a vulnerability in the Linux kernel's io_uring subsystem, specifically related to the handling of linked timeout requests. The flaw arises from improper reference counting in the function io_link_timeout_fn(), which is responsible for managing timeout references for linked I/O requests. Due to a race condition between the completion of a master request and the timeout handling, the system may incorrectly decrement reference counts multiple times on the same timeout request. This can lead to a refcount saturation warning and potentially cause use-after-free conditions or memory corruption. The vulnerability stems from the fact that io_link_timeout_fn() should only decrement one reference count for the linked timeout request, but in a race scenario, both io_req_complete() and io_put_req_deferred() decrement the reference count, leading to an inconsistent state. This flaw affects multiple versions of the Linux kernel as indicated by the affected commit hashes. The vulnerability was publicly disclosed in March 2024 and has been patched in subsequent kernel updates. There are no known exploits in the wild at this time, and no CVSS score has been assigned. However, the technical details suggest that this is a subtle kernel memory management bug that could be leveraged for denial of service or potentially privilege escalation if exploited by a local attacker. The vulnerability requires local code execution or user interaction with the io_uring interface, which is a relatively new asynchronous I/O interface in Linux kernels used to improve performance of I/O operations.

Potential Impact

For European organizations, this vulnerability poses a risk primarily to servers, cloud infrastructure, and embedded devices running vulnerable Linux kernel versions that utilize io_uring. Since io_uring is increasingly adopted in high-performance and cloud environments, exploitation could lead to system instability, crashes, or potentially privilege escalation, undermining confidentiality, integrity, and availability of critical systems. Organizations relying on Linux-based infrastructure for web hosting, cloud services, or critical industrial control systems could face service disruptions or unauthorized access if attackers exploit this flaw. Although no public exploits are known, the presence of a race condition and memory corruption in kernel code is a serious concern. The impact is heightened in environments where untrusted users or applications have access to io_uring interfaces, such as multi-tenant cloud platforms or containerized environments. European enterprises with large Linux deployments, especially those in finance, telecommunications, and government sectors, could be targeted due to the strategic value of their infrastructure and data.

Mitigation Recommendations

1. Immediate patching: Apply the latest Linux kernel updates that include the fix for CVE-2021-47124. Kernel maintainers have addressed the reference counting issue in io_uring, so upgrading to a patched kernel version is the most effective mitigation. 2. Restrict io_uring access: Limit access to the io_uring interface to trusted users and processes only. Use Linux security modules (e.g., SELinux, AppArmor) or cgroups to restrict which applications can invoke io_uring syscalls. 3. Monitor kernel logs: Enable detailed kernel logging and monitor for refcount warnings or unusual io_uring activity that could indicate exploitation attempts or race conditions. 4. Harden container and virtualization environments: Since io_uring is accessible inside containers, ensure container runtimes and orchestration platforms restrict capabilities that allow io_uring usage unless explicitly required. 5. Conduct vulnerability scanning: Use specialized Linux vulnerability scanners to detect kernel versions vulnerable to CVE-2021-47124 and prioritize remediation in critical systems. 6. Incident response readiness: Prepare for potential exploitation by having incident response plans that include kernel memory corruption scenarios and ensure backups and recovery mechanisms are tested.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-03-04T18:12:48.839Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9821c4522896dcbde045

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

Last enriched: 6/28/2025, 4:55:45 AM

Last updated: 8/10/2025, 2:01:56 PM

Views: 18

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