Netdev List
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, dsahern@kernel.org
Subject: Re: [PATCH net v3 0/3] rtnetlink: fix truncation of dump entry
Date: Mon, 23 Nov 2026 16:25:53 +0000	[thread overview]
Message-ID: <20261123162553.GF31322@horms.kernel.org> (raw)
In-Reply-To: <20261117221538.184948-1-stephen@networkplumber.org>

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

      parent reply	other threads:[~2026-11-23 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 22:13 [PATCH net v3 0/3] rtnetlink: fix truncation of dump entry Stephen Hemminger
2026-11-17 22:13 ` [PATCH net-next v3 1/3] rtnetlink: return EMSGSIZE when first dump entry does not fit Stephen Hemminger
2026-11-18  2:01   ` Hangbin Liu
2026-11-18 18:27     ` Stephen Hemminger
2026-11-19 15:50   ` David Ahern
2026-11-17 22:13 ` [PATCH net-next v3 2/3] ipv6: return EMSGSIZE when first route in dump " Stephen Hemminger
2026-11-19 15:51   ` David Ahern
2026-11-17 22:13 ` [PATCH net-next v3 3/3] selftests: net: netlink-dumps: test dump of route larger than skb Stephen Hemminger
2026-11-23 16:25 ` Simon Horman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261123162553.GF31322@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox