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: VLAN range notification merges unequal state
Date: Thu, 22 Oct 2026 02:16:29 -0700	[thread overview]
Message-ID: <20261022091629.3652038-1-teel4res@gmail.com> (raw)

Hi all,

br_vlan_fill_vids() encodes per-VLAN state, tunnel ID, neighbour flags
and multicast context from one v_opts, so every option must be equal
across a range.  The dump/options paths enforce that through
br_vlan_can_enter_range(), but the old-style br_process_vlan_info()
range loop only checks whether the request changed PVID/UNTAGGED on
each VID.

The old path can therefore merge adjacent VIDs whose state or tunnel
id differs and emit one range carrying the start VID's options.  The
notification then describes a VLAN map that the kernel does not have.

Observed on Linux v7.3, commit
08ab31164c55f20c7a2653de3186ae333470e2c1.  VID 10 was FORWARDING and
VID 11 was BLOCKING.  An old-style RTM_SETLINK range request changed
UNTAGGED on both VIDs:

  one RTM_NEWVLAN: vid=10 range=11 state=FORWARDING
  dump:            vid=10 state=FORWARDING
  dump:            vid=11 state=BLOCKING

The notification tells listeners that VID 11 is FORWARDING even though
the kernel database keeps it BLOCKING.

The old range path must run the same option-equality check per VID or
emit separate notifications.  The February 2026 expansion of
br_vlan_opts_eq_range() for neighbour/multicast fields did not add this
missing call; I found no matching fix or CVE.

The PoC and program/console logs are available on request.

This was found with a multi-agent workflow; the
notification/dump divergence was reproduced in QEMU/KVM.

Thanks,
Cheng Yongkang

                 reply	other threads:[~2026-10-22  9:16 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=20261022091629.3652038-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®