Skip to main content

CVE-2021-47242: Vulnerability in Linux Linux

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

Description

In the Linux kernel, the following vulnerability has been resolved: mptcp: fix soft lookup in subflow_error_report() Maxim reported a soft lookup in subflow_error_report(): watchdog: BUG: soft lockup - CPU#0 stuck for 22s! [swapper/0:0] RIP: 0010:native_queued_spin_lock_slowpath RSP: 0018:ffffa859c0003bc0 EFLAGS: 00000202 RAX: 0000000000000101 RBX: 0000000000000001 RCX: 0000000000000000 RDX: ffff9195c2772d88 RSI: 0000000000000000 RDI: ffff9195c2772d88 RBP: ffff9195c2772d00 R08: 00000000000067b0 R09: c6e31da9eb1e44f4 R10: ffff9195ef379700 R11: ffff9195edb50710 R12: ffff9195c2772d88 R13: ffff9195f500e3d0 R14: ffff9195ef379700 R15: ffff9195ef379700 FS: 0000000000000000(0000) GS:ffff91961f400000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c000407000 CR3: 0000000002988000 CR4: 00000000000006f0 Call Trace: <IRQ> _raw_spin_lock_bh subflow_error_report mptcp_subflow_data_available __mptcp_move_skbs_from_subflow mptcp_data_ready tcp_data_queue tcp_rcv_established tcp_v4_do_rcv tcp_v4_rcv ip_protocol_deliver_rcu ip_local_deliver_finish __netif_receive_skb_one_core netif_receive_skb rtl8139_poll 8139too __napi_poll net_rx_action __do_softirq __irq_exit_rcu common_interrupt </IRQ> The calling function - mptcp_subflow_data_available() - can be invoked from different contexts: - plain ssk socket lock - ssk socket lock + mptcp_data_lock - ssk socket lock + mptcp_data_lock + msk socket lock. Since subflow_error_report() tries to acquire the mptcp_data_lock, the latter two call chains will cause soft lookup. This change addresses the issue moving the error reporting call to outer functions, where the held locks list is known and the we can acquire only the needed one.

AI-Powered Analysis

AILast updated: 07/05/2025, 09:55:23 UTC

Technical Analysis

CVE-2021-47242 is a high-severity vulnerability in the Linux kernel related to the Multipath TCP (MPTCP) implementation. The issue arises from improper locking in the subflow_error_report() function, which is part of the MPTCP subflow error handling mechanism. Specifically, subflow_error_report() attempts to acquire the mptcp_data_lock while it may already be holding other socket locks (ssk socket lock and msk socket lock) depending on the call context. This leads to a locking conflict resulting in a soft lockup, where the CPU becomes stuck for an extended period (e.g., 22 seconds as observed in the reported bug). The root cause is a classic concurrency problem where a function tries to acquire a lock that is already held in the current call stack, causing a deadlock or soft lockup. The vulnerability is categorized under CWE-667 (Improper Locking). The fix involved moving the error reporting call to outer functions where the held locks are known, allowing the kernel to acquire only the necessary locks and avoid deadlocks. This vulnerability affects specific Linux kernel versions identified by commit hashes and impacts systems using MPTCP, a protocol extension that allows multiple TCP paths for a single connection to improve redundancy and throughput. The CVSS v3.1 score is 7.8 (high), with vector AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H, indicating local attack vector, low attack complexity, no privileges required, user interaction needed, unchanged scope, and high impact on confidentiality, integrity, and availability. No known exploits are reported in the wild as of the publication date (May 21, 2024).

Potential Impact

For European organizations, this vulnerability poses a significant risk primarily to systems running Linux kernels with MPTCP enabled or in use. MPTCP is increasingly adopted in environments requiring high availability and network resilience, such as data centers, cloud infrastructure, telecom networks, and critical industrial systems. Exploitation could lead to denial of service via CPU soft lockups, severely impacting system availability and potentially causing service outages. The high impact on confidentiality and integrity suggests that attackers could leverage this vulnerability to disrupt or manipulate network traffic, possibly affecting sensitive communications. Given the widespread use of Linux in European enterprises, government agencies, and critical infrastructure, the vulnerability could affect a broad range of sectors including finance, healthcare, telecommunications, and manufacturing. The requirement for local access and user interaction somewhat limits remote exploitation but insider threats or compromised user accounts could still trigger the issue. The vulnerability could also be leveraged as part of a multi-stage attack to escalate privileges or disrupt network operations.

Mitigation Recommendations

European organizations should prioritize patching affected Linux kernel versions by applying the official fixes that move the error reporting call to safer contexts with proper lock acquisition. System administrators must audit their environments to identify Linux systems running affected kernel versions with MPTCP enabled. Disabling MPTCP where it is not required can reduce the attack surface. Monitoring system logs for soft lockup warnings or unusual CPU stalls can help detect exploitation attempts. Implement strict access controls to limit local user permissions and reduce the risk of malicious or accidental triggering of the vulnerability. Network segmentation and endpoint protection can further contain potential impacts. For critical systems, consider deploying kernel live patching solutions to minimize downtime during remediation. Additionally, educating users about the risks of executing untrusted code or commands locally can reduce the likelihood of user interaction-based exploitation.

Need more detailed analysis?Get Pro

Technical Details

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

Threat ID: 682d9819c4522896dcbd8e13

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

Last enriched: 7/5/2025, 9:55:23 AM

Last updated: 8/17/2025, 12:03:07 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