AZL-118634: CVE-2026-143348 affecting package kernel 6.6.161.1-1
In the Linux kernel, the following vulnerability has been resolved:
ipv6: fix fib6 walker UAF on NLMFREPLACE
fib6walker uses w->leaf to remember the next fib6info to dump, so an RTMGETROUTE dump can continue there on the next recvmsg(). This assumes that whoever removes a route from the tree also updates the walkers pointing at it. fib6delroute() does: it moves w->leaf to the next route. The NLMFREPLACE branch of fib6addrt2node() does not: it removes the old route, fib6add() frees it, and w->leaf keeps pointing at the freed object.
The fnsernum version check in fib6dumptable() normally protects against resuming on a stale w->leaf, but it can be bypassed: ip6linkfailure() resets fnsernum to -1 when the default route fails, which an unprivileged user in a user+net namespace can cause:
1) link failure fnsernum = -1 2) dump pauses on route R 3) replace R fnsernum changed, R freed 4) link failure fnsernum = -1 5) dump resumes -1 == -1, reads freed R <- UAF
BUG: KASAN: slab-use-after-free in rt6fillnode+0x1c22/0x2cd0 Read of size 4 at addr ff11000011fa0064 by task poc/101 rt6fillnode <- rt6dumproute
Fix by adjusting walkers separately for replacement and deletion. For replacement, add fib6walkersreplaceleaf() points w->leaf at the new route. For deletion and ECMP sibling removal, fib6walkersskiprt() calls fib6walkersreplaceleaf() with the next route. Reset w->skipinnode when updating w->leaf, and set w->state to FWSU when no next route remains.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In the IPv6 route-table walker, handle replacement separately: have fib6_walkers_replace_leaf() point w->leaf at the new route, reset w->skip_in_node when updating w->leaf, and set w->state to FWS_U when no next route remains.
Event History
Frequently Asked Questions
Who can trigger the vulnerable sequence?
An unprivileged user that can operate in a user namespace and network namespace can cause the link-failure condition used to bypass the route-dump serial-number check.
What activity is required to reach the use-after-free condition?
A route dump must pause on a route, that route must be replaced through the NLM_F_REPLACE path, and link failures must reset the IPv6 FIB serial number before the dump resumes. The resumed RTM_GETROUTE dump can then read the freed route object.
What evidence could indicate this issue has been triggered?
The provided reproducer reports a KASAN slab-use-after-free in rt6_fill_node, reached through rt6_dump_route. This occurs while an RTM_GETROUTE dump resumes on a freed IPv6 route entry.