CVE-2026-139582: RDMA/nldev: Fix NULL deref in dumps of objects abandoned by DRIVER_FAILURE

Published Nov 30, 2026
·
Updated

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

RDMA/nldev: Fix NULL deref in dumps of objects abandoned by DRIVERFAILURE

fillrescqentry() dereferences cq->uobject->uevent.uobject.context->res.id unconditionally for user resources.

This is normally safe by ordering: destroyhw() removes the resource from the restrack before uverbsdestroyuobject() clears ->context, and the XAZEROENTRY marker set by rdmarestrackbegindel() hides the entry from concurrent netlink dumps.

The ordering breaks when a driver keeps failing to destroy an object during ucontext teardown. uverbsdestroyufilehw() then falls back to uverbscleanupufile(RDMAREMOVEDRIVERFAILURE), which abandons the object in place: the HW object and its restrack entry are intentionally leaked, while the uobject bookkeeping is torn down and ->context is explicitly set to NULL by uverbsdestroyuobject(). rdmarestrackdel() is never reached, so the orphaned entry stays in the device restrack with a valid kref, reachable by any subsequent netlink dump.

Observed on 6.1.52 with MLNXOFED 24.10, after an mlx5 FW failure left a process unable to tear down its CQ (destroycq FW command failing during FD close):

WARNING: ... uverbsdestroyufilehw+0xe3/0x100 BUG: kernel NULL pointer dereference, address: 0000000000000058 RIP: 0010:fillrescqentry+0x15e/0x180 [ibcore] resgetcommondumpit+0x304/0x530 [ibcore] nldevresgetcqdumpit+0x1a/0x20 [ibcore]

The faulting chain maps to the source (CR2 = 0x58): cq->uobject (struct ibcq +0x08, res at +0x98) uobject->context (struct ibuobject +0x10, NULL after abandon) context->res.id (struct ibucontext +0x58)

The recent restrack rework (8d186210677c and its series) moved the restrack deletion to the start of the destroy flow and thus fences concurrent dumps from an object being destroyed, but it does not cover this case: when destroy fails, rdmarestrackabortdel() restores the entry, and the RDMAREMOVEDRIVERFAILURE sweep still never removes it from the restrack.

From the fallback until the device is unregistered, any "rdma res show cq" deterministically takes the NULL pointer dereference; this is a long-lived state, NOT A RACE. The dump path holds neither the restrack lock (dropped before the fill callback runs) nor ufile->hwdestroyrwsem, and rdmarestrackget() only guarantees that the res memory stays alive, not that ->context is still valid.

Fix the dump side: check the uobject context directly instead of the rdmaiskernelres() marker. A non-NULL uobject already implies a user resource, so kernel resources keep being skipped, and the additional ->context check skips the RESCTXN attribute for orphaned entries instead of crashing the dump. The orphaned resource itself remains visible in "rdma res show" (cqn/cqe/usecnt/pid), which is what an operator needs after the accompanying uverbs WARN to diagnose the driver destroy failure.

fillrespdentry() has the same pattern (pd->uobject->context->res.id) and is fixed the same way; a PD can even reach the fallback without its own driver callback failing, e.g. uverbsfreepd() returns -EBUSY while another object that failed to destroy still holds the PD usecnt.

Affected Software

12 affected componentsFixes available
Linux Linux kernel
linux/kernel>=5.1.0<5.10.275
5.10.275
linux/kernel>=5.11.0<5.15.226
5.15.226
linux/kernel>=5.16.0<6.1.193
6.1.193
linux/kernel>=6.2.0<6.6.163
6.6.163
linux/kernel>=6.7.0<6.12.119
6.12.119
linux/kernel>=6.13.0<6.18.65
6.18.65
linux/kernel>=6.19.0<7.3.6
7.3.6
debian/linux*
debian/linux*
debian/linux<7.3.6-1
7.3.6-1
debian/linux<=6.1.176-1, <=6.1.192-3, <=6.12.117-1, <=6.12.118-1
7.3.6-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.10.275
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 5.15.226
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.1.193
  4. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.6.163
  5. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.119
  6. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.18.65
  7. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 7.3.6
  8. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 7.3.6-1

Event History

Nov 30, 2026
CVE Published
via MITRE·01:36 PM
Data Sourced
via MITRE·01:36 PM
Description
Data Sourced
via OSV·01:36 PM
DescriptionAffected Software
Data Sourced
via NVD·02:19 PM
Description

Frequently Asked Questions

1

What conditions are required for this issue to occur?

An RDMA user object must fail to be destroyed during ucontext teardown because the driver repeatedly fails its hardware destroy operation. Cleanup then abandons the hardware object and its resource-tracking entry while clearing the associated uobject context.

2

What can trigger the NULL dereference after an object has been abandoned?

Any subsequent netlink dump that reaches the orphaned resource-tracking entry can trigger it. The entry remains reachable because it was not removed from resource tracking before its uobject context was cleared.

3

How can an environment be investigated for exposure?

Look for RDMA object teardown failures, particularly failed CQ destruction caused by driver or firmware failures, followed by RDMA netlink resource dumps. The reported observation involved an mlx5 firmware failure that prevented a process from tearing down its CQ.

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