PT-2026-106689 · Linux · Linux
CVE-2026-98360
·
Published
2026-10-06
·
Updated
2026-10-06
CVSS v3.1
7.0
High
| Vector | AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: insert mcg into mcg tree only after rxe mcast add() succeeds
rxe get mcg() publishes a newly allocated multicast group in
rxe->mcg tree before programming the backing Ethernet multicast address
with rxe mcast add(), which runs outside mcg lock. A local userspace
RDMA client reaches this path with ATTACH MCAST on a UD QP; if
rxe mcast add() then returns an error (for example -ENODEV when the
backing netdev has been removed, or a propagated dev mc add() error),
the unwind frees the published group without removing it from the tree.
A later lookup of the same MGID dereferences the freed struct rxe mcg
from rxe lookup mcg().
Fix this by keeping the new mcg private until rxe mcast add() succeeds.
Split the tree publication into rxe publish mcg(), call rxe mcast add()
before taking the tree reference, and free the still-private mcg on
failure. Because the group is never visible in mcg tree until the
multicast address is programmed, no concurrent caller can look it up or
attach a QP to a group that is about to be torn down, so the error path
needs no conditional unwind. If another caller publishes the same MGID
while the address is being programmed, the post-add re-check under
mcg lock finds the winner; this caller then drops its private object and
balances its own rxe mcast add() with rxe mcast del() before returning
the winner.
Reproduced by forcing the rxe mcast add() error return under KASAN:
without the change the next attach to the same MGID reports a
slab-use-after-free in rxe lookup mcg(); with it the forced failure
returns cleanly. A no-injection attach/detach regression, including a
two-QP shared join/leave and re-attach, stays KASAN- and leak-clean.
Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Linux