# CVE-2021-47078: RDMA/rxe: Clear all QP fields if creation failed

> 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.28% (percentile 13, 2026-11-28)
- **CWE:** CWE-416
- **Published:** 2024-03-01T21:15:14.679Z
- **Modified:** 2026-08-05T08:45:51.708Z

## Who should check

- Anyone running Linux \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< c65391dd9f0a47617e96e38bd27e277cbe1c40b0; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 6a8086a42dfbf548a42bf2ae4faa291645c72c66; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< f3783c415bf6d2ead3d7aa2c38802bbe10723646; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< a62225d951d77eb20208fed8fc199e0c9b1df08b; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 2ee4d79c364914989c80de382c0b1a7259a7e4b3; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 03344e843ab6dd3b3f2cadfb65ed910590856c70; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 67f29896fdc83298eed5a6576ff8f9873f709228
- Anyone running Linux 4.8

## Description

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

RDMA/rxe: Clear all QP fields if creation failed

rxe\_qp\_do\_cleanup() relies on valid pointer values in QP for the properly
created ones, but in case rxe\_qp\_from\_init() failed it was filled with
garbage and caused tot the following error.

  refcount\_t: underflow; use-after-free.
  WARNING: CPU: 1 PID: 12560 at lib/refcount.c:28 refcount\_warn\_saturate+0x1d1/0x1e0 lib/refcount.c:28
  Modules linked in:
  CPU: 1 PID: 12560 Comm: syz-executor.4 Not tainted 5.12.0-syzkaller \#0
  Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
  RIP: 0010:refcount\_warn\_saturate+0x1d1/0x1e0 lib/refcount.c:28
  Code: e9 db fe ff ff 48 89 df e8 2c c2 ea fd e9 8a fe ff ff e8 72 6a a7 fd 48 c7 c7 e0 b2 c1 89 c6 05 dc 3a e6 09 01 e8 ee 74 fb 04 \<0f\> 0b e9 af fe ff ff 0f 1f 84 00 00 00 00 00 41 56 41 55 41 54 55
  RSP: 0018:ffffc900097ceba8 EFLAGS: 00010286
  RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
  RDX: 0000000000040000 RSI: ffffffff815bb075 RDI: fffff520012f9d67
  RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
  R10: ffffffff815b4eae R11: 0000000000000000 R12: ffff8880322a4800
  R13: ffff8880322a4940 R14: ffff888033044e00 R15: 0000000000000000
  FS:  00007f6eb2be3700(0000) GS:ffff8880b9d00000(0000) knlGS:0000000000000000
  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
  CR2: 00007fdbe5d41000 CR3: 000000001d181000 CR4: 00000000001506e0
  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
  Call Trace:
   \_\_refcount\_sub\_and\_test include/linux/refcount.h:283 \[inline\]
   \_\_refcount\_dec\_and\_test include/linux/refcount.h:315 \[inline\]
   refcount\_dec\_and\_test include/linux/refcount.h:333 \[inline\]
   kref\_put include/linux/kref.h:64 \[inline\]
   rxe\_qp\_do\_cleanup+0x96f/0xaf0 drivers/infiniband/sw/rxe/rxe\_qp.c:805
   execute\_in\_process\_context+0x37/0x150 kernel/workqueue.c:3327
   rxe\_elem\_release+0x9f/0x180 drivers/infiniband/sw/rxe/rxe\_pool.c:391
   kref\_put include/linux/kref.h:65 \[inline\]
   rxe\_create\_qp+0x2cd/0x310 drivers/infiniband/sw/rxe/rxe\_verbs.c:425
   \_ib\_create\_qp drivers/infiniband/core/core\_priv.h:331 \[inline\]
   ib\_create\_named\_qp+0x2ad/0x1370 drivers/infiniband/core/verbs.c:1231
   ib\_create\_qp include/rdma/ib\_verbs.h:3644 \[inline\]
   create\_mad\_qp+0x177/0x2d0 drivers/infiniband/core/mad.c:2920
   ib\_mad\_port\_open drivers/infiniband/core/mad.c:3001 \[inline\]
   ib\_mad\_init\_device+0xd6f/0x1400 drivers/infiniband/core/mad.c:3092
   add\_client\_context+0x405/0x5e0 drivers/infiniband/core/device.c:717
   enable\_device\_and\_get+0x1cd/0x3b0 drivers/infiniband/core/device.c:1331
   ib\_register\_device drivers/infiniband/core/device.c:1413 \[inline\]
   ib\_register\_device+0x7c7/0xa50 drivers/infiniband/core/device.c:1365
   rxe\_register\_device+0x3d5/0x4a0 drivers/infiniband/sw/rxe/rxe\_verbs.c:1147
   rxe\_add+0x12fe/0x16d0 drivers/infiniband/sw/rxe/rxe.c:247
   rxe\_net\_add+0x8c/0xe0 drivers/infiniband/sw/rxe/rxe\_net.c:503
   rxe\_newlink drivers/infiniband/sw/rxe/rxe.c:269 \[inline\]
   rxe\_newlink+0xb7/0xe0 drivers/infiniband/sw/rxe/rxe.c:250
   nldev\_newlink+0x30e/0x550 drivers/infiniband/core/nldev.c:1555
   rdma\_nl\_rcv\_msg+0x36d/0x690 drivers/infiniband/core/netlink.c:195
   rdma\_nl\_rcv\_skb drivers/infiniband/core/netlink.c:239 \[inline\]
   rdma\_nl\_rcv+0x2ee/0x430 drivers/infiniband/core/netlink.c:259
   netlink\_unicast\_kernel net/netlink/af\_netlink.c:1312 \[inline\]
   netlink\_unicast+0x533/0x7d0 net/netlink/af\_netlink.c:1338
   netlink\_sendmsg+0x856/0xd90 net/netlink/af\_netlink.c:1927
   sock\_sendmsg\_nosec net/socket.c:654 \[inline\]
   sock\_sendmsg+0xcf/0x120 net/socket.c:674
   \_\_\_\_sys\_sendmsg+0x6e8/0x810 net/socket.c:2350
   \_\_\_sys\_sendmsg+0xf3/0x170 net/socket.c:2404
   \_\_sys\_sendmsg+0xe5/0x1b0 net/socket.c:2433
   do\_syscall\_64+0x3a/0xb0 arch/x86/entry/common.c:47
   entry\_SYSCALL\_64\_after\_hwframe+0
