mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Cheng Yongkang <teel4res@gmail.com>
To: Nikolay Aleksandrov <razor@blackwall.org>,
	Ido Schimmel <idosch@nvidia.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	bridge@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [BUG] net: bridge: MRP state is not propagated to MSTI zero
Date: Thu, 22 Oct 2026 02:15:20 -0700	[thread overview]
Message-ID: <20261022091520.3651032-1-teel4res@gmail.com> (raw)

Hi all,

With MST enabled, the bridge data path uses MSTI-0 per-VLAN state.
br_set_state() normally synchronizes MSTI 0 through br_mst_set_state(),
but br_mrp_set_port_state() changes only p->state and sends a switchdev
notification.

The MRP-aware guard prevents other STP transitions from synchronizing
MSTI 0.  Direct bridge MST commands cannot address MSTI 0, and direct
VLAN-state changes are rejected while MST is enabled.  A ring port
marked BLOCKING by MRP therefore keeps its PVID/MSTI-0 state at
FORWARDING and continues to pass data.

Observed on Linux v7.3, commit
08ab31164c55f20c7a2653de3186ae333470e2c1:

  net_bridge_port.state: BLOCKING
  port VLAN state:       forwarding

  MST disabled control:  egress=0 ingress=0
  MST enabled candidate: egress=1 ingress=1

The MRP instance add and PORT_STATE BLOCKED requests both returned
success.  The port was observably blocked in sysfs but still forwarded
real broadcast Ethernet frames.

The MRP port-state path needs to synchronize MSTI 0, for example by
calling br_mst_set_state(p, 0, port_state, NULL), in addition to
updating p->state.

This is distinct from candidate BR-039 (MST with VLAN filtering disabled)
and from BR-005 (deletion-time MRP forwarding).  I found no matching
upstream fix or CVE.

The test used a diagnostic switchdev endpoint only to acknowledge the
MRP object.  It did not change bridge port state, VLAN state or packet
forwarding.

The PoC, module source and full logs are available on request.

This was found with a multi-agent workflow; the
state/forwarding differential was reproduced in QEMU.

Thanks,
Cheng Yongkang

                 reply	other threads:[~2026-10-22  9:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261022091520.3651032-1-teel4res@gmail.com \
    --to=teel4res@gmail.com \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.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

all inboxes | Powered by JetHome®