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

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2026-11-30T13:36:10.241Z
- Modified: 2026-11-30T14:19:40.813Z
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from 2563e2f30acb4c914fc475331e476fa920eb4245 before 0fabd08ceacbc1368a1e6459a438a49884145320; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 0f2dc4ec62d86316d01bf509788463c5c35f0160; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 54f3563103e3bb988a6d57d655568ad0aed9576b; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 5130c610180ad57c7a8ce35868b5b49f24de4a84; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 76d6f0e04e567db3ebe28e695bbdb3cc4e007d82; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 91264cb942b762b6b86fc2cb10c38bfdc31c36fb; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 46f20f6e193f20892d2a5e2af7c4143d2a27562c; from 2563e2f30acb4c914fc475331e476fa920eb4245 before 9728effe43d8fc4d58e12b697d0d6127355abdd5; 5.3 (not affected: before 5.3; from 5.10.275 up to 5.10.*; from 5.15.226 up to 5.15.*; from 6.1.193 up to 6.1.*; from 6.6.163 up to 6.6.*; from 6.12.119 up to 6.12.*; from 6.18.65 up to 6.18.*; from 7.3.6 up to 7.3.*; from 7.4-rc1 up to *)

## References

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

## Sources

- CVE List: [CVE-2026-139591](https://www.cve.org/CVERecord?id=CVE-2026-139591), CVE Terms of Use, modified 2026-11-30
- NVD: [CVE-2026-139591](https://nvd.nist.gov/vuln/detail/CVE-2026-139591), Public domain, modified 2026-11-30

---

Page: https://cve.day/CVE-2026-139591 · Whole record: https://cve.day/CVE-2026-139591.json · Rebuilt by cve.day 2026-11-30T14:33:17.238Z
