Skip to main content

CVE-2021-47249: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: net: rds: fix memory leak in rds_recvmsg Syzbot reported memory leak in rds. The problem was in unputted refcount in case of error. int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int msg_flags) { ... if (!rds_next_incoming(rs, &inc)) { ... } After this "if" inc refcount incremented and if (rds_cmsg_recv(inc, msg, rs)) { ret = -EFAULT; goto out; } ... out: return ret; } in case of rds_cmsg_recv() fail the refcount won't be decremented. And it's easy to see from ftrace log, that rds_inc_addref() don't have rds_inc_put() pair in rds_recvmsg() after rds_cmsg_recv() 1) | rds_recvmsg() { 1) 3.721 us | rds_inc_addref(); 1) 3.853 us | rds_message_inc_copy_to_user(); 1) + 10.395 us | rds_cmsg_recv(); 1) + 34.260 us | }

AI-Powered Analysis

AILast updated: 06/26/2025, 14:22:15 UTC

Technical Analysis

CVE-2021-47249 is a memory leak vulnerability identified in the Linux kernel's Reliable Datagram Sockets (RDS) implementation, specifically within the rds_recvmsg() function. The issue arises due to improper reference count management when an error occurs during the processing of incoming messages. In the function rds_recvmsg(), when rds_cmsg_recv() fails, the reference count incremented by rds_inc_addref() is not decremented accordingly because the corresponding rds_inc_put() call is missing in the error handling path. This leads to a memory leak as the reference count on the incoming message structure (inc) remains elevated, preventing proper resource cleanup. The vulnerability was reported by Syzbot, an automated kernel fuzzer, and affects multiple versions of the Linux kernel identified by specific commit hashes. Although the vulnerability does not directly lead to code execution or privilege escalation, the memory leak can cause resource exhaustion over time, potentially degrading system performance or causing denial of service (DoS) conditions in environments heavily utilizing RDS. The RDS protocol is primarily used in high-performance computing and clustered environments for efficient communication between nodes. This vulnerability has been published without an assigned CVSS score and no known exploits in the wild have been reported to date.

Potential Impact

For European organizations, the impact of CVE-2021-47249 depends largely on their use of Linux systems running affected kernel versions with RDS enabled. Organizations operating high-performance computing clusters, scientific research facilities, or data centers that rely on RDS for low-latency communication between nodes are at higher risk. The memory leak could lead to gradual resource depletion, causing degraded performance or system instability, which in critical infrastructure or financial services could disrupt operations. While the vulnerability does not allow direct code execution or data compromise, the resulting denial of service could impact availability of key services. European organizations with large-scale Linux deployments in sectors such as telecommunications, energy, and research institutions should be particularly vigilant. Additionally, since RDS is less commonly used in general-purpose Linux deployments, the broader impact on typical enterprise Linux servers may be limited. However, any system running vulnerable kernels with RDS enabled is susceptible to this issue if subjected to malformed or error-triggering RDS messages.

Mitigation Recommendations

To mitigate CVE-2021-47249, European organizations should: 1) Apply the latest Linux kernel patches that address the reference count leak in rds_recvmsg(). Since no patch links are provided in the report, organizations should monitor official Linux kernel repositories and distributions for updates. 2) Disable the RDS protocol on Linux systems where it is not required, reducing the attack surface. This can be done by unloading the rds kernel module or disabling it via kernel configuration. 3) Implement resource monitoring and alerting for memory usage and socket resource consumption on systems using RDS to detect abnormal leaks early. 4) For critical environments relying on RDS, conduct thorough testing of kernel updates in staging before deployment to avoid service disruption. 5) Employ network segmentation and firewall rules to limit exposure of RDS ports to only trusted hosts, minimizing the risk of malicious or malformed RDS traffic triggering the leak. 6) Maintain up-to-date system inventories to identify Linux hosts running affected kernel versions and prioritize patching accordingly.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-04-10T18:59:19.536Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9835c4522896dcbea1ca

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

Last enriched: 6/26/2025, 2:22:15 PM

Last updated: 8/13/2025, 8:23:09 PM

Views: 14

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