From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796388056; b=FC+AF+h6cNbynp+2x7zlS4SYIh4QI0XHwqyHL4L7d7/+I/j5nW44EJ7Y7hrp05hQRjPK RVJWXspbROlubf4u0VyQSkvSGdIexpHeTUPXmH9tYorLGE/l4hNBXs76m3up+wWMr5h1d MoccNpLIQUU35ALDuVHukIS8+7cO8MF9ZByDKrfU0Rf/JUTL9XEubOKx73GCmAkulLd63 gNRIyri+66FVBVaHwgphaRZ5zNdCQgq0MChD600Sl3MB2rYNr2TiKC3oHKhZlgLwqp322 /pp9y3k09zI6d6oVZILd/ahJX4TJNTbezsO6JWWZtHDDauNDgOrXs739Ck9kDvLJgoA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796388056; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=xPBuQCVZnWynJm3M66YYPVkP+TbpN+gih8I5RORJGJ8=; b=tLDaiTYJol5g1K0DldYW5mLy+QzJbyKhkiW54axK0F3AWtvC6McVRqJ9HdB7h2iv/RDj gVIvgKH7JVcGa9oaL4raYVouaHTafVBdwrqzPm4tIANBc7yWxgvPKu0+5ZD8YJokG2A9i 5OjluOghzfPJx3s+zD350oDjZjwPrN+jG/sy/loyEteoUpeJ2w0bktKRPzu2BofR0bcLd juBdt84gc5scMCzB5VyM96KEK1WmHuT9LoRfB1B+zCXoeqzkZoz+feVCvm8sFKcUsO8h2 isZMP7NyakhToGop2ulJceo/cZ0nO30RYucGUUw73oQiRrHxotaB++AUL4+BIphs4iQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=uF4Tpa3K; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 386A1606A32C; Fri, 4 Dec 2026 12:40:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=uF4Tpa3K Received: by smtp.kernel.org (Postfix) with ESMTPSA id A38661F000CE; Fri, 4 Dec 2026 12:40:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796388056; bh=xPBuQCVZnWynJm3M66YYPVkP+TbpN+gih8I5RORJGJ8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uF4Tpa3KRif2h/lCX2mLRCRa+suLHu6UtDDPQ/hYHJCq0Vk96Td1vADCB60Pc5SPt NYUM6nPdT4MprdVHWxcYoihw+rgqi7jZFUHMtEtYULqMOvosWL9roeH0RCd6dSb20Y 9pFszIWKnyCVm7UQqA3XN6I/HBER2bM6JneWyooI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Linkui Xiao , Eric Dumazet , Nikolay Aleksandrov , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1 0450/1059] net: bridge: netlink: do not clear the vlan info dump error Date: Fri, 4 Dec 2026 18:59:41 +0900 Message-ID: <20261204100655.950749983@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100643.980430235@linuxfoundation.org> References: <20261204100643.980430235@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Linkui Xiao [ Upstream commit fcc00b15cb21a6de76826e5012b2c758505f5e65 ] 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). Not triggered or tested. 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 Reviewed-by: Eric Dumazet Acked-by: Nikolay Aleksandrov Link: https://patch.msgid.link/20261027085200.1501599-1-xiaolinkui@126.com Signed-off-by: Jakub Kicinski [ sashal: Adapted the one-line !err && guard to this branch's older flag test, port->flags & BR_VLAN_TUNNEL, in place of test_bit(BR_VLAN_TUNNEL_BIT, ...). ] Signed-off-by: Sasha Levin --- 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 e9e5c77ef0f4a..bd99091edeb6f 100644 --- a/net/bridge/br_netlink.c +++ b/net/bridge/br_netlink.c @@ -518,7 +518,7 @@ static int br_fill_ifinfo(struct sk_buff *skb, else err = br_fill_ifvlaninfo(skb, vg); - if (port && (port->flags & BR_VLAN_TUNNEL)) + if (!err && port && (port->flags & BR_VLAN_TUNNEL)) err = br_fill_vlan_tunnel_info(skb, vg); rcu_read_unlock(); if (err) -- 2.53.0