🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #21159

Re: [PATCH net v3 0/3] rtnetlink: fix truncation of dump entry

#21159
From: Simon Horman
Date: Mon, 23 Nov 2026 16:25
41 lines
9130 bytes
On Tue, Nov 17, 2026 at 02:13:41PM -0800, Stephen Hemminger wrote:
> While going through an OSS Scanner dump report for iproute2, I found a
> bug in the netlink route dump.
> 
> If the first entry of a route dump is too big for the dump skb, the dump
> ends with NLMSG_DONE and status 0. That route, and everything after it,
> is quietly dropped: "ip route show table 100" prints nothing and exits 0.
> It takes something well outside normal use to get there, such as a 500
> way multipath route.
> 
> Two separate paths get it wrong, so there are two fixes.
> 
> Patch 1 covers the generic RTNL_FLAG_DUMP_SPLIT_NLM_DONE path in
> rtnl_dumpit(), which drops -EMSGSIZE and returns skb->len. On an empty
> skb that is 0. This is the IPv4 FIB case.
> 
> Patch 2 covers inet6_dump_fib(), which doesn't use -EMSGSIZE at all; it
> suspends the walker and returns a positive value. That one goes back
> further, to when IPv6 multipath routes started being dumped as a single
> RTA_MULTIPATH message. It has to come after patch 1, since it relies on
> rtnl_dumpit() no longer swallowing the error.
> 
> Patch 3 adds a selftest: IPv4 and IPv6 multipath routes wide enough to
> miss the first dump skb of a fresh socket. The dump has to either return
> the route or fail with -EMSGSIZE.
> 
> v3 - move to net-next and resolve conflicts
>      incorporate Sashiko suggestions
> v2 - drop Assisted-by
>    - correct commit message about "ip route get"

Hi Stephen,

Unfortunately CI was unable to apply this patch to net-next using git am.
And stopped there.

Please rebase and post a v4 accumulating tags provided by others.

-- 
pw-bot: changes-requested
Technical Details
Message-ID: <20261123162553.GF31322@horms.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-369580-linux-kernel-netdev=dewy.ru
References: <20261117221538.184948-1-stephen@networkplumber.org>

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-369580-linux-kernel-netdev=dewy.ru
From: horms@kernel.org (Simon Horman)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 0/3] rtnetlink: fix truncation of dump entry
Date: Mon, 23 Nov 2026 16:25:53 +0000
Organization: Usenet Network
Message-ID: <20261123162553.GF31322@horms.kernel.org>
References: <20261117221538.184948-1-stephen@networkplumber.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="3927455"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:ryMYZfRV/N3LMQvsPuF8WEu5NGk= sha256:3kin0DPvfqekxD28MFB5swy/FfEDBepO8F+wiaK/nhg=
	sha1:0huRs1pGhzgH5zrD2kapKbJkVsg= sha256:Xig+jaPm2Rr1ywSlPgMslcnGz+Roka58/BR7ydzYDX8=
