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

Published Nov 30, 2026
·
Updated

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

RDMA/mlx5: Restore mr->pimr after temporary stack-local assignment

In handleregmrintegrity, when mr->pimr is NULL (physical-address optimization path), the code points mr->pimr at a stack-local papimr so setpiumrwr can read it during this call. The pointer is never restored, so after the function returns mr->pimr dangles at a freed stack frame. A second IBWRREGMRINTEGRITY posted on the same MR without remapping reads the stale pointer and dereferences it.

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

Affected Software

1 affected component
Linux Linux kernel

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Compensating control

    In handle_reg_mr_integrity, save the original pi_mr at function entry and restore it on the out path after the temporary stack-local assignment.

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description

Frequently Asked Questions

1

What systems and workloads are exposed to this issue?

The issue affects Linux kernel RDMA/mlx5 use of memory regions with integrity registration. It is specifically reachable on the physical-address optimization path when mr->pi_mr is NULL.

2

What operation is required to trigger the stale-pointer dereference?

A first IB_WR_REG_MR_INTEGRITY operation must cause mr->pi_mr to be temporarily assigned to the stack-local pa_pi_mr. A second IB_WR_REG_MR_INTEGRITY posted on the same memory region without remapping can then read and dereference the dangling pointer.

3

How can I determine whether a system has encountered the vulnerable state?

Look for workloads that post repeated IB_WR_REG_MR_INTEGRITY requests against the same memory region without remapping, particularly when using the physical-address optimization path. The affected state is created after the first registration leaves mr->pi_mr pointing to a stack-local object.

4

What does the available fix change?

The fix saves the original mr->pi_mr value at function entry and restores it on the function's out path. This prevents the memory region from retaining a pointer to the expired stack-local pa_pi_mr object.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203