From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH net 0/3] rtnetlink: fix silent truncation when first dump entry does not fit
Date: Sun, 8 Nov 2026 17:13:11 -0800 [thread overview]
Message-ID: <20261109012115.11898-1-stephen@networkplumber.org> (raw)
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 even
though "ip route get" still finds the route. 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.
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
next reply other threads:[~2026-11-09 1:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 1:13 Stephen Hemminger [this message]
2026-11-09 1:13 ` [PATCH 1/3] rtnetlink: return EMSGSIZE when first dump entry does not fit Stephen Hemminger
2026-11-10 7:25 ` Hangbin Liu
2026-11-10 8:27 ` Hangbin Liu
2026-11-10 15:19 ` Stephen Hemminger
2026-11-09 1:13 ` [PATCH 2/3] ipv6: return EMSGSIZE when first route in dump " Stephen Hemminger
2026-11-10 8:28 ` Hangbin Liu
2026-11-09 1:13 ` [PATCH 3/3] selftests: net: netlink-dumps: test dump of route larger than skb Stephen Hemminger
2026-11-10 9:24 ` Hangbin Liu
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=20261109012115.11898-1-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dsahern@kernel.org \
--cc=netdev@vger.kernel.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