Skip to main content

CVE-2022-48721: Vulnerability in Linux Linux

High
VulnerabilityCVE-2022-48721cvecve-2022-48721
Published: Thu Jun 20 2024 (06/20/2024, 11:13:12 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: net/smc: Forward wakeup to smc socket waitqueue after fallback When we replace TCP with SMC and a fallback occurs, there may be some socket waitqueue entries remaining in smc socket->wq, such as eppoll_entries inserted by userspace applications. After the fallback, data flows over TCP/IP and only clcsocket->wq will be woken up. Applications can't be notified by the entries which were inserted in smc socket->wq before fallback. So we need a mechanism to wake up smc socket->wq at the same time if some entries remaining in it. The current workaround is to transfer the entries from smc socket->wq to clcsock->wq during the fallback. But this may cause a crash like this: general protection fault, probably for non-canonical address 0xdead000000000100: 0000 [#1] PREEMPT SMP PTI CPU: 3 PID: 0 Comm: swapper/3 Kdump: loaded Tainted: G E 5.16.0+ #107 RIP: 0010:__wake_up_common+0x65/0x170 Call Trace: <IRQ> __wake_up_common_lock+0x7a/0xc0 sock_def_readable+0x3c/0x70 tcp_data_queue+0x4a7/0xc40 tcp_rcv_established+0x32f/0x660 ? sk_filter_trim_cap+0xcb/0x2e0 tcp_v4_do_rcv+0x10b/0x260 tcp_v4_rcv+0xd2a/0xde0 ip_protocol_deliver_rcu+0x3b/0x1d0 ip_local_deliver_finish+0x54/0x60 ip_local_deliver+0x6a/0x110 ? tcp_v4_early_demux+0xa2/0x140 ? tcp_v4_early_demux+0x10d/0x140 ip_sublist_rcv_finish+0x49/0x60 ip_sublist_rcv+0x19d/0x230 ip_list_rcv+0x13e/0x170 __netif_receive_skb_list_core+0x1c2/0x240 netif_receive_skb_list_internal+0x1e6/0x320 napi_complete_done+0x11d/0x190 mlx5e_napi_poll+0x163/0x6b0 [mlx5_core] __napi_poll+0x3c/0x1b0 net_rx_action+0x27c/0x300 __do_softirq+0x114/0x2d2 irq_exit_rcu+0xb4/0xe0 common_interrupt+0xba/0xe0 </IRQ> <TASK> The crash is caused by privately transferring waitqueue entries from smc socket->wq to clcsock->wq. The owners of these entries, such as epoll, have no idea that the entries have been transferred to a different socket wait queue and still use original waitqueue spinlock (smc socket->wq.wait.lock) to make the entries operation exclusive, but it doesn't work. The operations to the entries, such as removing from the waitqueue (now is clcsock->wq after fallback), may cause a crash when clcsock waitqueue is being iterated over at the moment. This patch tries to fix this by no longer transferring wait queue entries privately, but introducing own implementations of clcsock's callback functions in fallback situation. The callback functions will forward the wakeup to smc socket->wq if clcsock->wq is actually woken up and smc socket->wq has remaining entries.

AI-Powered Analysis

AILast updated: 06/27/2025, 23:55:56 UTC

Technical Analysis

CVE-2022-48721 is a vulnerability in the Linux kernel's handling of the SMC (Shared Memory Communications) protocol fallback mechanism to TCP/IP. SMC is a protocol designed to replace TCP for certain high-performance network communications, often used in data centers and high-throughput environments. The vulnerability arises when a fallback from SMC to TCP occurs: socket waitqueue entries (such as those created by epoll in userspace applications) remain in the smc socket's waitqueue (smc socket->wq) but are not properly notified because only the clcsocket's waitqueue (clcsock->wq) is woken up. The original workaround involved transferring these waitqueue entries from the smc socket to the clcsock socket during fallback. However, this caused a race condition and potential kernel crash due to improper synchronization and ownership of waitqueue locks. Specifically, the owners of these waitqueue entries (like epoll) continue to operate under the assumption that the entries remain in the original waitqueue with its associated spinlock, but the entries have been moved, leading to inconsistent locking and a general protection fault (kernel crash). The patch for this vulnerability avoids transferring waitqueue entries between sockets. Instead, it introduces new callback functions for the clcsock socket during fallback that forward wakeup events to the smc socket's waitqueue if it still contains entries. This approach preserves proper synchronization and prevents kernel crashes caused by the previous workaround. The vulnerability affects multiple Linux kernel versions identified by specific commit hashes. No known exploits are reported in the wild as of the publication date (June 20, 2024).

Potential Impact

For European organizations, this vulnerability poses a risk primarily to systems running Linux kernels with SMC enabled, particularly in environments where fallback from SMC to TCP/IP is possible. The impact includes potential kernel crashes (denial of service) due to general protection faults, which can disrupt critical services and applications relying on stable network communication. This is especially relevant for data centers, cloud providers, and enterprises using Linux-based infrastructure for high-performance networking or specialized communication protocols. While the vulnerability does not directly lead to privilege escalation or data leakage, the resulting system instability can cause service outages, impacting availability and operational continuity. Organizations with Linux servers in production, especially those using SMC or similar advanced networking features, should be aware of this risk. The lack of known exploits reduces immediate threat but does not eliminate the risk of future exploitation, particularly in targeted attacks against infrastructure relying on these kernel features.

Mitigation Recommendations

1. Apply the official Linux kernel patches that address CVE-2022-48721 as soon as they become available for your distribution. Monitor vendor advisories for updated kernel packages. 2. If immediate patching is not feasible, consider disabling SMC functionality if it is not required in your environment to avoid fallback scenarios that trigger the vulnerability. 3. Implement robust kernel crash monitoring and automated recovery mechanisms to minimize downtime in case of exploitation. 4. Conduct thorough testing of kernel updates in staging environments to ensure compatibility and stability before deployment in production. 5. Maintain up-to-date backups and disaster recovery plans to mitigate the impact of potential denial-of-service conditions caused by kernel crashes. 6. Monitor system logs for unusual kernel faults or crashes related to networking subsystems, which could indicate attempts to trigger this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-06-20T11:09:39.051Z
Cisa Enriched
true
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9820c4522896dcbdd4e1

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

Last enriched: 6/27/2025, 11:55:56 PM

Last updated: 7/31/2025, 11:14:03 AM

Views: 9

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