CVE-2026-98360: RDMA/rxe: insert mcg into mcg_tree only after rxe_mcast_add() succeeds

Published Oct 6, 2026
·
Updated

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

RDMA/rxe: insert mcg into mcgtree only after rxemcastadd() succeeds

rxegetmcg() publishes a newly allocated multicast group in rxe->mcgtree before programming the backing Ethernet multicast address with rxemcastadd(), which runs outside mcglock. A local userspace RDMA client reaches this path with ATTACHMCAST on a UD QP; if rxemcastadd() then returns an error (for example -ENODEV when the backing netdev has been removed, or a propagated devmcadd() error), the unwind frees the published group without removing it from the tree. A later lookup of the same MGID dereferences the freed struct rxemcg from rxelookupmcg().

Fix this by keeping the new mcg private until rxemcastadd() succeeds. Split the tree publication into rxepublishmcg(), call rxemcastadd() before taking the tree reference, and free the still-private mcg on failure. Because the group is never visible in mcgtree 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 mcglock finds the winner; this caller then drops its private object and balances its own rxemcastadd() with rxemcastdel() before returning the winner.

Reproduced by forcing the rxemcastadd() error return under KASAN: without the change the next attach to the same MGID reports a slab-use-after-free in rxelookupmcg(); 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.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 6, 2026
CVE Published
via MITRE·08:46 AM
Data Sourced
via MITRE·08:46 AM
Description
Data Sourced
via NVD·09:18 AM
Description

Frequently Asked Questions

1

Who can trigger the vulnerable path?

A local userspace RDMA client can reach it by issuing ATTACH_MCAST on a UD queue pair. The issue is specific to the RXE RDMA path handling multicast groups.

2

What conditions are required for the use-after-free to occur?

Programming the backing Ethernet multicast address must fail after a new multicast group has been published in the multicast-group tree. Examples given include the backing network device having been removed, causing -ENODEV, or a dev_mc_add() error; a later lookup of the same MGID can then dereference the freed group.

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