Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1359 CNY

100%

CVE-2021-46925— net/smc: fix kernel panic caused by race of smc_sock

Quick assessment

Affected
Linux Linux
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于 smc_sock 竞争,导致内核恐慌。

CVSS 7.8 · High EPSS 0.18% · P7

Affected Version Matrix 8

VendorProduct Version RangeStatus
Linux Linux 5f08318f617b05b6ee389d8bd174c7af921ebf19< e8a5988a85c719ce7205cb00dcf0716dcf611332 affected
5f08318f617b05b6ee389d8bd174c7af921ebf19< b85f751d71ae8e2a15e9bda98852ea9af35282eb affected
5f08318f617b05b6ee389d8bd174c7af921ebf19< 349d43127dac00c15231e8ffbcaabd70f7b0e544 affected
4.11 affected
< 4.11 unaffected
5.10.90≤ 5.10.* unaffected
5.15.13≤ 5.15.* unaffected
5.16≤ * unaffected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2021-46925

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
net/smc: fix kernel panic caused by race of smc_sock
Source: CVE Program / CVE List V5
Vulnerability Description
In the Linux kernel, the following vulnerability has been resolved: net/smc: fix kernel panic caused by race of smc_sock A crash occurs when smc_cdc_tx_handler() tries to access smc_sock but smc_release() has already freed it. [ 4570.695099] BUG: unable to handle page fault for address: 000000002eae9e88 [ 4570.696048] #PF: supervisor write access in kernel mode [ 4570.696728] #PF: error_code(0x0002) - not-present page [ 4570.697401] PGD 0 P4D 0 [ 4570.697716] Oops: 0002 [#1] PREEMPT SMP NOPTI [ 4570.698228] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.16.0-rc4+ #111 [ 4570.699013] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 8c24b4c 04/0 [ 4570.699933] RIP: 0010:_raw_spin_lock+0x1a/0x30 <...> [ 4570.711446] Call Trace: [ 4570.711746] <IRQ> [ 4570.711992] smc_cdc_tx_handler+0x41/0xc0 [ 4570.712470] smc_wr_tx_tasklet_fn+0x213/0x560 [ 4570.712981] ? smc_cdc_tx_dismisser+0x10/0x10 [ 4570.713489] tasklet_action_common.isra.17+0x66/0x140 [ 4570.714083] __do_softirq+0x123/0x2f4 [ 4570.714521] irq_exit_rcu+0xc4/0xf0 [ 4570.714934] common_interrupt+0xba/0xe0 Though smc_cdc_tx_handler() checked the existence of smc connection, smc_release() may have already dismissed and released the smc socket before smc_cdc_tx_handler() further visits it. smc_cdc_tx_handler() |smc_release() if (!conn) | | |smc_cdc_tx_dismiss_slots() | smc_cdc_tx_dismisser() | |sock_put(&smc->sk) <- last sock_put, | smc_sock freed bh_lock_sock(&smc->sk) (panic) | To make sure we won't receive any CDC messages after we free the smc_sock, add a refcount on the smc_connection for inflight CDC message(posted to the QP but haven't received related CQE), and don't release the smc_connection until all the inflight CDC messages haven been done, for both success or failed ones. Using refcount on CDC messages brings another problem: when the link is going to be destroyed, smcr_link_clear() will reset the QP, which then remove all the pending CQEs related to the QP in the CQ. To make sure all the CQEs will always come back so the refcount on the smc_connection can always reach 0, smc_ib_modify_qp_reset() was replaced by smc_ib_modify_qp_error(). And remove the timeout in smc_wr_tx_wait_no_pending_sends() since we need to wait for all pending WQEs done, or we may encounter use-after- free when handling CQEs. For IB device removal routine, we need to wait for all the QPs on that device been destroyed before we can destroy CQs on the device, or the refcount on smc_connection won't reach 0 and smc_sock cannot be released.
Source: CVE Program / CVE List V5
CVSS Information
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Source: CVE Program / CVE List V5
Vulnerability Type
N/A
Source: CVE Program / CVE List V5
Vulnerability Title
Linux kernel 安全漏洞
Source: CNNVD (China National Vulnerability Database)
Vulnerability Description
Linux kernel是美国Linux基金会的开源操作系统Linux所使用的内核。 Linux kernel 存在安全漏洞,该漏洞源于 smc_sock 竞争,导致内核恐慌。
Source: CNNVD (China National Vulnerability Database)
CVSS Information
N/A
Source: CNNVD (China National Vulnerability Database)
Vulnerability Type
N/A
Source: CNNVD (China National Vulnerability Database)

Affected Products

Vendor Product Affected Versions CPE Subscribe
Linux Linux 5f08318f617b05b6ee389d8bd174c7af921ebf19 ~ e8a5988a85c719ce7205cb00dcf0716dcf611332 -
Linux Linux 4.11 -

II. Public POCs for CVE-2021-46925

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2021-46925

请登录查看更多情报信息。

Other References for CVE-2021-46925 (3)

Same Patch Batch · Linux · 2024-02-27 · 67 CVEs total

CVE-2021-46911 9.8 CRITICAL ch_ktls: Fix kernel panic
CVE-2021-46955 8.2 HIGH openvswitch: fix stack OOB read while fragmenting IPv4 packets
CVE-2021-46936 7.8 HIGH net: fix use-after-free in tw_timer_handler
CVE-2021-46913 7.8 HIGH netfilter: nftables: clone set element expression template
CVE-2021-46969 7.8 HIGH bus: mhi: core: Fix invalid error returning in mhi_queue
CVE-2021-46973 7.8 HIGH net: qrtr: Avoid potential use after free in MHI send
CVE-2021-46921 7.8 HIGH locking/qrwlock: Fix ordering in queued_write_lock_slowpath()
CVE-2021-46967 7.8 HIGH vhost-vdpa: fix vm_flags for virtqueue doorbell mapping
CVE-2021-46922 7.8 HIGH KEYS: trusted: Fix TPM reservation for seal/unseal
CVE-2021-46963 7.8 HIGH scsi: qla2xxx: Fix crash in qla2xxx_mqueuecommand()
CVE-2021-46929 7.8 HIGH sctp: use call_rcu to free endpoint
CVE-2021-46958 7.8 HIGH btrfs: fix race between transaction aborts and fsyncs leading to use-after-free
CVE-2021-46933 7.8 HIGH usb: gadget: f_fs: Clear ffs_eventfd in ffs_data_clear.
CVE-2021-46948 7.5 HIGH sfc: farch: fix TX queue lookup in TX event handling
CVE-2021-46960 7.5 HIGH cifs: Return correct error code from smb2_get_enc_key
CVE-2021-46912 7.3 HIGH net: Make tcp_allowed_congestion_control readonly in non-init netns
CVE-2021-46908 7.1 HIGH bpf: Use correct permission flag for mixed signed bounds arithmetic
CVE-2021-46974 7.1 HIGH bpf: Fix masking negation logic upon negative dst register
CVE-2021-46910 7.0 HIGH ARM: 9063/1: mm: reduce maximum number of CPUs if DEBUG_KMAP_LOCAL is enabled
CVE-2021-46954 net/sched: sch_frag: fix stack OOB read while fragmenting IPv4 packets

Showing top 20 of 67 CVEs. View all on vendor page &rarr; →

IV. Related Vulnerabilities

V. Comments for CVE-2021-46925

No comments yet


Leave a comment