# CVE-2026-139591: RDMA/mlx5: Restore mr-\>pi\_mr after temporary stack-local assignment

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **Published:** 2026-11-30T13:36:10.241Z
- **Modified:** 2026-11-30T14:19:40.813Z

> **AI summary (AI-generated, claude-haiku-5-5):** An attacker with local access can trigger a use of a dangling pointer in the Linux kernel RDMA mlx5 driver by posting a second integrity registration on the same memory region.

## Who should check

- Anyone running Linux \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0fabd08ceacbc1368a1e6459a438a49884145320; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0f2dc4ec62d86316d01bf509788463c5c35f0160; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 54f3563103e3bb988a6d57d655568ad0aed9576b; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 5130c610180ad57c7a8ce35868b5b49f24de4a84; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 91264cb942b762b6b86fc2cb10c38bfdc31c36fb; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 46f20f6e193f20892d2a5e2af7c4143d2a27562c; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 9728effe43d8fc4d58e12b697d0d6127355abdd5
- Anyone running Linux 5.3

## Description

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

RDMA/mlx5: Restore mr-\>pi\_mr after temporary stack-local assignment

In handle\_reg\_mr\_integrity, when mr-\>pi\_mr is NULL (physical-address
optimization path), the code points mr-\>pi\_mr at a stack-local pa\_pi\_mr
so set\_pi\_umr\_wr can read it during this call. The pointer is never
restored, so after the function returns mr-\>pi\_mr dangles at a freed stack
frame. A second IB\_WR\_REG\_MR\_INTEGRITY posted on the same MR without
remapping reads the stale pointer and dereferences it.

Save the original pi\_mr (captured at function entry) and restore it on
the out path.

## Affected and fixed versions

- Linux: \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0fabd08ceacbc1368a1e6459a438a49884145320; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0f2dc4ec62d86316d01bf509788463c5c35f0160; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 54f3563103e3bb988a6d57d655568ad0aed9576b; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 5130c610180ad57c7a8ce35868b5b49f24de4a84; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 91264cb942b762b6b86fc2cb10c38bfdc31c36fb; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 46f20f6e193f20892d2a5e2af7c4143d2a27562c; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 9728effe43d8fc4d58e12b697d0d6127355abdd5 (cvelist)
- Linux: 5.3 (cvelist)

## Technologies

Linux kernel

## Mitigation

- Upgrade Linux to 9728effe43d8fc4d58e12b697d0d6127355abdd5 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-139591.md
Affected: Linux >= 2563e2f30acb4c914fc475331e476fa920eb4245, < 0fabd08ceacbc1368a1e6459a438a49884145320; >= 2563e2f30acb4c914fc475331e476fa920eb4245, < 0f2dc4ec62d86316d01bf509788463c5c35f0160; >= 2563e2f30acb4c914fc475331e476fa920eb4245, < 54f3563103e3bb988a6d57d655568ad0aed9576b; >= 2563e2f30acb4c914fc4753…
Fixed in: Linux 0fabd08ceacbc1368a1e6459a438a49884145320, Linux 0f2dc4ec62d86316d01bf509788463c5c35f0160, Linux 54f3563103e3bb988a6d57d655568ad0aed9576b, Linux 5130c610180ad57c7a8ce35868b5b49f24de4a84, Linux 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82, Linux 91264cb942b762b6b86fc2cb10c38bfdc31c36fb, Linux 46f20…

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-2026-139591 being exploited?

There is no confirmed exploitation: CVE-2026-139591 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known.

### How serious is CVE-2026-139591?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2026-139591?

Linux \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0fabd08ceacbc1368a1e6459a438a49884145320; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 0f2dc4ec62d86316d01bf509788463c5c35f0160; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 54f3563103e3bb988a6d57d655568ad0aed9576b; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 5130c610180ad57c7a8ce35868b5b49f24de4a84; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 91264cb942b762b6b86fc2cb10c38bfdc31c36fb; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 46f20f6e193f20892d2a5e2af7c4143d2a27562c; \>= 2563e2f30acb4c914fc475331e476fa920eb4245, \< 9728effe43d8fc4d58e12b697d0d6127355abdd5; Linux 5.3.

### Is there a fix for CVE-2026-139591?

Yes. Fixed in Linux 0fabd08ceacbc1368a1e6459a438a49884145320, Linux 0f2dc4ec62d86316d01bf509788463c5c35f0160, Linux 54f3563103e3bb988a6d57d655568ad0aed9576b, Linux 5130c610180ad57c7a8ce35868b5b49f24de4a84, Linux 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82, Linux 91264cb942b762b6b86fc2cb10c38bfdc31c36fb, Linux 46f20f6e193f20892d2a5e2af7c4143d2a27562c, Linux 9728effe43d8fc4d58e12b697d0d6127355abdd5. Upgrade Linux to 9728effe43d8fc4d58e12b697d0d6127355abdd5 or later.

### How do I check if I'm affected by CVE-2026-139591?

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

- other: <https://git.kernel.org/stable/c/0fabd08ceacbc1368a1e6459a438a49884145320>
- other: <https://git.kernel.org/stable/c/0f2dc4ec62d86316d01bf509788463c5c35f0160>
- other: <https://git.kernel.org/stable/c/54f3563103e3bb988a6d57d655568ad0aed9576b>
- other: <https://git.kernel.org/stable/c/5130c610180ad57c7a8ce35868b5b49f24de4a84>
- other: <https://git.kernel.org/stable/c/76d6f0e04e567db3ebe28e695bbdb3cc4e007d82>
- other: <https://git.kernel.org/stable/c/91264cb942b762b6b86fc2cb10c38bfdc31c36fb>
- other: <https://git.kernel.org/stable/c/46f20f6e193f20892d2a5e2af7c4143d2a27562c>
- other: <https://git.kernel.org/stable/c/9728effe43d8fc4d58e12b697d0d6127355abdd5>

## 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-2026-139591>

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