CVE-2026-93267: RDMA/core: Fix potential use after free in uverbs_free_dmah()
In the Linux kernel, the following vulnerability has been resolved:
RDMA/core: Fix potential use after free in uverbsfreedmah()
When accessing a dmah via the netlink path the only synchronization mechanism for the said dmah is rdmarestrackget(). Currently, rdmarestrackdel() is invoked at the end of uverbsfreedmah(), which is too late, since by that point vendor-specific resources associated with the dmah might already be freed. This can leave a short window where the dmah remains accessible through restrack, leading to a potential use-after-free.
Fix this by moving the rdmarestrackbegindel() call to the start of uverbsfreedmah(), ensuring that the dmah is removed from restrack before its internal resources are released. This guarantees that no new users hold references to a dmah that is in the process of destruction.
In addition, this change preserves the intended inverted order between create and destroy routines: resources are added to restrack at the end of successful creation, and hence shall be removed from the restrack first thing during the destruction flow, which keeps the lifecycle management consistent and predictable.
Affected Software
Event History
Frequently Asked Questions
Which systems are exposed to this race condition?
The affected path is in the Linux kernel RDMA core and involves DMA handles accessed through the RDMA netlink path. Systems not using this RDMA DMA-handle lifecycle are not described as reaching the vulnerable path.
What must occur for the use-after-free window to be reached?
A DMA handle must be accessed through restrack on the netlink path while uverbs_free_dmah() is destroying it. The race exists because vendor-specific resources can be freed before the handle is removed from restrack, allowing a new reference during that short interval.
What change resolves the issue?
The fix removes the DMA handle from restrack at the beginning of uverbs_free_dmah() by calling rdma_restrack_begin_del() before internal resources are released. This prevents new users from obtaining references to a handle being destroyed.