CVE-2026-99401: rtnetlink: wait for RCU readers in rtnl_link_unregister()
In the Linux kernel, the following vulnerability has been resolved:
rtnetlink: wait for RCU readers in rtnllinkunregister()
rtnllinkopsget() finds ops on linkops under rcureadlock() and only then takes ops->srcu. rtnllinkunregister() unlinks ops, then calls synchronizesrcu() and cleanupsrcustruct() without first waiting for RCU readers. A reader that found ops before listdelrcu() and has not yet taken ops->srcu is not waited for.
Such a reader then locks a cleaned-up srcustruct and keeps using ops after the module that owns it is gone. rtnlnewlink() and rtnldumpifinfo() both look up ops without RTNL, the latter for any user that dumps links filtered by kind.
With delays added between the lookup and srcureadlock() in rtnllinkopsget(), and before rtnllinkopsput() in rtnldumpifinfo(), running "ip link show type dummy" alongside "rmmod dummy" on a KASAN kernel gives:
BUG: KASAN: vmalloc-out-of-bounds in srcureadunlock+0x57/0x70 Read of size 8 at addr ffffffffc02ff318 by task ip/147 Call Trace: srcureadunlock+0x57/0x70 rtnldumpifinfo.cold+0x30/0x3b rtnldumpit+0x7a/0x1b0 netlinkdump+0x486/0x11b0 netlinkdumpstart+0x661/0x910 rtnetlinkrcvmsg+0x611/0x9e0 netlinkrcvskb+0x126/0x380 netlinkunicast+0x605/0x830 netlinksendmsg+0x6d0/0xbb0 syssendto+0x335/0x3a0
Call synchronizercu() before synchronizesrcu(), as rtnlafunregister() already does. This should be enough because rtnllinkopsget() is the only RCU walker of linkops, and it takes ops->srcu before rcureadunlock(), so every reader that found ops is covered by synchronizesrcu() once the RCU grace period ends. The extra grace period only costs time at module unload.
Readers and the writer were serialized by RTNL until linkops got its own mutex, which is why the missing RCU wait did not matter before.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.61 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.2 - Compensating control
In rtnl_link_unregister(), call synchronize_rcu() before synchronize_srcu() so RCU readers have finished before the SRCU cleanup.