Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2 0/2] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids
@ 2026-10-23 20:40 memoriaru
  2026-10-23 20:44 ` netdev-bot+sinfo
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: memoriaru @ 2026-10-23 20:40 UTC (permalink / raw)
  To: netdev; +Cc: daniel, andrew, olteanv, johan, kuba

From: Zhang Hewei <memoriaru@foxmail.com>

Here is a v2 of the two mxl862xx robustness fixes, reworked after
the sashiko AI review.

Changes since v1 (https://lore.kernel.org/netdev/tencent_A56873DA4A296F5D794B6A5989A180A21C05@qq.com/):

- the walk limit is now checked after the "last" test: the walk
  needs one read more than the number of entries it reports, so
  checking before it rejected a correctly ended walk of a full table
- macro name, error message and comments say "conservative read
  limit" instead of "table capacity", which the exact value is not
- the "growing kernel memory without bound" wording is gone:
  entries whose port id does not match never reach the callback,
  which is exactly why the walk needs its own bound (the netlink
  dump skb never fills)
- BRIDGE_ALLOC validation now also rejects 0xffff (INVALID_HANDLE is
  documented but never defined; the MaxLinear GSW API uses 0xffff)
  and ids already in use, closing the duplicate-FID collapse
- Fixes: tags added (both issues come from the bridge offloading
  commit), self Reported-by trailers dropped, and the comment hunk
  that v1 carried in patch 2 is folded into patch 1

Base-commit: f47d223627f80cb7a1eb14c585fe6cb35de5e984

Zhang Hewei (2):
  net: dsa: mxl862xx: bound FDB dump walk with a read limit
  net: dsa: mxl862xx: validate the bridge id returned by BRIDGE_ALLOC

 drivers/net/dsa/mxl862xx/mxl862xx-api.h | 1584 +++++++++++++++++++++++
 drivers/net/dsa/mxl862xx/mxl862xx.c     |   57 +-
 drivers/net/dsa/mxl862xx/mxl862xx.h     |  343 +++++
 3 files changed, 1983 insertions(+), 1 deletion(-)
 create mode 100644 drivers/net/dsa/mxl862xx/mxl862xx-api.h
 create mode 100644 drivers/net/dsa/mxl862xx/mxl862xx.h

-- 
2.39.5 (Apple Git-154)


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

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

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-23 20:40 [PATCH net v2 0/2] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids memoriaru
2026-10-23 20:44 ` netdev-bot+sinfo
2026-10-23 21:03   ` memoriaru
2026-10-28 22:44     ` Jakub Kicinski
2026-10-29 11:25 ` [PATCH net v3 " memoriaru
     [not found] ` <20261029112528.56652-1-memoriaru@foxmail.com>
2026-10-29 11:25   ` [PATCH net v3 1/2] net: dsa: mxl862xx: bound FDB dump walk with a read limit memoriaru
2026-10-29 11:30     ` netdev-bot+sinfo
2026-10-29 11:25   ` [PATCH net v3 2/2] net: dsa: mxl862xx: validate the bridge id returned by BRIDGE_ALLOC memoriaru

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