summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorZihan Xi <zihanx@nebusec.ai>2026-09-08 07:42:56 +0000
committerJakub Kicinski <kuba@kernel.org>2026-09-10 08:39:06 -0700
commit19b4ed644d68098cc62ab612727f40d30f43476c (patch)
tree40c1c6cb900b27e01b6bed9adfdc66ca2c36d60b /scripts/basic
parent5e38d732ec67a5b1f9a56e6c73add480c4b6030a (diff)
downloadlinux-19b4ed644d68098cc62ab612727f40d30f43476c.tar.gz
linux-19b4ed644d68098cc62ab612727f40d30f43476c.zip
ipv6: fix fib6 walker UAF on seq stop
ipv6_route_iter_active() treats a walker in FWS_U at the table root as already unlinked. fib6_del_route() can move a still-linked walker into that same state when the current leaf is the last route at the root, so ipv6_route_native_seq_stop() skips fib6_walker_unlink(). The seq private object can then be freed while it remains on net->ipv6.fib6_walkers. A later route deletion walks the dangling list and uses the freed walker. Use the list head as membership state and reinitialize it when unlinking. Keep the existing w->node check so a never-started iterator with a zeroed private object is not treated as linked. The same stop helper is used by /proc/net/ipv6_route and by the BPF ipv6_route iterator. The BPF show path only widens the race. Fixes: 8d2ca1d7b5c3 ("ipv6: avoid high order memory allocations for /proc/net/ipv6_route") Cc: stable@vger.kernel.org Reported-by: Vega <vega@nebusec.ai> Co-developed-by: Luxing Yin <root@tr0jan.top> Signed-off-by: Luxing Yin <root@tr0jan.top> Signed-off-by: Zihan Xi <zihanx@nebusec.ai> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/89699735763f6c297584d7c2ff106239cc1e8ce0.1788837093.git.zihanx@nebusec.ai Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions