Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp609783pxb; Fri, 28 Jan 2022 06:26:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJx77/BSZs9n4iyXZVlYhDaIeFAPlNw/LipiBCJHzQz/CtMfkXbdC10bxWq5EXekqcrys8fl X-Received: by 2002:a63:3189:: with SMTP id x131mr6711495pgx.302.1643379986378; Fri, 28 Jan 2022 06:26:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643379986; cv=none; d=google.com; s=arc-20160816; b=aGn8zmMrMrEyoBbm40IY2IAPsE8c8f47lxVJGIiIKTHubllxe75FVxAGANgo96UBne Ibdkoc3lMaSN/jDd4quDKuRxSgKp9jp1+yYmHwPkIQTqojyDGKhL6VcF5I7bC7r+8ROJ L0N+seL6LcL72w1aqVQqclM/NVmXKxV6uyxmgDo37amisF3iJEjQwwPKlX4/A+1JYEw2 VdkRUsgckY+b3mazPvYsg+IW8yOVaZtIHpeiexH0DUFBP0hQWAcRUtVMmsPu4p8QqLSj xpyoRiNjiwafHJE5s/il0Tf3Qy5ywc/UKyiKbRKz9Es5POF80j7iwrZDoXUrWvSigfx2 N2Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=Q00YI/5LkSPBeiTFzoq6Idi/gxYSEnb/OI2pKY2QUbk=; b=vfSYjDs9F6IxS7V9vLzRN80zLtuhCkeSCWd5spanjckvruIoTESm3vSNeVyBmBZ3d/ RR+OL2dzyFiXnwZatL+BzZ+wjV8aWL4iu6swaZ1KjfvS8wKbjssqCuH5L0OolkHbQve7 2RoHVaG0xGgykNGLDRkS7R3PC5WZ1HEdQM9/cVLfjj4q+KtZhXXm+bI9gnRb6iZ1aetH vz1IUWSiPRsuQVvP3uY8w6dqJMjw1pmIX+ROOwVZppEusqW6vSY0umT8O/X+ptYDF4ta hcvYsZ5jrFiufnoYsaFgc3EUPWrckMdtzBLyJEHfE080ysx/M7/8WpGV3rWHUlUh5k0e 91Lg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1xtbrkqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i6si5461037pgr.752.2022.01.28.06.26.12; Fri, 28 Jan 2022 06:26:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1xtbrkqI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245160AbiA0SKb (ORCPT + 99 others); Thu, 27 Jan 2022 13:10:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245097AbiA0SKG (ORCPT ); Thu, 27 Jan 2022 13:10:06 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 681A4C06175E; Thu, 27 Jan 2022 10:09:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 0792061998; Thu, 27 Jan 2022 18:09:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBF7C340E8; Thu, 27 Jan 2022 18:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643306973; bh=cTzy/uUSa4SbHM+Sg65a3vUrWjXyn+gy5N/7gXWhp/w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1xtbrkqICQenRVWrbg2ujnhODqnOwR5v2ilynetkPKdDk5J7V4a5UUtJZec8XPkCV I25kgo992H7KzQcP3AclSsgxdXJUOrkoHThO15jrwgQ4i8JRu6R92OPCkdUxNFnqKp PCjL9ECw8+Si6dySXSJ37vb6En1aOczhgcs/cin0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Aleksandrov , "David S. Miller" , Huang Guobin Subject: [PATCH 4.19 2/3] net: bridge: clear bridges private skb space on xmit Date: Thu, 27 Jan 2022 19:09:02 +0100 Message-Id: <20220127180256.913580967@linuxfoundation.org> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220127180256.837257619@linuxfoundation.org> References: <20220127180256.837257619@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolay Aleksandrov commit fd65e5a95d08389444e8591a20538b3edece0e15 upstream. We need to clear all of the bridge private skb variables as they can be stale due to the packet being recirculated through the stack and then transmitted through the bridge device. Similar memset is already done on bridge's input. We've seen cases where proxyarp_replied was 1 on routed multicast packets transmitted through the bridge to ports with neigh suppress which were getting dropped. Same thing can in theory happen with the port isolation bit as well. Fixes: 821f1b21cabb ("bridge: add new BR_NEIGH_SUPPRESS port flag to suppress arp and nd flood") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Signed-off-by: Huang Guobin Signed-off-by: Greg Kroah-Hartman --- net/bridge/br_device.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c @@ -42,6 +42,8 @@ netdev_tx_t br_dev_xmit(struct sk_buff * struct ethhdr *eth; u16 vid = 0; + memset(skb->cb, 0, sizeof(struct br_input_skb_cb)); + rcu_read_lock(); nf_ops = rcu_dereference(nf_br_ops); if (nf_ops && nf_ops->br_dev_xmit_hook(skb)) {