---truncated---

## Affected and fixed versions

- Linux: \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< c65391dd9f0a47617e96e38bd27e277cbe1c40b0; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 6a8086a42dfbf548a42bf2ae4faa291645c72c66; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< f3783c415bf6d2ead3d7aa2c38802bbe10723646; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< a62225d951d77eb20208fed8fc199e0c9b1df08b; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 2ee4d79c364914989c80de382c0b1a7259a7e4b3; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 03344e843ab6dd3b3f2cadfb65ed910590856c70; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 67f29896fdc83298eed5a6576ff8f9873f709228 (cvelist)
- Linux: 4.8 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2021-47078.md
Affected: Linux >= 8700e3e7c4857d28ebaa824509934556da0b3e76, < c65391dd9f0a47617e96e38bd27e277cbe1c40b0; >= 8700e3e7c4857d28ebaa824509934556da0b3e76, < 6a8086a42dfbf548a42bf2ae4faa291645c72c66; >= 8700e3e7c4857d28ebaa824509934556da0b3e76, < f3783c415bf6d2ead3d7aa2c38802bbe10723646; >= 8700e3e7c4857d28ebaa824…
Fixed in: Linux 6a8086a42dfbf548a42bf2ae4faa291645c72c66, Linux 2ee4d79c364914989c80de382c0b1a7259a7e4b3, Linux 03344e843ab6dd3b3f2cadfb65ed910590856c70, Linux 67f29896fdc83298eed5a6576ff8f9873f709228

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

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

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

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

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

Linux \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< c65391dd9f0a47617e96e38bd27e277cbe1c40b0; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 6a8086a42dfbf548a42bf2ae4faa291645c72c66; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< f3783c415bf6d2ead3d7aa2c38802bbe10723646; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< a62225d951d77eb20208fed8fc199e0c9b1df08b; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 2ee4d79c364914989c80de382c0b1a7259a7e4b3; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 03344e843ab6dd3b3f2cadfb65ed910590856c70; \>= 8700e3e7c4857d28ebaa824509934556da0b3e76, \< 67f29896fdc83298eed5a6576ff8f9873f709228; Linux 4.8.

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

Yes. Fixed in Linux 6a8086a42dfbf548a42bf2ae4faa291645c72c66, Linux 2ee4d79c364914989c80de382c0b1a7259a7e4b3, Linux 03344e843ab6dd3b3f2cadfb65ed910590856c70, Linux 67f29896fdc83298eed5a6576ff8f9873f709228. Upgrade Linux to 67f29896fdc83298eed5a6576ff8f9873f709228 or later.

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

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/c65391dd9f0a47617e96e38bd27e277cbe1c40b0>
- patch: <https://git.kernel.org/stable/c/6a8086a42dfbf548a42bf2ae4faa291645c72c66>
- patch: <https://git.kernel.org/stable/c/f3783c415bf6d2ead3d7aa2c38802bbe10723646>
- patch: <https://git.kernel.org/stable/c/a62225d951d77eb20208fed8fc199e0c9b1df08b>
- patch: <https://git.kernel.org/stable/c/2ee4d79c364914989c80de382c0b1a7259a7e4b3>
- patch: <https://git.kernel.org/stable/c/03344e843ab6dd3b3f2cadfb65ed910590856c70>
- patch: <https://git.kernel.org/stable/c/67f29896fdc83298eed5a6576ff8f9873f709228>

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

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