# CVE-2021-46925: net/smc: fix kernel panic caused by race of smc\_sock

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.18% (percentile 5, 2026-11-28)
- **CWE:** CWE-362
- **Published:** 2024-02-27T09:43:55.445Z
- **Modified:** 2026-08-05T08:45:07.408Z

## Who should check

- Anyone running Linux \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< e8a5988a85c719ce7205cb00dcf0716dcf611332; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< b85f751d71ae8e2a15e9bda98852ea9af35282eb; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< 349d43127dac00c15231e8ffbcaabd70f7b0e544
- Anyone running Linux 4.11

## 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.

## Affected and fixed versions

- Linux: \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< e8a5988a85c719ce7205cb00dcf0716dcf611332; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< b85f751d71ae8e2a15e9bda98852ea9af35282eb; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< 349d43127dac00c15231e8ffbcaabd70f7b0e544 (cvelist)
- Linux: 4.11 (cvelist)

## Mitigation

- Upgrade Linux to 349d43127dac00c15231e8ffbcaabd70f7b0e544 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2021-46925. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-46925.md
Affected: Linux >= 5f08318f617b05b6ee389d8bd174c7af921ebf19, < e8a5988a85c719ce7205cb00dcf0716dcf611332; >= 5f08318f617b05b6ee389d8bd174c7af921ebf19, < b85f751d71ae8e2a15e9bda98852ea9af35282eb; >= 5f08318f617b05b6ee389d8bd174c7af921ebf19, < 349d43127dac00c15231e8ffbcaabd70f7b0e544; Linux 4.11
Fixed in: Linux 349d43127dac00c15231e8ffbcaabd70f7b0e544

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2021-46925 being exploited?

There is no confirmed exploitation: CVE-2021-46925 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.18% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2021-46925?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2021-46925?

Linux \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< e8a5988a85c719ce7205cb00dcf0716dcf611332; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< b85f751d71ae8e2a15e9bda98852ea9af35282eb; \>= 5f08318f617b05b6ee389d8bd174c7af921ebf19, \< 349d43127dac00c15231e8ffbcaabd70f7b0e544; Linux 4.11.

### Is there a fix for CVE-2021-46925?

Yes. Fixed in Linux 349d43127dac00c15231e8ffbcaabd70f7b0e544. Upgrade Linux to 349d43127dac00c15231e8ffbcaabd70f7b0e544 or later.

### How do I check if I'm affected by CVE-2021-46925?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/e8a5988a85c719ce7205cb00dcf0716dcf611332>
- patch: <https://git.kernel.org/stable/c/b85f751d71ae8e2a15e9bda98852ea9af35282eb>
- patch: <https://git.kernel.org/stable/c/349d43127dac00c15231e8ffbcaabd70f7b0e544>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2021-46925>

HTML: <https://flawdb.com/CVE-2021-46925> · JSON: <https://flawdb.com/api/v1/entries/CVE-2021-46925>
