CVE-2026-139591

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

Published Nov 30, 2026 CVSS 3.1 · 5.5 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

In the Linux kernel’s mlx5 RDMA driver, a temporary assignment of the mr->pi_mr pointer to a stack‑allocated structure left the pointer dangling after the function returned. When the same memory registration is posted again without remapping, the stale pointer is dereferenced, resulting in a use‑after‑free that can corrupt kernel memory. The flaw is classified as CWE‑416.

Affected Systems

The flaw resides in the Linux kernel’s mlx5 RDMA implementation. Any Linux system running a kernel that includes the mlx5 driver and performs the described MR integrity registration is affected. No specific kernel version range is cited, so any installation lacking the latest patch may be vulnerable.

Risk and Exploitability

No CVSS score is currently available for this vulnerability, and no EPSS value is provided. The kernel code involved is privileged, so the flaw is a local or potentially remote kernel memory corruption if the attacker can trigger consecutive IB_WR_REG_MR_INTEGRITY operations on the same MR without remapping. The flaw is not listed in CISA’s KEV catalog, indicating no known exploits at this time.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the Linux kernel patch that restores mr->pi_mr after temporary stack‑local assignment (see the linked kernel commits).
  • Disable or remove the mlx5 RDMA driver if RDMA functionality is not required.
  • Until the kernel patch is applied, avoid consecutive IB_WR_REG_MR_INTEGRITY registrations on the same MR without remapping, or adjust application logic to prevent this pattern.

Generated by OpenCVE AI on December 1, 2026 at 13:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Linux linux
Vendors & Products Linux linux
Type Values Removed Values Added
Weaknesses CWE-416
Type Values Removed Values Added
Weaknesses CWE-825
References
Metrics threat_severity

None

cvssV3_1

{'score': 5.5, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H'}

threat_severity

Moderate

Type Values Removed Values Added
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.
Title RDMA/mlx5: Restore mr->pi_mr after temporary stack-local assignment
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:36 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:19 PM
Modified
Nov 30, 2026, 2:19 PM
Severity
Moderate
Public date
Nov 30, 2026, 1:36 PM