Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3786489ybi; Mon, 29 Jul 2019 12:36:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXMrBZsFkLuXphhpJoY1BcbPjr13qZviEvKR0FeKUxkkbPJDZOA/JEI9ivhBJYjiKCFiVP X-Received: by 2002:a62:e20b:: with SMTP id a11mr38635521pfi.0.1564428964185; Mon, 29 Jul 2019 12:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564428964; cv=none; d=google.com; s=arc-20160816; b=wSzeqVoynqyVguVvDPC4xhjwjJhcM1zhtsliIsDpEE2mxDjcKDL3MISGC/FUE98EK2 cffdkFhYg4UnmyEnqNN16fKX0rrNUfZL4HT8ew7OwRNBLdXxmNDZZ79erXYkBzOYjtCA kwmldT1ddN9h+Wr1ZkgBxOtcud0MD63Tkw8Y2syRQf0ItxTRbfdW35scasNGHQ08S2Cg B8n/tp5tmXlAT24yvEwgyjrB4+cixWSXAmWi8pyUsISiGRky9g84aZDyovTEPRUfbpvY 3nTQJkkykMSCkaAEwblx5QlCeyQYhC/3eUrgM2ZB9p/OIKD/8hDGBn4pQmsW/lVJhCWl oSsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=99uU7+l3Is8a1FjGii1JVsOe//0v3PW012x0UdWbUMg=; b=Fqoxjv03L2P38xL2YtdaMQLkjBbzDicswoby/VwYSxgSXRMKwm1EjYEzT8eHYqUJ/6 eIZN/J4yVAzOXwSVUjjReK0ac2JB75suFJtBNGlAZgSZD/XlKaKhP140qgPTme/2s7yF x7dGakV1vfHSX2Dl10eI7sCIE7PInhUxM1jQCh98he1hdTc4rPd2I4akBoRUXjUm4BS9 Zup7fiSkI13HgP4cn/Un4uile5nCEx9pGatW2wuqgtIKh8OU72xT14tZ2toPFD6Sn7+X A3a2DiHx4IjDUArHrCfqNzSUFchGOJV74mCanjKTgPE58Kw7To5SQ+5PWeEMUG/JQZuJ FcuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TMV9blYZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si3911530pgk.492.2019.07.29.12.35.49; Mon, 29 Jul 2019 12:36:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TMV9blYZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388214AbfG2TeH (ORCPT + 99 others); Mon, 29 Jul 2019 15:34:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:48450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388199AbfG2TeE (ORCPT ); Mon, 29 Jul 2019 15:34:04 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D459E2171F; Mon, 29 Jul 2019 19:34:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428844; bh=mU/cphH8ryHrVmuO9omVALk2fgtD/LhRfsJrntv7E2o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TMV9blYZKpjeEIji5DmT2mpWBJQyQNryBQ4jLwpvIv3Ri9Q8mKRaQLFwGWaV0TZnb MnHIi45MvYKG4U6SOkgXX+DlGL4Tlp18kaTBHqb8YrbMgGpodzQ/FVpB7F8ToKjZ+9 j9qEx3MnzwIBdGK8W7Bmyb7kQQhp9k/x6bpqPsT4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nikolay Aleksandrov , "David S. Miller" Subject: [PATCH 4.14 204/293] net: bridge: stp: dont cache eth dest pointer before skb pull Date: Mon, 29 Jul 2019 21:21:35 +0200 Message-Id: <20190729190840.091972186@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikolay Aleksandrov [ Upstream commit 2446a68ae6a8cee6d480e2f5b52f5007c7c41312 ] Don't cache eth dest pointer before calling pskb_may_pull. Fixes: cf0f02d04a83 ("[BRIDGE]: use llc for receiving STP packets") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/bridge/br_stp_bpdu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/net/bridge/br_stp_bpdu.c +++ b/net/bridge/br_stp_bpdu.c @@ -147,7 +147,6 @@ void br_send_tcn_bpdu(struct net_bridge_ void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb, struct net_device *dev) { - const unsigned char *dest = eth_hdr(skb)->h_dest; struct net_bridge_port *p; struct net_bridge *br; const unsigned char *buf; @@ -176,7 +175,7 @@ void br_stp_rcv(const struct stp_proto * if (p->state == BR_STATE_DISABLED) goto out; - if (!ether_addr_equal(dest, br->group_addr)) + if (!ether_addr_equal(eth_hdr(skb)->h_dest, br->group_addr)) goto out; if (p->flags & BR_BPDU_GUARD) {