Article View: linux.kernel.netdev
Article #20331Re: [PATCH net-next v4 2/4] ipv6: take fib6_sernum from a sequence shared by all netns
From: netdev-bot+sashiko
Date: Sun, 22 Nov 2026 03:14
Date: Sun, 22 Nov 2026 03:14
67 lines
10492 bytes
10492 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The commit fixes a bug that is real and visible to users, but it
carries no Fixes: tag and no Cc: stable.
--
ipv6: take fib6_sernum from a sequence shared by all netns
This patch makes fib6_new_sernum() take every fib6_sernum bump from one
sequence shared by all netns, starting at 2. A per-cpu nexthop route
cached in one netns then no longer matches the sernum of another netns
after its device moves. rt6_is_valid() also rejects 1, the initial value
that every netns starts with.
> When a device moves to another netns, such a route remains usable until
> nexthop_free_rcu() releases it, and fib6_info_destroy_rcu() queues that
> callback from inside an RCU callback, after the device has moved. If the
> fib6_sernum of the new netns matches the cached one in that window,
> ip6_dst_check() accepts the route and a socket in the old netns keeps
> sending through a device that now belongs to another netns.
[ ... ]
> Signed-off-by: Qiliang Yuan <qiliang.yuan@linux.dev>
[Severity: Low]
This fixes a netns isolation problem that users can hit, but the patch has
no Fixes: tag and no Cc: stable. Should it have them?
Two pieces of code came in with the same commit. One records the sernum in
ip6_rt_pcpu_alloc(). The other compares it across netns in rt6_is_valid():
net/ipv6/route.c:ip6_rt_pcpu_alloc() {
...
if (f6i->nh)
pcpu_rt->sernum = rt_genid_ipv6(dev_net(dev));
...
}
net/ipv6/route.c:rt6_is_valid() {
return rt6->sernum == rt_genid_ipv6(dev_net(rt6->dst.dev));
}
Going by git blame, both lines come from this commit:
Fixes: 8f34e53b60b3 ("ipv6: Use global sernum for dst validation with nexthop objects")
The commit message also never calls this a netns isolation problem: a
socket in netns A keeps sending through a device that netns B now owns.
Could the message say so explicitly, for stable and security triage?
The IPv4 companion patch in this series, "ipv4: draw rt_genid from a
sequence shared by all netns", seems to be missing the same tags.
The series also puts these fixes together with "net: remove rcu_barrier()
from __dev_change_net_namespace()", which looks like a net-next style
optimization. Would it make sense to split the fixes out and send them to
net, so they can be picked up for stable?
--
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261117-bug-net-netns-move-rcu-barrier-v4-0-43e1ca0aac7f%40linux.dev
Technical Details
Message-ID:
<179531725203.3135.1479967142257708654@kernel.org>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368569-linux-kernel-netdev=dewy.ruReferences:
<20261117-bug-net-netns-move-rcu-barrier-v4-2-43e1ca0aac7f@linux.dev>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-368569-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v4 2/4] ipv6: take fib6_sernum from a sequence shared by all netns Date: Sun, 22 Nov 2026 03:14:12 +0000 Organization: Usenet Network Message-ID: <179531725203.3135.1479967142257708654@kernel.org> References: <20261117-bug-net-netns-move-rcu-barrier-v4-2-43e1ca0aac7f@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3557975"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:OJqrEGh3WYzwffRyeL3BxcLYsWY= sha256:Nyi9YqGcWG09Pl0JsjVw0XNs8IvZEiVgdeg518sMECU= sha1:zSm3fey4D2FimNvBHsCypytmB5s= sha256:E83G0y//+q4IZVn6IQFNu00UkrxbJmj/mRK+YC68nlg= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 5CC88115C6C; Sun, 22 Nov 2026 06:14:33 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.4 X-Spam-Status: No, score=-3.4 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wuCotU9GPi9Y; Sun, 22 Nov 2026 06:14:29 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-368569-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 5E4A4115C68; Sun, 22 Nov 2026 06:14:20 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 68020282D1; Sun, 22 Nov 2026 03:14:16 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795317254; b=A0hSmWdrGfIIG2vtiD7V0MkPWTWjWr18mNlaEb7H6H6g9y3AhZTcOtYuYBtBD3aOPz9T z3JJvNlsd9JIROO2OetiWjFoaEu73mgg/l5G7pMJ9HVUokeqE29H9yXsnXuct/kNIyfn3 4Jg4vC4IaJWhsMsIRUk1ybyNnIEbt+50K8dvDl3JFLbzPCBswsyiJRp3jIu1VKiJ3vDBh v0RVHauNUjp+Xc89sCEvhwcIIaeNuIWS50jSi6gCb6SGg5ynBs9Dl6dVyoV/OVoBaqn6m Iz+sSGa50eZAeLG2KHzvfin0Qz9ODbFrXOUnxzJi7/1i3eOnF23sGrOQlYO9JJxbO3w== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795317254; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=qAmy6KwKngwwTBTxCVk1+pHs6GsgwpRoWF/IbaYltOw=; b=GhTtyj6rBwd7QdJeuWJ/fgffporc/tmjK/oxdHkxZZO5lFPpqa6AOd8hw9m+jq8Be453 RMlok3XfAe3eCzBo9ARGs1k2+OQ54Kb/f/FwWv3GTebLGCtRt+N+ITZsOe7WExcuVUKlv RusoIp+L8H8raBUwn6UdnGAVP4efHte5k5yfEKNo1hjNtVsNzXgm5l97UdtVqfZVAoqgt gLjEvYb2WBk0/oEbDGTpttyNL5cAWH7m9qTYcSYFJYTyIHCeD1MwSQJOb7ug2X9dxVrFW lUrst0VscmaSQu3UOiHHD+dVIzPq3FTf6+VF/jIs55o4wVwGDnMG/lHgsyd/CtxBReA== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iOqZ0B0C; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 581D9606A68C; Sun, 22 Nov 2026 03:14:14 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iOqZ0B0C X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795317253; b=S5W2wlxP7HGzRckfMAaAs02hoZvcpWiseOap2aWeviUrPGSsSe744ROc+V8UdcK0yrvN +LhRhn2jIc+7wHIvkYA6FlFLZ89qyNYSVSLFNl2e6f1LhWCE7vfp2qpkRE8s4XlBuwTd6 RlV2cy6e6Qg7RsPg60a0E5WK99weJXDbQSoDGEt7C2/smBb/5VcXgoS6k/Bg3OCwRdJiN Bljo8er9B8s/jYo+RDtdpRDfGFW51XO+NAt6aXZd//2r85rSDhrAIvbp8tEqUJ2w1sG0k KrU+pQaoD/6iaqUYjf7zWURxSs4z29tdbhGv7CfhudjJGLDCz3p1RVZ1gkJHTLPWhpQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795317253; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=qAmy6KwKngwwTBTxCVk1+pHs6GsgwpRoWF/IbaYltOw=; b=iMZ/BEvX7jpLEF6GOuzC8sMig5ucgJfpagnWlGUI18VXP9XcvKqqJbftdu89BetWU4Ke S+RYYDo3QGxrIscNQAq+MCjukJ6H2Dl80CrnJbhNVWL0BVayyBri3NVn49P+ZmHl9OdZw i3uI1rSvJEYOL40RRyx0qtcwCF6FdHUVHULsXTe0ES72NKfkSl+NBh+FE75NYiIgexuk1 9vlwqkNKZ+6eRSsF5AUXcGlvM4o3e8CEaB8Ij0f75DJDtUUn+XyRt+myiLRP/6CgZ1g/P gS5n9Khfa4TKXjgTHkxexgIfUl9KfulS+YyqIZrxLLzG8OwarAagerUH+Kak8i9m07A== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=iOqZ0B0C; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A0B5606A338; Sun, 22 Nov 2026 03:14:13 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FE091F000C0; Sun, 22 Nov 2026 03:14:12 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795317253; bh=qAmy6KwKngwwTBTxCVk1+pHs6GsgwpRoWF/IbaYltOw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=iOqZ0B0CvFNvro7i64E+Wt+cRSNeinVEQ8vnm0Bh9fK7ZqWt00W2S252z0HOkHLgw 3EIsEe5iLBsuFF0/1Ve+QoaOp08g1lPl2OdNotbeud+FKTgf+g6IcJqsuGsbmw79n+ tPFlUv9yTKnyGTFOmFe36E7/4DysI06EH2sFu3XdskBJsm2I68nUVWdlH3Pca/LoEZ JmDrUCQSaYuT+yeCOQZEs0HNgSoCl+ZruMrg7lFS/mL5vX49z1sL5TmFDyQZ0FcVcc uS9u53luFljlfPH2FnkbtKavFaRhrf4hXZ0kNPYj8VKR1UcPbNAVGRu18A8FYTrp8c 0J1ZFjJl274Ig== X-Cc: davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, dsahern@kernel.org, idosch@nvidia.com, razor@blackwall.org, kuniyu@google.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-In-Reply-To: <20261117-bug-net-netns-move-rcu-barrier-v4-2-43e1ca0aac7f@linux.dev> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list