Article View: linux.kernel.netdev
Article #14368Re: [PATCH net v2 0/3] rtnetlink: fix truncation of dump entry
From: Hangbin Liu
Date: Wed, 11 Nov 2026 02:23
Date: Wed, 11 Nov 2026 02:23
39 lines
9496 bytes
9496 bytes
On Tue, Nov 10, 2026 at 09:26:15AM -0800, Stephen Hemminger wrote: > While analyzing one of the OSS Scanner dump reports for iproute2, > a bug was uncovered in netlink route dump. > A route dump whose first entry is too large for the dump skb ends with > NLMSG_DONE and status 0. The route and everything after it is silently > dropped; "ip route show table 100" prints nothing and exits 0. > > It takes some non real world stuff to do this > like a 500 way multipath route is enough to trigger this. > > The series is broken into three parts: > 1. Fix regression in rtnl_dumpit(). > Do not hide EMSGSIZE on empty skb case. > 2. Fix IPv6 FIB dump to propagate error properly > 3. Add a test for this bug. > > v2 - drop Assisted-by > - correct commit message about "ip route get" > > Stephen Hemminger (3): > rtnetlink: return EMSGSIZE when first dump entry does not fit > ipv6: return EMSGSIZE when first route in dump does not fit > selftests: net: netlink-dumps: test dump of route larger than skb > > net/core/rtnetlink.c | 5 +- > net/ipv6/ip6_fib.c | 6 + > tools/testing/selftests/net/config | 3 + > tools/testing/selftests/net/netlink-dumps.c | 271 +++++++++++++++++++- > 4 files changed, 280 insertions(+), 5 deletions(-) > > -- > 2.53.0 > For the series Tested-by: Hangbin Liu <liuhangbin@kylinos.cn> Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>
Technical Details
Message-ID:
<avPRuQugknhA-HqL@fedora>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360830-linux-kernel-netdev=dewy.ruReferences:
<20261110172925.3293312-1-stephen@networkplumber.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-360830-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2 0/3] rtnetlink: fix truncation of dump entry Date: Wed, 11 Nov 2026 10:23:53 +0800 Organization: Usenet Network Message-ID: <avPRuQugknhA-HqL@fedora> References: <20261110172925.3293312-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="757952"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:s5n8Ej6yT5rlIxtGaN4l4bt4zgg= sha256:usK3ZkRCy90or/WlIOaqy4Y0NTAAilsgSMXFHxgiFr8= sha1:uv/E7dxtdRPE3XeowWEJrLaMUhU= sha256:hkcps59wVLzJMsRrN+HWxou6fltshW6zbRSbmMtz5jw= 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 6B484113E07; Wed, 11 Nov 2026 05:24:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, 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 (1024-bit key) header.d=linux.dev 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 phea_v_ES1dN; Wed, 11 Nov 2026 05:24:32 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-360830-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id A3891113DD8; Wed, 11 Nov 2026 05:24:22 +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 96DCD3C7A9; Wed, 11 Nov 2026 02:24:10 +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=1794363847; b=19mqs7knSBp4Hy0U0Y0qyteMCTNuLH/JVZfOBlruiPeZaKgVbHHZ+5FUOUoZX+dNv3Oy xZO005wgsbreJJ6h5TIXjCKx+L4V6iUdlde+DFixQF4rs5TevTt7W2cRGyqcnaPEBKnzP Jr/Xwf/W/YqgsEPSFdb620B4o8ApCZ4BU0Z8U7pLHkygeGLAbaEoplQjCBgmZaqJtSGmK E/dpSmWNHBNbbUN0V2dfm3M2O/rhsRIgW5SWvvaq/yeCUEFV5m55yKHjZKtZ2FXxQtMFU ZAyCzixgq9gUeYzki4t9tywkoGZ+A+BlbziwmZ0LRz488JsZMsCQeDUGbHPqzqB+nPQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794363847; h=X-Original-To:Received:DMARC-Filter:X-Envelope-To:DKIM-Signature: X-Envelope-To:Received:X-Mizu-Trace-ID:X-Migadu-Flow: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=aMlrCdF6wdgpbtzH1/toupj8eIjFQGIp8QPct95wWLQ=; b=pb0Nb/2SB2z9eSHOVOUJcBvj5FeRSUWdfoesBfT/O8jeNFCxryUKjiiG601BWARqtaj3 trj+9Vb65QlCA0/cu0mMJm909o++scpjKQMM6RHyksriq7RLNOC0bBCqaenq9qIwPy5BQ Nb2g6NbpGibrTfjFVJ4vUGHtl50C71MkhDpMpGhtiq/MkWoSpxGVbKkswkYoGlzl5JFQ1 qfwDYs7DIdef8/z0HmIzQmZK0u3NvFu3NZE9LJCke8qiNX+liHjXa4PTWBODQ7sMU3lgg ZSKiUbNf5K2DuJprlzpWez96FM+7XfDrKtMRqTlG3cumT07T5eEN0YPd9hbKeAUrd1g== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=c52fP1Mq; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; 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 D6392606A32A; Wed, 11 Nov 2026 02:24:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=c52fP1Mq X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.1 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794363847; b=mc//tWncJrbs84+DjZBXImfAw4L4lWZ0dPvVQjmfbb1+agcxtC6iOY+ZsZlYrEaQw9Mz YU/KH3zk4PYnyI9VxUFNaL8EHmK3PnL2Sf7WBmTjiGcfY9joTUAbd8qf2rOklHNxf4lgo ct62UgQ/5yV+kG6MoPcHfz5/Z1qVK/x9h1mAxfgjJkEZ3xQdniU/voNw/ub6VdG6KEgxw Wr8xHBhG7CaJmr9JiM2WxYC8uJR65tAS7+qeK0Axmg9+n6zPUkXFtBEcwIMxCdPYTOvEz V20NM/K4ddmvZslapRkAOvyqmQdaekZDLj3OdLdLPlwQmUKi7l1sOuV/YwOZwLJhHmQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794363847; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=aMlrCdF6wdgpbtzH1/toupj8eIjFQGIp8QPct95wWLQ=; b=vEGP7Xb1SZn3nGTAbMGo3gZ64n0J1Z2+S5gwLYuvWUSyRsWD4TNoNVkqqgqZmfrJalzN 62e910k+C3XrtCI9oEdDYcCAx7sZ7zsnCxP4F5t7FkavaqsFWBJtRfg8ReIi/UQCRWa1P xASuacwF2kX19SQUO+8Ijeace0NCwbwh/8TcMksvcmJYk22Qpz9ojloo1zckzgcYB4/SH e3zUZvpa4onDEkKcekHcFZ2E9TDtdPHfXS0kKKLFPpyCCXqzqZeBmZNWWEp7HfcPXxDQr 4sfOffbw17miP+G1ldI2+0Ixnyxw6k0GV8+iQp8yQzm1HlsjOP4Bd9lkUUQJA2JXUGw== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=c52fP1Mq; arc=none smtp.remote-ip=95.215.58.1 X-Received: from mta1.migadu.com (out-1.mta1.migadu.com [95.215.58.1]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B921606A320 for <netdev@vger.kernel.org>; Wed, 11 Nov 2026 02:24:05 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5B921606A320 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=MoQGpo4FuP4mzIUo8BoEyWZZfoeLV0yVTLAJvW0r6/o=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1794363844; v=1; x=1794968644; b=c52fP1MqBvZyF4hcFd5xyIlBgcKmrWFwQXPg9YL5M3/gI+1f7VVQyvVRE2obF+mkGC1YBMoC EPdE9ZijQi3e3L660cSFOg0KzAUgmP6YjRX+E5jcnnfKdKSwuzSIRPeAu9cx7j1lwtcMO9aOk0O OQCjSbvEsBIvTjSF8wKVE/1o= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta12.migadu.com with ESMTPS id 6f6d6ffe7c88529c; Wed, 11 Nov 2026 02:24:03 +0000 X-Mizu-Trace-ID: 6f6d6ffe7c88529c X-Migadu-Flow: FLOW_OUT 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: <20261110172925.3293312-1-stephen@networkplumber.org>