aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/samples/kobject/ssh:/git@git.zx2c4.com
diff options
context:
space:
mode:
authorMaoyi Xie <maoyixie.tju@gmail.com>2026-04-30 18:33:18 +0800
committerJakub Kicinski <kuba@kernel.org>2026-05-02 10:36:21 -0700
commit1d324c2f43f70c965f25c58cc3611c779adbe47e (patch)
tree2cc7549ff160996825bd387423d1f6df6598add2 /samples/kobject/ssh:/git@git.zx2c4.com
parentMerge branch 'replace-direct-dequeue-call-with-qdisc_dequeue_peeked' (diff)
ip6_gre: Use cached t->net in ip6erspan_changelink().
After commit 5e72ce3e3980 ("net: ipv6: Use link netns in newlink() of rtnl_link_ops"), ip6erspan_newlink() correctly resolves the per-netns ip6gre hash via link_net. ip6erspan_changelink() was not converted in that series and still uses dev_net(dev), which diverges from the device's creation netns after IFLA_NET_NS_FD migration. This re-inserts the tunnel into the wrong per-netns hash. The original netns keeps a stale entry. When that netns is later destroyed, ip6gre_exit_rtnl_net() walks the stale entry, producing a slab-use-after-free reported by KASAN, followed by a kernel BUG at net/core/dev.c (LIST_POISON1) in unregister_netdevice_many_notify(). Reachable from an unprivileged user namespace (unshare --user --map-root-user --net). ip6gre_changelink() earlier in the same file already uses the cached t->net; only ip6erspan_changelink() has the wrong shape. Fixes: 2d665034f239 ("net: ip6_gre: Fix ip6erspan hlen calculation") Cc: stable@vger.kernel.org # v5.15+ Signed-off-by: Maoyi Xie <maoyi.xie@ntu.edu.sg> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/20260430103318.3206018-1-maoyi.xie@ntu.edu.sg Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'samples/kobject/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions