Netdev List
 help / color / mirror / Atom feed
* [PATCH net 0/3] rtnetlink: fix silent truncation when first dump entry does not fit
@ 2026-11-09  1:13 Stephen Hemminger
  2026-11-09  1:13 ` [PATCH 1/3] rtnetlink: return EMSGSIZE " Stephen Hemminger
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stephen Hemminger @ 2026-11-09  1:13 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, Stephen Hemminger

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-11-10 15:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09  1:13 [PATCH net 0/3] rtnetlink: fix silent truncation when first dump entry does not fit Stephen Hemminger
2026-11-09  1:13 ` [PATCH 1/3] rtnetlink: return EMSGSIZE " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox