# CVE-2021-47196: RDMA/core: Set send and receive CQ before forwarding to the driver

> 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.31% (percentile 16, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-04-10T18:56:32.634Z
- **Modified:** 2026-08-05T08:46:39.150Z

## Who should check

- Anyone running Linux \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< b70e072feffa0ba5c41a99b9524b9878dee7748e; \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< 6cd7397d01c4a3e09757840299e4f114f0aa5fa0
- Anyone running Linux 5.15

## Description

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

RDMA/core: Set send and receive CQ before forwarding to the driver

Preset both receive and send CQ pointers prior to call to the drivers and
overwrite it later again till the mlx4 is going to be changed do not
overwrite ibqp properties.

This change is needed for mlx5, because in case of QP creation failure, it
will go to the path of QP destroy which relies on proper CQ pointers.

 BUG: KASAN: use-after-free in create\_qp.cold+0x164/0x16e \[mlx5\_ib\]
 Write of size 8 at addr ffff8880064c55c0 by task a.out/246

 CPU: 0 PID: 246 Comm: a.out Not tainted 5.15.0+ \#291
 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
 Call Trace:
  dump\_stack\_lvl+0x45/0x59
  print\_address\_description.constprop.0+0x1f/0x140
  kasan\_report.cold+0x83/0xdf
  create\_qp.cold+0x164/0x16e \[mlx5\_ib\]
  mlx5\_ib\_create\_qp+0x358/0x28a0 \[mlx5\_ib\]
  create\_qp.part.0+0x45b/0x6a0 \[ib\_core\]
  ib\_create\_qp\_user+0x97/0x150 \[ib\_core\]
  ib\_uverbs\_handler\_UVERBS\_METHOD\_QP\_CREATE+0x92c/0x1250 \[ib\_uverbs\]
  ib\_uverbs\_cmd\_verbs+0x1c38/0x3150 \[ib\_uverbs\]
  ib\_uverbs\_ioctl+0x169/0x260 \[ib\_uverbs\]
  \_\_x64\_sys\_ioctl+0x866/0x14d0
  do\_syscall\_64+0x3d/0x90
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

 Allocated by task 246:
  kasan\_save\_stack+0x1b/0x40
  \_\_kasan\_kmalloc+0xa4/0xd0
  create\_qp.part.0+0x92/0x6a0 \[ib\_core\]
  ib\_create\_qp\_user+0x97/0x150 \[ib\_core\]
  ib\_uverbs\_handler\_UVERBS\_METHOD\_QP\_CREATE+0x92c/0x1250 \[ib\_uverbs\]
  ib\_uverbs\_cmd\_verbs+0x1c38/0x3150 \[ib\_uverbs\]
  ib\_uverbs\_ioctl+0x169/0x260 \[ib\_uverbs\]
  \_\_x64\_sys\_ioctl+0x866/0x14d0
  do\_syscall\_64+0x3d/0x90
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

 Freed by task 246:
  kasan\_save\_stack+0x1b/0x40
  kasan\_set\_track+0x1c/0x30
  kasan\_set\_free\_info+0x20/0x30
  \_\_kasan\_slab\_free+0x10c/0x150
  slab\_free\_freelist\_hook+0xb4/0x1b0
  kfree+0xe7/0x2a0
  create\_qp.part.0+0x52b/0x6a0 \[ib\_core\]
  ib\_create\_qp\_user+0x97/0x150 \[ib\_core\]
  ib\_uverbs\_handler\_UVERBS\_METHOD\_QP\_CREATE+0x92c/0x1250 \[ib\_uverbs\]
  ib\_uverbs\_cmd\_verbs+0x1c38/0x3150 \[ib\_uverbs\]
  ib\_uverbs\_ioctl+0x169/0x260 \[ib\_uverbs\]
  \_\_x64\_sys\_ioctl+0x866/0x14d0
  do\_syscall\_64+0x3d/0x90
  entry\_SYSCALL\_64\_after\_hwframe+0x44/0xae

## Affected and fixed versions

- Linux: \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< b70e072feffa0ba5c41a99b9524b9878dee7748e; \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< 6cd7397d01c4a3e09757840299e4f114f0aa5fa0 (cvelist)
- Linux: 5.15 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2021-47196.md
Affected: Linux >= 514aee660df493cd673154a6ba6bab745ec47b8c, < b70e072feffa0ba5c41a99b9524b9878dee7748e; >= 514aee660df493cd673154a6ba6bab745ec47b8c, < 6cd7397d01c4a3e09757840299e4f114f0aa5fa0; Linux 5.15
Fixed in: Linux 6cd7397d01c4a3e09757840299e4f114f0aa5fa0

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

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

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

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

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

Linux \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< b70e072feffa0ba5c41a99b9524b9878dee7748e; \>= 514aee660df493cd673154a6ba6bab745ec47b8c, \< 6cd7397d01c4a3e09757840299e4f114f0aa5fa0; Linux 5.15.

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

Yes. Fixed in Linux 6cd7397d01c4a3e09757840299e4f114f0aa5fa0. Upgrade Linux to 6cd7397d01c4a3e09757840299e4f114f0aa5fa0 or later.

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

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/b70e072feffa0ba5c41a99b9524b9878dee7748e>
- patch: <https://git.kernel.org/stable/c/6cd7397d01c4a3e09757840299e4f114f0aa5fa0>

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

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