CVE-2026-93224 in Linuxinfo

Summary

by MITRE • 09/24/2026

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

svcrdma: Fix unmatched rn_unregister on failed accept

When svc_rdma_accept() takes the errout path before rpcrdma_rn_register() has succeeded, the existing cleanup block calls rpcrdma_rn_unregister(dev, &newxprt->sc_rn) unconditionally. svcxprt_rdma is kzalloc'd, so on that path sc_rn.rn_index is 0 and sc_rn.rn_done is NULL; the unregister therefore xa_erase()s another caller's slot 0 and performs an unmatched kref_put() on the rpcrdma_device's rd_kref.

The same errout also brackets the cleanup with svc_xprt_get()/ svc_xprt_put() around the kref_init() birth reference. The kref goes 1 -> 2 -> 1 and never reaches 0, so the svcxprt_rdma (and the net/ns_tracker it pinned) is leaked on every failed accept.

rpcrdma_rn_register() writes rn->rn_done last, only after xa_alloc() and kref_get() have both succeeded, so rn_done == NULL is a natural "never registered" sentinel. Guard rpcrdma_rn_unregister() with an early return when rn_done is NULL, and clear rn_done before the matching xa_erase() so a repeated unregister is also a no-op.

With that guard in place, the accept errout drops the kref_init() birth reference via svc_xprt_put(), which dispatches svc_rdma_free(). Teardown of sc_qp, sc_sq_cq, sc_rq_cq, and sc_pd runs under existing IS_ERR/NULL guards in svc_rdma_free(); sc_rn is covered by the new rn_done sentinel; sc_cm_id is non-NULL on every errout path because svc_rdma_accept() dereferences it above the first goto errout.

svc_xprt_free() drops the module reference associated with the freed transport, and svc_handle_xprt() drops its pre-acquired reference when ->xpo_accept() returns NULL. Take a replacement module reference before svc_xprt_put() so the two module_put()s remain balanced.

The rn_done guard also covers svc_rdma_free()'s non-listener call to rpcrdma_rn_unregister() for transports whose register attempt failed or never ran.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 09/24/2026

This vulnerability represents a critical resource management flaw within the Linux kernel's Sun RPC over RDMA implementation, specifically affecting the service-side connection acceptance logic in svcrdma. The core issue stems from an improper handling of reference counting and cleanup sequences when the svc_rdma_accept function encounters errors before successfully registering the remote notification structure via rpcrdma_rn_register. In this specific failure path, the existing error handling code unconditionally invokes rpcrdma_rn_unregister to clean up resources. However, because the underlying svcrd_xprt structure is allocated using kzalloc, any fields not explicitly initialized remain zeroed out. Consequently, when unregistering before registration completes, the rn_index field remains at its default value of zero and the rn_done pointer remains NULL. This leads to a catastrophic scenario where xa_erase operates on slot zero of the address space, which may inadvertently target resources belonging to another active caller rather than the intended failed instance.

Beyond the incorrect memory access associated with unregistering an unregistered resource, the vulnerability introduces severe reference counting leaks that result in kernel memory exhaustion over time. The error handling path incorrectly brackets cleanup operations around kref initialization without properly balancing the references acquired during transport creation and acceptance attempts. Specifically, the code performs a svc_xprt_get followed by a svc_xprt_put surrounding the kref_init call, resulting in a net reference count change of zero rather than releasing the initial birth reference held by the kernel. This means that every time an RDMA connection accept fails at this stage, the svcrd_xprt structure and its associated network namespace tracker are leaked. These leaks accumulate with each failed connection attempt, potentially leading to significant memory pressure or denial of service conditions as system resources are gradually consumed without release.

The remediation for this issue involves implementing a robust sentinel check within the cleanup routine to distinguish between registered and unregistered states. By checking if rn_done is NULL before attempting any unregister operations, the code ensures that rpcrdma_rn_unregister only acts on structures where registration has genuinely succeeded. The rn_done field serves as a reliable indicator because it is written last in the successful registration sequence, after both xa_alloc and kref_get have completed successfully. If rn_done remains NULL, it definitively indicates that no registration occurred, allowing the unregister function to return early without performing destructive operations on shared data structures like slot zero of the address space array. This guard also prevents double-unregister issues by ensuring that subsequent cleanup calls do not attempt to free resources already handled or never allocated.

With this protective logic in place, the error handling path can correctly drop the initial birth reference via svc_xprt_put, which subsequently triggers the proper teardown sequence including svc_rdma_free. This function safely handles the destruction of queue pairs, completion queues, and protection domains under existing null checks, while now also respecting the new sentinel for resource notification cleanup. Furthermore, to address module reference counting integrity, a replacement module reference is taken before dropping the transport reference. This ensures that when svc_xprt_put dispatches free operations and eventually drops the module usage count via svc_xprt_free, it remains balanced with references acquired earlier in the acceptance process. The fix also extends coverage to non-listener transports where registration might have failed or never run, ensuring consistent behavior across all RDMA transport states and preventing similar leaks or corruption scenarios elsewhere in the subsystem.

From a classification perspective, this vulnerability aligns closely with CWE-401, which describes missing release of memory after successful allocation leading to resource leakage, as well as CWE-362 concerning concurrent execution race conditions that result in shared data structure corruption due to improper synchronization and state checking. In terms of the MITRE ATT&CK framework, this flaw could be leveraged by an attacker aiming for Denial of Service through Resource Exhaustion (T1499), particularly if they can trigger repeated connection failures against a vulnerable kernel instance. The exploitation vector typically involves network-level interactions where malformed or rejected RDMA connections are sent in high volumes to exhaust system memory and destabilize the host operating environment, highlighting the importance of rigorous state validation during resource lifecycle management in network-facing subsystems.

Responsible

Linux

Reservation

09/17/2026

Disclosure

09/24/2026

Moderation

accepted

CPE

ready

EPSS

0.00000

KEV

no

Activities

very low

Sources

Do you need the next level of professionalism?

Upgrade your account now!