CVE-2026-139580: RDMA/rxe: unpublish the per-net tunnel socket before
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: unpublish the per-net tunnel socket before
KASAN reports a slab-use-after-free in ip6routeoutputflags() reached from rxefindroute(), with the free in skdestruct() after rxesockput(), and a user with CAPNETADMIN can remove the device with "rdma link del rxe0" while RoCE v2 over IPv6 traffic keeps looking the socket up.
BUG: KASAN: slab-use-after-free in ip6routeoutputflags+0x300/0x360 Read of size 4 at addr ffff888115ddd794 by task kworker/u32:6/309 Call Trace: <TASK> dumpstacklvl+0x53/0x70 printreport+0xd0/0x630 ? pfxrawspinlockirqsave+0x10/0x10 ? ip6routeoutputflags+0x300/0x360 kasanreport+0xce/0x100 ? ip6routeoutputflags+0x300/0x360 ip6routeoutputflags+0x300/0x360 ip6dstlookuptail.constprop.0+0x76c/0xcc0 ? ctnmiexit+0xc3/0xf0 ip6dstlookupflow+0xf5/0x1e0 ? pfxip6dstlookupflow+0x10/0x10 rxefindroute+0x426/0xa30 ? kasanslaballoc+0x6e/0x70 ? pfxrxefindroute+0x10/0x10 ? kmemcacheallocnodenoprof+0x141/0x370 ? kmallocreserve+0x103/0x2b0 ? rxeicrcgenerate+0x229/0x330 ? pfxallocskb+0x10/0x10 rxeprepare+0x9e8/0x18b0 ? rxeinitpacket+0x3c7/0x4f0 rxerequester+0x1a0f/0x51f0 ? rxecompleter+0x1de9/0x38c0 ? pfxrxecompleter+0x10/0x10 ? queuework+0x43e/0x11f0 ? pfxrxerequester+0x10/0x10 ? irqentryexit+0xd2/0x640 ? rawspinlockirqsave+0x85/0xe0 ? pfxrawspinlockirqsave+0x10/0x10 ? pfxrxesender+0x10/0x10 rxesender+0xe/0x30 dowork+0x144/0x470 processonework+0x633/0x1030 ? assignwork+0x11d/0x370 workerthread+0x45b/0xd10 ? pfxworkerthread+0x10/0x10 kthread+0x2c6/0x3b0 ? recalcsigpending+0x15c/0x1e0 ? pfxkthread+0x10/0x10 retfromfork+0x36e/0x5a0 ? pfxretfromfork+0x10/0x10 ? switchto+0x572/0xdd0 ? pfxkthread+0x10/0x10 retfromforkasm+0x1a/0x30 </TASK>
Allocated by task 146020: kasansavestack+0x33/0x60 kasansavetrack+0x14/0x30 kasanslaballoc+0x6e/0x70 kmemcacheallocnoprof+0x130/0x360 skprotalloc+0x56/0x210
Fix by clearing the per-net pointer before the last reference is dropped.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In Linux kernel RDMA/rxe, unpublish the per-net tunnel socket by clearing its per-net pointer before dropping the last reference.
Event History
Frequently Asked Questions
What conditions are required to trigger the use-after-free?
An RXE RDMA device must be handling RoCE v2 traffic over IPv6 while its per-network tunnel socket is being looked up. A user with CAP_NET_ADMIN can trigger the teardown path by removing the device with "rdma link del rxe0".
Which systems are realistically exposed?
Systems using the Linux kernel RXE RDMA driver with RoCE v2 over IPv6 traffic are implicated. The race requires concurrent IPv6 traffic and removal of an RXE device, so systems not using that configuration are not described as reaching the vulnerable path.
What can be done before an update is available?
Avoid removing RXE devices while RoCE v2 over IPv6 traffic may still be using them. Restrict CAP_NET_ADMIN to trusted users, since that capability is identified as sufficient to remove the device and initiate the race.
How can administrators recognize a possible occurrence?
KASAN may report a slab-use-after-free in ip6_route_output_flags(), with the call path including rxe_find_route(). The reported free occurs in __sk_destruct() after rxe_sock_put().