RDMA/rxe: insert mcg into mcg_tree only after rxe_mcast_add() succeeds
Published Oct 6, 2026
7.0
HIGHCVSS 3.1
EPSS 0.13%
Description
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.
Affected products
-
Affected
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
- ≥ , <
-
Affected
- 5.18
Unaffected
- ≥ 0, < 5.18
- ≥ 6.1.189, ≤ 6.1.*
- ≥ 6.12.112, ≤ 6.12.*
- ≥ 6.18.54, ≤ 6.18.*
- ≥ 6.6.158, ≤ 6.6.*
- ≥ 7.2.8, ≤ 7.2.*
- 7.3-rc4
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
No data.
No data.
Red Hat Enterprise Linux 10
kernel
Not affected
Red Hat Enterprise Linux 6
kernel
Not affected
Red Hat Enterprise Linux 7
kernel
Not affected
Red Hat Enterprise Linux 7
kernel-rt
Not affected
Red Hat Enterprise Linux 8
kernel
Fix deferred
Red Hat Enterprise Linux 8
kernel-rt
Fix deferred
Red Hat Enterprise Linux 9
kernel
Fix deferred
Red Hat Enterprise Linux 9
kernel-rt
Not affected
Red Hat OpenShift Container Platform 4
openshift/ose-rhel-coreos-8
Not affected
Red Hat OpenShift Container Platform 4
openshift/ose-rhel-coreos-9
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 6 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel | Not affected | n/a |
| Red Hat Enterprise Linux 7 | kernel-rt | Not affected | n/a |
| Red Hat Enterprise Linux 8 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | kernel-rt | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | kernel-rt | Not affected | n/a |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-8 | Not affected | n/a |
| Red Hat OpenShift Container Platform 4 | openshift/ose-rhel-coreos-9 | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
No remediation recorded yet.
References (12)
- https://access.redhat.com/security/cve/CVE-2026-98360 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2546534 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-93345 Advisory
- https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-98360.mbox
- https://git.kernel.org/stable/c/02c0a2fa69c16248a7432af8a6d64ab2a73a5283
- https://git.kernel.org/stable/c/1caceeb2d74bbe88223aea55eb8626b4c5f076fd
- https://git.kernel.org/stable/c/c79a789aa15180a1543b5db49c343d12e3ec214d
- https://git.kernel.org/stable/c/d4fc4e37f8a143b0fe83b42c8fb48cf542154fee
- https://git.kernel.org/stable/c/ddb43ac0926d4a931bc9b7744b93627f627457e5
- https://git.kernel.org/stable/c/faae1fb4ccf8205806a8802c008798dabeb0205b
- https://nvd.nist.gov/vuln/detail/CVE-2026-98360
- https://www.cve.org/CVERecord?id=CVE-2026-98360
Change history (1)
- EUVD
Updated
changed from Oct 6, 2026 to Oct 7, 2026Oct 6, 2026 → Oct 7, 2026
CVE.org / MITRE
CISA Vulnrichment
No data
GitHub
No data