Skip to main content

CVE-2021-47250: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2021-47250cvecve-2021-47250
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: ipv4: fix memory leak in netlbl_cipsov4_add_std Reported by syzkaller: BUG: memory leak unreferenced object 0xffff888105df7000 (size 64): comm "syz-executor842", pid 360, jiffies 4294824824 (age 22.546s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [<00000000e67ed558>] kmalloc include/linux/slab.h:590 [inline] [<00000000e67ed558>] kzalloc include/linux/slab.h:720 [inline] [<00000000e67ed558>] netlbl_cipsov4_add_std net/netlabel/netlabel_cipso_v4.c:145 [inline] [<00000000e67ed558>] netlbl_cipsov4_add+0x390/0x2340 net/netlabel/netlabel_cipso_v4.c:416 [<0000000006040154>] genl_family_rcv_msg_doit.isra.0+0x20e/0x320 net/netlink/genetlink.c:739 [<00000000204d7a1c>] genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] [<00000000204d7a1c>] genl_rcv_msg+0x2bf/0x4f0 net/netlink/genetlink.c:800 [<00000000c0d6a995>] netlink_rcv_skb+0x134/0x3d0 net/netlink/af_netlink.c:2504 [<00000000d78b9d2c>] genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 [<000000009733081b>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline] [<000000009733081b>] netlink_unicast+0x4a0/0x6a0 net/netlink/af_netlink.c:1340 [<00000000d5fd43b8>] netlink_sendmsg+0x789/0xc70 net/netlink/af_netlink.c:1929 [<000000000a2d1e40>] sock_sendmsg_nosec net/socket.c:654 [inline] [<000000000a2d1e40>] sock_sendmsg+0x139/0x170 net/socket.c:674 [<00000000321d1969>] ____sys_sendmsg+0x658/0x7d0 net/socket.c:2350 [<00000000964e16bc>] ___sys_sendmsg+0xf8/0x170 net/socket.c:2404 [<000000001615e288>] __sys_sendmsg+0xd3/0x190 net/socket.c:2433 [<000000004ee8b6a5>] do_syscall_64+0x37/0x90 arch/x86/entry/common.c:47 [<00000000171c7cee>] entry_SYSCALL_64_after_hwframe+0x44/0xae The memory of doi_def->map.std pointing is allocated in netlbl_cipsov4_add_std, but no place has freed it. It should be freed in cipso_v4_doi_free which frees the cipso DOI resource.

AI-Powered Analysis

AILast updated: 06/26/2025, 14:21:59 UTC

Technical Analysis

CVE-2021-47250 is a memory leak vulnerability identified in the Linux kernel's netlabel CIPSOv4 (Common IP Security Option for IPv4) implementation, specifically within the function netlbl_cipsov4_add_std. The vulnerability was discovered through syzkaller, a kernel fuzzing tool, which reported an unreferenced object of 64 bytes that was allocated but never freed. The root cause is that memory allocated for doi_def->map.std in netlbl_cipsov4_add_std is not properly released, as the corresponding free operation should occur in cipso_v4_doi_free but does not. This leads to a memory leak in the kernel's networking subsystem related to the netlabel CIPSOv4 standard. The vulnerability affects multiple versions of the Linux kernel identified by the commit hash 96cb8e3313c7a12e026c1ed510522ae6f6023875. The issue resides in the IPv4 netlabel code path, which is used for security labeling of network packets. While the vulnerability does not appear to have a known exploit in the wild, the memory leak could be triggered by sending crafted netlink messages to the kernel, potentially causing resource exhaustion over time. The vulnerability does not require user interaction beyond the ability to send netlink messages, which typically requires elevated privileges or local access. No CVSS score has been assigned, but the technical details confirm the presence of a kernel memory leak that could degrade system stability or availability if exploited at scale. The patch details are not provided, but the fix involves ensuring proper freeing of allocated memory in cipso_v4_doi_free.

Potential Impact

For European organizations, the impact of CVE-2021-47250 primarily concerns systems running vulnerable Linux kernel versions with netlabel CIPSOv4 enabled. The memory leak could lead to gradual kernel memory exhaustion, potentially causing system instability, crashes, or denial of service conditions on critical infrastructure or servers. This is particularly relevant for organizations relying on Linux-based servers for networking, security appliances, or cloud infrastructure. While the vulnerability does not directly expose confidentiality or integrity risks, the availability impact could disrupt services, especially in environments with high network labeling activity or where attackers have local access to exploit the leak. Given the widespread use of Linux in European data centers, telecom networks, and government systems, unpatched systems could face increased risk of service degradation. However, exploitation requires the ability to send crafted netlink messages, which limits remote exploitation potential and reduces risk to externally facing systems without local attacker presence or privilege escalation. The absence of known exploits in the wild further reduces immediate threat but does not eliminate the risk of future exploitation attempts.

Mitigation Recommendations

European organizations should prioritize patching affected Linux kernel versions to incorporate the fix that properly frees allocated memory in the netlabel CIPSOv4 code. Kernel updates from trusted Linux distributions should be applied promptly. Additionally, organizations should audit and restrict access to netlink sockets, limiting the ability of unprivileged or unauthorized users to send netlink messages that could trigger the leak. Employing kernel hardening techniques such as seccomp filters or mandatory access controls (e.g., SELinux, AppArmor) can reduce attack surface by restricting processes that can interact with netlink. Monitoring kernel memory usage and system logs for anomalies related to netlabel or netlink activity can provide early warning signs of exploitation attempts. For critical infrastructure, consider isolating systems with netlabel CIPSOv4 enabled from untrusted users and networks. Finally, maintain an up-to-date inventory of Linux kernel versions in use and verify that all systems are running patched kernels addressing CVE-2021-47250.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9835c4522896dcbea1ce

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

Last enriched: 6/26/2025, 2:21:59 PM

Last updated: 8/14/2025, 12:40:49 PM

Views: 17

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