This is a note to let you know that I've just added the patch titled ipv4: correctly iterate over the target netns in inet_dump_ifaddr() to the 6.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ipv4-correctly-iterate-over-the-target-netns-in-inet.patch and it can be found in the queue-6.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 942774d1433ca6d7939413077bfc1e4c738d60ae Author: Alexander Mikhalitsyn <alexander@xxxxxxxxxxxxx> Date: Tue May 28 22:30:30 2024 +0200 ipv4: correctly iterate over the target netns in inet_dump_ifaddr() [ Upstream commit b8c8abefc07b47f0dc9342530b7618237df96724 ] A recent change to inet_dump_ifaddr had the function incorrectly iterate over net rather than tgt_net, resulting in the data coming for the incorrect network namespace. Fixes: cdb2f80f1c10 ("inet: use xa_array iterator to implement inet_dump_ifaddr()") Reported-by: Stéphane Graber <stgraber@xxxxxxxxxxxx> Closes: https://github.com/lxc/incus/issues/892 Bisected-by: Stéphane Graber <stgraber@xxxxxxxxxxxx> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@xxxxxxxxxxxxx> Tested-by: Stéphane Graber <stgraber@xxxxxxxxxxxx> Acked-by: Christian Brauner <brauner@xxxxxxxxxx> Reviewed-by: Eric Dumazet <edumazet@xxxxxxxxxx> Link: https://lore.kernel.org/r/20240528203030.10839-1-aleksandr.mikhalitsyn@xxxxxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index ee5fbc19b85fc..8382cc998bff8 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c @@ -1898,7 +1898,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) cb->seq = inet_base_seq(tgt_net); - for_each_netdev_dump(net, dev, ctx->ifindex) { + for_each_netdev_dump(tgt_net, dev, ctx->ifindex) { in_dev = __in_dev_get_rcu(dev); if (!in_dev) continue;