Content-Disposition: inline
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 97ACF125DC0; Mon, 23 Nov 2026 19:26:17 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 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] 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 Mias3BytNk18;
	Mon, 23 Nov 2026 19:26:11 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-369580-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id C1E3C125DBD; Mon, 23 Nov 2026 19:26:02 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id B717C244BF; Mon, 23 Nov 2026 16:26:00 +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=1795451158;
	b=hIA770ILOifhSC/TTgBapvy4aJ0j83Q14fi7B6mbd90oKLlc/81nEbvq3AjKvwAI/cD6
	 nWyJbRiyrAZLtbbXycVWaHDibZ8Bm1tm5CeqxbO0MB0z1n1k6cqUmCggfp3oW0gPUzVUi
	 80rOSopxzbysYm+trMU+c9a9dh31AO42OpMX7TVnRlx7HjujE79IWBj5cvn0R4Qub5I9h
	 fOr9GNchZ0JGPh2xeNpnQQ2lWVvPwniAN5vxAqg6DmUud6sKLqHooiA9akyW4wPEufKLl
	 zG/HZ9ln++Jy++mhkmjALCHWy75knnbl4c4BT9ZH8+sjeLQ9IW2EW22qH8yATU/AJVg==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795451158;
	h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc:
	 Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post:
	 List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence:
	 MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=Syl4oAAF5bPrS0zyxFhc/MXaIKxajdc1fl2oZ4Yvqc0=;
	b=FjOMz4y/IQcvb2hWNFSpcttYRWFvqBZnzNO1phqLKsKOX3CqNOKHH/pMm78uxI9HOPVW
	 pMfCIY5JdIcDekLltHqiObrBPOs9u8dY9GgektKIQ3EQV13x+StjbC2VO6xwaEmxB2Qbb
	 7h8fEA6dtuuTHm8Gkov44pZgdni/IGmP2O0a5/WQWuwAwAmtFaJ0EzETmm9Dp9gyHgiCm
	 xM1ZEVLVIcR0O4uG5Sps6tTNW0O6GNotF0B5tJR4c457FuOnjKsEFePBMKcZVyIkwcv3P
	 ZxnFzPZ0nOF4fj2pfmFU8lWpAksD//aCA3hYj/klI7J1jUDxXakXGfc3wiQB+j7Ootw==
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="OT1/kIEv";
	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 8CCEB606A32C;
	Mon, 23 Nov 2026 16:25:58 +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=OT1/kIEv
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=1795451157;
	b=4HtPWiu5CMlXH8qEnKiifHbZGWUgz4t1nOJUG1rFKODW4Hw4p2OhxSduYSXW8SEcSNhx
	 cELeiiIyxUW1RqsHbd/8xTnpirjT/fmRTgYVVqzwKgvay3jVQlGNo7n4T+StyWSw1oo/5
	 eZojmqnt1d0OqC1cb3Qdwp2g7QZvkLfvOc+GPauc9ZZXQmBE0Oa6oqoLZHU/XlrQFnzGk
	 IxaXdKwiM4R9sSpFxCv8OF/5C4KXudPGvg2hjB7QZ1oZkidbYslyNJLYUCrLNwTN4Hhid
	 7RcZN15mJ1ifzNITrRGqlyS+2+jn2rzIJcDLzUnPSKvAMF0ZXosPLBAFW9FpFDzCVGQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795451157;
	h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID:
	 References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=Syl4oAAF5bPrS0zyxFhc/MXaIKxajdc1fl2oZ4Yvqc0=;
	b=27bOimaR9Bh71pZrbGLmpjafT1biq4rnhSbiYW8pgxDPPHycFivI+xXsgdtXXc/9ED0b
	 MwS4cvAXuLrWMvTpYMGhTDUprxENERphjWyZkUn7U05unH78gwPl0mz/ZfFDR80T4ii8V
	 pYSEqofNPwJWz5EvWRTnS7kc6eGk5w7SenQg2OwK+ZplYHZR/Zmuxg678Dq7yl6dAIYvG
	 1LxvvS7rdszshZ6b3kyhMs642/AkwZE9R3lUyuAUfrIMr7jr89eShxKtyzLbPtv2UbMnU
	 ngFhMwPgAWMfLhm1/RpX3eTaN5a2O7iN8MWq0TI/XKmELUSW41LlKis6D/qEX5Zbbow==
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="OT1/kIEv";
	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 A8675606A31A
	for <netdev@vger.kernel.org>; Mon, 23 Nov 2026 16:25:57 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B9421F000D0;
	Mon, 23 Nov 2026 16:25:55 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1795451156;
	bh=Syl4oAAF5bPrS0zyxFhc/MXaIKxajdc1fl2oZ4Yvqc0=;
	h=Date:From:To:Cc:Subject:References:In-Reply-To;
	b=OT1/kIEvCOBXkA2L95JuI6fYyAf6hPC7ck/SZ3GlA2cP2Jc1m8E1EkxuH0BryOWPN
	 XEe6vlCY98+lkt+KSo+FG78lMIccjhG+GL48d9mPTSOUcR3chtm7xFeFulf6uI8RdR
	 LfOai0z2SWJx4utLePFNIkmuc+QhjbvpPVYnc4gi0D7X1nRPCPfSB704nkI0a4BAQp
	 oBm3afuHyFFxx3Zweoz6OT3qAQblgva0dhQQcCNUsXC3y2gwaySYzvmPLOYU9Ts4nT
	 Vd53s4gpRLUOk3RPM9Pb8eVglw3NLAnG6Wnw4q6kqaS7I6e9+w1Ymz8uYihJ6AwYIW
	 Sk3cBoQBRqsuQ==
X-Cc: netdev@vger.kernel.org, dsahern@kernel.org
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
X-In-Reply-To: <20261117221538.184948-1-stephen@networkplumber.org>