# CVE-2021-47266: RDMA/ipoib: Fix warning caused by destroying non-initial netns

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.30% (percentile 16, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-05-21T14:19:57.249Z
- **Modified:** 2026-06-17T04:17:03.163Z

## Who should check

- Anyone running Linux \>= dc1d4c658b9c123e31054fffcbc0b23566694b1a, \< 64f1fb6acc2ab95982fc4334f351d7576c26f313; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 0a672f7d89db2da17ae02733ccc08458be72a6f8; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< a3e74fb9247cd530dca246699d5eb5a691884d32; 938e97b946ecf5aa3ccc04ff4ad116e92d894270; 86e76dbea6379bb272bceb36fe4217f34ff6858d; \>= 5.4.73, \< 5.4.126; \>= 5.8.17, \< 5.9; \>= 5.9.2, \< 5.10
- Anyone running Linux 5.10

## Description

In the Linux kernel, the following vulnerability has been resolved:

RDMA/ipoib: Fix warning caused by destroying non-initial netns

After the commit 5ce2dced8e95 ("RDMA/ipoib: Set rtnl\_link\_ops for ipoib
interfaces"), if the IPoIB device is moved to non-initial netns,
destroying that netns lets the device vanish instead of moving it back to
the initial netns, This is happening because default\_device\_exit() skips
the interfaces due to having rtnl\_link\_ops set.

Steps to reporoduce:
  ip netns add foo
  ip link set mlx5\_ib0 netns foo
  ip netns delete foo

WARNING: CPU: 1 PID: 704 at net/core/dev.c:11435 netdev\_exit+0x3f/0x50
Modules linked in: xt\_CHECKSUM xt\_MASQUERADE xt\_conntrack ipt\_REJECT
nf\_reject\_ipv4 nft\_compat nft\_counter nft\_chain\_nat nf\_nat nf\_conntrack
nf\_defrag\_ipv6 nf\_defrag\_ipv4 nf\_tables nfnetlink tun d
 fuse
CPU: 1 PID: 704 Comm: kworker/u64:3 Tainted: G S      W  5.13.0-rc1+ \#1
Hardware name: Dell Inc. PowerEdge R630/02C2CP, BIOS 2.1.5 04/11/2016
Workqueue: netns cleanup\_net
RIP: 0010:netdev\_exit+0x3f/0x50
Code: 48 8b bb 30 01 00 00 e8 ef 81 b1 ff 48 81 fb c0 3a 54 a1 74 13 48
8b 83 90 00 00 00 48 81 c3 90 00 00 00 48 39 d8 75 02 5b c3 \<0f\> 0b 5b
c3 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 0f 1f 44 00
RSP: 0018:ffffb297079d7e08 EFLAGS: 00010206
RAX: ffff8eb542c00040 RBX: ffff8eb541333150 RCX: 000000008010000d
RDX: 000000008010000e RSI: 000000008010000d RDI: ffff8eb440042c00
RBP: ffffb297079d7e48 R08: 0000000000000001 R09: ffffffff9fdeac00
R10: ffff8eb5003be000 R11: 0000000000000001 R12: ffffffffa1545620
R13: ffffffffa1545628 R14: 0000000000000000 R15: ffffffffa1543b20
FS:  0000000000000000(0000) GS:ffff8ed37fa00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005601b5f4c2e8 CR3: 0000001fc8c10002 CR4: 00000000003706e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 ops\_exit\_list.isra.9+0x36/0x70
 cleanup\_net+0x234/0x390
 process\_one\_work+0x1cb/0x360
 ? process\_one\_work+0x360/0x360
 worker\_thread+0x30/0x370
 ? process\_one\_work+0x360/0x360
 kthread+0x116/0x130
 ? kthread\_park+0x80/0x80
 ret\_from\_fork+0x22/0x30

To avoid the above warning and later on the kernel panic that could happen
on shutdown due to a NULL pointer dereference, make sure to set the
netns\_refund flag that was introduced by commit 3a5ca857079e ("can: dev:
Move device back to init netns on owning netns delete") to properly
restore the IPoIB interfaces to the initial netns.

## Affected and fixed versions

- Linux: \>= dc1d4c658b9c123e31054fffcbc0b23566694b1a, \< 64f1fb6acc2ab95982fc4334f351d7576c26f313; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 0a672f7d89db2da17ae02733ccc08458be72a6f8; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< a3e74fb9247cd530dca246699d5eb5a691884d32; 938e97b946ecf5aa3ccc04ff4ad116e92d894270; 86e76dbea6379bb272bceb36fe4217f34ff6858d; \>= 5.4.73, \< 5.4.126; \>= 5.8.17, \< 5.9; \>= 5.9.2, \< 5.10 (cvelist)
- Linux: 5.10 (cvelist)

## Mitigation

- Upgrade Linux to 5.10 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-47266. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2021-47266.md
Affected: Linux >= dc1d4c658b9c123e31054fffcbc0b23566694b1a, < 64f1fb6acc2ab95982fc4334f351d7576c26f313; >= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, < 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27; >= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, < 0a672f7d89db2da17ae02733ccc08458be72a6f8; >= 5ce2dced8e95e76ff743986…
Fixed in: Linux 64f1fb6acc2ab95982fc4334f351d7576c26f313, Linux 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27, Linux 0a672f7d89db2da17ae02733ccc08458be72a6f8, Linux 5.4.126, Linux 5.9, Linux 5.10

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-47266 being exploited?

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= dc1d4c658b9c123e31054fffcbc0b23566694b1a, \< 64f1fb6acc2ab95982fc4334f351d7576c26f313; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< 0a672f7d89db2da17ae02733ccc08458be72a6f8; \>= 5ce2dced8e95e76ff7439863a118a053a7fc6f91, \< a3e74fb9247cd530dca246699d5eb5a691884d32; 938e97b946ecf5aa3ccc04ff4ad116e92d894270; 86e76dbea6379bb272bceb36fe4217f34ff6858d; \>= 5.4.73, \< 5.4.126; \>= 5.8.17, \< 5.9; \>= 5.9.2, \< 5.10; Linux 5.10.

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

Yes. Fixed in Linux 64f1fb6acc2ab95982fc4334f351d7576c26f313, Linux 67cf4e447b5e5e9e94996cb6812ae2828e0e0e27, Linux 0a672f7d89db2da17ae02733ccc08458be72a6f8, Linux 5.4.126, Linux 5.9, Linux 5.10. Upgrade Linux to 5.10 or later.

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

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/64f1fb6acc2ab95982fc4334f351d7576c26f313>
- patch: <https://git.kernel.org/stable/c/67cf4e447b5e5e9e94996cb6812ae2828e0e0e27>
- patch: <https://git.kernel.org/stable/c/0a672f7d89db2da17ae02733ccc08458be72a6f8>
- patch: <https://git.kernel.org/stable/c/a3e74fb9247cd530dca246699d5eb5a691884d32>

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

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