Article View: linux.kernel.netdev
Article #7792[PATCH net] net: bridge: netlink: do not clear the vlan info dump error
From: Linkui Xiao
Date: Tue, 27 Oct 2026 08:52
Date: Tue, 27 Oct 2026 08:52
43 lines
9941 bytes
9941 bytes
From: Linkui Xiao <xiaolinkui@kylinos.cn>
br_fill_ifinfo() assigns the result of br_fill_vlan_tunnel_info() over
the result of br_fill_ifvlaninfo() or br_fill_ifvlaninfo_compressed()
instead of only running the second helper when the first one succeeded.
When the vlan information no longer fits in the skb but the port has no
vlan mapped to a tunnel dst, br_fill_vlan_tunnel_info() walks the vlan
list and returns 0 without touching the skb. The -EMSGSIZE is lost,
br_fill_ifinfo() completes a message whose IFLA_AF_SPEC is truncated,
and the dump carries on to the next interface instead of stopping, so
userspace silently sees an incomplete vlan list.
Only fill the tunnel information when the vlan information was filled
successfully.
This was flagged as a pre-existing issue in the Sashiko review of the
net-next series, which noted that the VLAN fill result is overwritten
before it is tested (see the Link tag below).
Fixes: efa5356b0d97 ("bridge: per vlan dst_metadata netlink support")
Link: https://lore.kernel.org/bridge/ed1de95e-e112-4076-93f0-6f7668e657ad@blackwall.org/T/#u#5
Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn>
---
net/bridge/br_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/bridge/br_netlink.c b/net/bridge/br_netlink.c
index b2cd4e39326d..8ed86bf71a00 100644
--- a/net/bridge/br_netlink.c
+++ b/net/bridge/br_netlink.c
@@ -540,7 +540,7 @@ static int br_fill_ifinfo(struct sk_buff *skb,
else
err = br_fill_ifvlaninfo(skb, vg);
- if (port && test_bit(BR_VLAN_TUNNEL_BIT, &port->flags))
+ if (!err && port && test_bit(BR_VLAN_TUNNEL_BIT, &port->flags))
err = br_fill_vlan_tunnel_info(skb, vg);
rcu_read_unlock();
if (err)
--
2.25.1
Technical Details
Message-ID:
<20261027085200.1501599-1-xiaolinkui@126.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352290-linux-kernel-netdev=dewy.ruShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352290-linux-kernel-netdev=dewy.ru From: xiaolinkui@126.com (Linkui Xiao) Newsgroups: linux.kernel.netdev Subject: [PATCH net] net: bridge: netlink: do not clear the vlan info dump error Date: Tue, 27 Oct 2026 16:52:00 +0800 Organization: Usenet Network Message-ID: <20261027085200.1501599-1-xiaolinkui@126.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1496731"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Lqw/79cTdT78rOlM0Edv3uRLyj8= sha256:baQEOuaDJVBo1BR1KOurgpWOOO55sDUGyKGsaSPnU/s= sha1:ENCNnynzmbKJxGojiQuh/xce2B0= sha256:lS73dQ/R2HMWaozDGTLo5y5uMh/+Fi6ti/Cf7HReUJQ= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 0C48F125BE2; Tue, 27 Oct 2026 11:54:45 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.047 X-Spam-Status: No, score=-3.047 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=126.com X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R5nVRwNIZ4AX; Tue, 27 Oct 2026 11:54:41 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352290-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=126.com X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 70EBF125BE1; Tue, 27 Oct 2026 11:54:31 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 884CF29194; Tue, 27 Oct 2026 08:53:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793091185; b=TLmaunKmp+zcv7HZPELZwcKQ9hLRRR98sbMRqX1uDzkpZ9x8QAkGTSnkiN3g/0IzFwhn +5Fge5npYoY6O0yGfnuOOykvgCSA6SYQ/Ix+Sg4GsHJrqA+pHNZQslTbD5bGZBZ8pXnju ifiGzUMKdhQoIDYyHTp2JECuyBsTX5BxraLxXwJ81o1dmI/l4/F0g2tItyTFssKlXuyl7 pCifSPkJbxdfDa/c8mCpGkjpCgk67SwNrv/Kxx1WF1IaiGUv4CfQjMDeZ1a0MCyNH/uFg /AX7U6SsBbDnH1x1moXor/ZFKfGBk97wXE3AzF9P/Gosak99c5yNkenDLRv53XaeoZg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793091185; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-Id:X-Mailer:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Transfer-Encoding:X-CM-TRANSID: X-Coremail-Antispam:X-CM-SenderInfo; bh=ZvZnWihFbxw483qh4KeYM/1CzNFyVp8lIcdiBtlen3M=; b=Y1ke4lYlvtwdi+ddorb4VgpEHaUBr6wIkW7Ccc/rJAt7KZLJCsA9c9bO8b5tnhQVW9Qf 4fHwwRUuhYFDlN+AawECYXoMeIoSnF0IuNKnB/qIKpbV2t68dbIT64XgAhu9u4aygg9ub ayJkPiZqmpmiffsJBavYDPI8n6vgZB11cSk1TjzM8NDL2CK+rwU4lrvF8WIhgergM7UzZ /Wc4G54pO5e03EZOJFdkd8gQBu7nXb0SHEIjzm1YYcx+xA0oHyW4+3bF1cBewtPheHpRn mTA4RmIHfC4Hd+v6E2R0r0sbLasKoAUPG6P/+wkXxg2UlsMWXmoHuMqVf1Q14vFyEmw== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b="oFA46/Eq"; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 40F10606A323; Tue, 27 Oct 2026 08:53:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b=oFA46/Eq X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=220.197.31.7 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793091174; b=Ka4/PlIMloyac1mCNGVhFOFZ4Wu75FNYRD7nAQaDethSGgpdZomj/XwUQvBUuRJG378o bnQdiPONvlaygtbqblpFvTWHI7rIj3dVL2ssXd0r2YrdMzHLbQZWtddP2TY/VK3pgpm3M FqpwifeUpkHSx0pSz0vaGpciNjE/otAhneZW39YaT53lJgQCCwm5csVk4miT3825D+rkP F5XmfhsJNWNOzTV7YMQeFZ9cW2vXa8OU8oPhqmce6rvowx/Ouw1EbubnKc2ClgLwanTKh wjjfvVoYv1u/pfRMw0kxdL5IDfEYyZI1YGpj5XVnXrMyG2FXnZylL0gb4JU/YPt8qhQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793091174; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-CM-TRANSID:X-Coremail-Antispam:X-CM-SenderInfo; bh=ZvZnWihFbxw483qh4KeYM/1CzNFyVp8lIcdiBtlen3M=; b=BzQosOsHoiiKpDYqtnkgG+sqsB0TNDxUlFvyafZSIRmonK13k8hJu3nrpo0SYqJJw9Bg CB5Huarjudx5+NCHjxmYRhTzKvM1Rdavo5hDrJxQmD0CHeKCbFKjp8JstK9yBKH5HYQ3q qJPxHup/3+nkShsGyZUfWcS0dARvjqLH+riM1pSziCzhYNdmIawjGHpyaqwb/r57m4fYo 57V31bwW01+rZG+WmrSI+fCFtRLLS6mLN/OZFRBncNue4A8/x8h+r4obAymECHgPwxbEP SEgC4dwC3aWgVAv1vz3ENcW3O/UBiWySLNHkLLIiEBseXKkaf3bFvULsjPzK5su+Jzg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=126.com; spf=pass smtp.mailfrom=126.com; dkim=pass header.d=126.com header.i=@126.com header.a=rsa-sha256 header.s=s110527 header.b="oFA46/Eq"; arc=none smtp.remote-ip=220.197.31.7 X-Received: from m16.mail.126.com (m16.mail.126.com [220.197.31.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E4DE606A31A; Tue, 27 Oct 2026 08:52:51 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2E4DE606A31A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=126.com X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=126.com X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=Zv ZnWihFbxw483qh4KeYM/1CzNFyVp8lIcdiBtlen3M=; b=oFA46/Eq8QxcasNRIA 4jWYHtRr1xdc2ztzFZsbbdze6+3AMhxnEPBOWHa93r33KRfGyjWjkFkgGy/E2uxm VGIkILhxS8B+T4whXK/Dj1ysdzBXkrCpwW2iSywhw7y7W2qCkxKXYkzsHdMucw8r WRmjNh9FbCiZ6x/nLPgtTHb5k= X-Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g1-0 (Coremail) with SMTP id _____wD3H+UzZuBqVA77BA--.59983S2; Tue, 27 Oct 2026 16:52:05 +0800 (CST) X-Cc: bridge@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Linkui Xiao <xiaolinkui@kylinos.cn> X-Mailer: git-send-email 2.25.1 X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-CM-TRANSID: _____wD3H+UzZuBqVA77BA--.59983S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tryUur45tr45GF1xCrWUtwb_yoW8Aw15pF 4Y9r9xJrWqqay8Kw109F4jqa43ZwnxGFW5CFn2kryIyF90gF1kZFZ5KFZ3Cw1UAF4kJFWY v3ZFqr1Yyrn8uFJanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UlhFsUUUUU= X-CM-SenderInfo: p0ld0z5lqn3xa6rslhhfrp/xtbBlBV5UGrgZjUJcQAA3J