🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by memoriaru Sat, 31 Oct 2026 08:18
[PATCH net v4 0/3] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids
#9112
Author: memoriaru
Date: Sat, 31 Oct 2026 08:18
71 lines
12316 bytes
From: Zhang Hewei <memoriaru@foxmail.com>

Hello,

v4 of the mxl862xx robustness fixes, rebased onto the current net tree
and extended after the sashiko review of v3.

The v2 series did not apply because it carried full copies of
mxl862xx-api.h and mxl862xx.h predating the upstream restructure into
mxl862xx-host.c / mxl862xx-phylink.c; v3 re-ported the two fixes onto
the restructured driver. This version adds a third patch for the
firmware-result handling that the sashiko review of v3 flagged.

New in v4 (patch 3): MXL862XX_API_READ() returns the firmware result
value (>= 0) on success rather than an errno, so a CRC-valid firmware
status of 1..1023 comes back as a positive value that passes
"if (ret)" guards. The ALLOC-style call sites (QOS_METERALLOC,
EXTENDEDVLAN_ALLOC, VLANFILTER_ALLOC) tested the result with
"if (ret) return ret;" and could hand a positive firmware status to
callers that only check ret < 0. Patch 2 additionally splits the
transport result from the payload id inside
mxl862xx_allocate_bridge() so the bridge_id contract checks
(0 / 0xffff / in-use) run on the ret == 0 path only. The firmware
result-code semantics will be cross-checked against the GSW API
documentation; a follow-up can extend the same split to the remaining
API_READ call sites if that is preferred.

v1: https://lore.kernel.org/netdev/tencent_5A7AEC56CDB23A83120519D0C074B592C706@qq.com/
v2: https://lore.kernel.org/netdev/tencent_6030CC520C02054D1B2925AEEF6FA92DC30A@qq.com/
v3: https://lore.kernel.org/netdev/tencent_A40150C474B4D2DDBAEA56D8B20F03130506@qq.com/

Changes since v3:
- patch 2: split transport status from the payload id in
  mxl862xx_allocate_bridge() (sashiko review: a positive firmware
  status passed "if (ret)" and was stored in priv->bridges[] by
  callers testing only ret < 0)
- new patch 3: same split at the QOS_METERALLOC / EXTENDEDVLAN_ALLOC /
  VLANFILTER_ALLOC call sites
- rebased onto net (cb284914e); no functional change to patch 1

Changes since v2:
- re-ported both fixes onto the restructured driver; dropped the
  mxl862xx-api.h / mxl862xx.h file creations

Changes since v1:
- walk limit checked after the "last" test; "conservative read limit"
  wording; BRIDGE_ALLOC validation extended to 0xffff and in-use ids;
  Fixes: tags added, self Reported-by dropped

Base-commit: cb284914e749388eef402938bdb3115fe1f6d337

Cc: Daniel Golle <daniel@makrotopia.org> (driver author)
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Vladimir Oltean <olteanv@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org

Zhang Hewei (3):
  net: dsa: mxl862xx: bound FDB dump walk with a read limit
  net: dsa: mxl862xx: validate the bridge id returned by BRIDGE_ALLOC
  net: dsa: mxl862xx: do not leak firmware result values at ALLOC call sites

 drivers/net/dsa/mxl862xx/mxl862xx.c | 81 +++++++++++++++++++++++---
 1 file changed, 78 insertions(+), 3 deletions(-)

-- 
2.39.5 (Apple Git-154)
Re: [PATCH net v4 0/3] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids
#9115
Author: netdev-bot+sinfo
Date: Sat, 31 Oct 2026 08:25
22 lines
8621 bytes
Hi!

This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:

 - How the issue was discovered, e.g. hit in production, hit during
   development, syzbot report, manual code inspection, LLM or static
   analysis tool scan.

 - Whether the issue was actually triggered, or is only theoretical
   (e.g. found by code inspection). If it was triggered please include
   the symptoms, like the stack trace or error messages.

Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.

The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
Re: [PATCH net v4 0/3] net: dsa: mxl862xx: bound FDB dump walk and validate BRIDGE_ALLOC ids
#9116
Author: memoriaru
Date: Sat, 31 Oct 2026 08:41
27 lines
10680 bytes
From: Zhang Hewei <memoriaru@foxmail.com>

Hi,

Adding the requested information:

How discovered: manual code inspection. We were auditing the
mxl862xx driver's handling of device-controlled API responses
(firmware as a misbehaving party rather than an adversarial one):
the MAC table walk's only exit is the device-set "last" flag, the
returned bridge id is never checked against the values the API
documents as reserved, and the ALLOC-style API_READ call sites
conflate the firmware result value with an errno. Patch 2's
transport/payload split and patch 3 were refined after the sashiko
review of v3 flagged the positive-result path (an LLM review finding,
verified against the driver source).

Triggered: no, theoretical. We have no MxL862xx hardware in hand,
so none of the three issues was exercised on a real device. The FDB
dump loop, the bridge_id gaps, and the firmware-result conflation
were verified by code inspection against the GSW API documentation
(id 0 reserved, INVALID_HANDLE documented but undefined -- 0xffff in
the MaxLinear GSW API). No symptoms to report.

Best,
Zhang Hewei
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads