CVE-2026-99522 in Linuxinfo

Summary

by MITRE • 11/19/2026

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

RDMA/irdma: avoid use-after-free in icrdma_remove

icrdma_remove() dereferences iwdev after calling irdma_ib_unregister_device():

irdma_ib_unregister_device(iwdev) -> ib_unregister_device(&iwdev->ibdev) -> __ib_unregister_device() -> ib_dealloc_device()

irdma registers irdma_ib_dealloc_device() as the dealloc_driver callback in its ib_device_ops. The RDMA core explicitly documents ib_unregister_device() that when ops.dealloc_driver is used, ib_dev will be freed upon return from the function.

The ib_device is embedded in struct irdma_device and iwdev itself was allocated by ib_alloc_device(irdma_device, ibdev). Consequently, once irdma_ib_unregister_device() returns, iwdev must no longer be dereferenced.

However, icrdma_remove() currently accesses iwdev->rf afterwards when deinitializing interrupts, destroying ah_tbl_lock, and freeing rf. Although the final ib_device storage is released with kfree_rcu(), the object lifetime has already ended and callers must not rely on the RCU grace period to continue dereferencing iwdev.

Save iwdev->rf before unregistering the RDMA device and use the saved pointer for the remaining cleanup.

This issue was found by manual code inspection.

If you want to get the best quality for vulnerability data then you always have to consider VulDB.

Analysis

by VulDB Data Team • 11/21/2026

The Linux kernel vulnerability identified in the RDMA/irdma subsystem represents a critical use-after-free error within the icrdma_remove function, stemming from improper handling of object lifecycles during device unregistration. The core technical flaw lies in the sequence of operations performed when removing an Intel Resource Director Technology (RDMA) adapter. Specifically, the code invokes irdma_ib_unregister_device to deregister the InfiniBand device, which internally calls ib_dealloc_device through a chain involving __ib_unregister_device and the registered dealloc_driver callback, irdma_ib_dealloc_device. According to RDMA core documentation and kernel semantics, when a driver utilizes the ops.dealloc_driver mechanism, the underlying ib_device structure is freed immediately upon the return of ib_unregister_device. Since the iwdev structure containing the ib_device was allocated via ib_alloc_device with embedded storage, the entire iwdev object becomes invalid once that function returns.

Despite this explicit lifetime constraint, the icrdma_remove implementation continues to dereference the now-freed iwdev pointer in subsequent cleanup steps. These operations include deinitializing hardware interrupts, destroying the ah_tbl_lock spinlock, and freeing the rf resource structure. Accessing memory after it has been freed constitutes a use-after-free vulnerability, which is classified under CWE-416. This flaw can lead to severe operational impacts including kernel panics, data corruption, or potentially arbitrary code execution if an attacker can influence the state of the reclaimed memory before it is reallocated for another purpose. The fact that the final release uses kfree_rcu does not mitigate this specific issue because RCU grace periods are intended for read-side critical sections and do not protect against write operations or structural integrity checks performed after the object's logical end-of-life has passed by the driver model framework.

This vulnerability was discovered through manual code inspection, highlighting the importance of rigorous static analysis and adherence to kernel API contracts in subsystem development. The remediation strategy involves restructuring the cleanup sequence within icrdma_remove to preserve necessary state before invoking the unregistration routine. By saving a pointer to iwdev->rf prior to calling irdma_ib_unregister_device, the driver ensures that all subsequent resource deallocation targets valid memory addresses rather than dereferencing a dangling pointer. This approach aligns with ATT&CK technique T1059, as it prevents potential exploitation vectors related to kernel memory corruption and privilege escalation via heap-based attacks.

To mitigate similar issues in future development or existing codebases, engineers must strictly adhere to the lifecycle rules defined by the RDMA core subsystem. Developers should always consult documentation regarding ib_unregister_device behavior when dealing with embedded device structures. Implementing defensive coding practices such as nullifying pointers after free operations and validating pointer validity before access can further reduce risk. Additionally, leveraging automated static analysis tools that track object lifetimes across function boundaries can help identify these patterns early in the development cycle. Ensuring that resource cleanup occurs either before unregistration or uses safely preserved references is essential for maintaining system stability and security integrity within high-performance networking drivers like irdma.

Responsible

Linux

Reservation

09/25/2026

Disclosure

11/19/2026

Moderation

accepted

CPE

ready

EPSS

0.00172

KEV

no

Activities

very low

Sources

Do you want to use VulDB in your project?

Use the official API to access entries easily!