Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2254668ybd; Mon, 24 Jun 2019 03:23:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDB6kuxRtMnXxobkftaxt5WayOhf5BVx/UtAJSWisN1ZJbk/AiZ2HJx+v3b84yUSkOewwv X-Received: by 2002:a63:3547:: with SMTP id c68mr24227120pga.428.1561371793516; Mon, 24 Jun 2019 03:23:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371793; cv=none; d=google.com; s=arc-20160816; b=OItzDeltPpj7SBatX432VvcZIZoGQAJO0smyuV7AVmDkLdV37m3PH9cnc6pNFhvdwQ WoulOHI3a62kn564KXEIUk/Z180IWPOhQ4v31pDBTisg8/Fxe9DYB4i8KMizRyVMgS+M P1viKzdw3DsKOPIBCDQ3ghsXFpsy85Xf1XKG/VYuMXJjyAyFfIlVd/Fp5WXdTrpSFqwJ QANPFHuFVEb0w8P2bNF76BzitZLnh0rAm/66q1k30qp6tfloj2G5QwwXZYnYHeEJ7mmE r6H5/EmX5ApcNhvDdEWiU7+QbdKrWagbLSb73wuKtMSvQw9fpGSJBhTYpnVb0/7gjXh+ S9pQ== 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=lDamuhWA802n052oXZZ2yWBAjoFKaaG4uUrNH5ChWog=; b=x4AJdHlXHG1GWt33wOXDZ47jQ2DdsniHqDewD9qkj3yIQ0mBIHEcYl6Ap8F8dsOJmg OSpWuJf+46vfVGZtY5x6dWvI/e7m+prvi7bp5OGJ6qjpfiHSyHH67iBbeEFLJyM2by4H Nre+a2zNjusTFYAui1lD28w4tJzsQfrUBlyiuFVfk3pr+MmR+BHCUg3OEcAxWm3Z8PYn KFKuccC5tCf4IORT0wAAFJcC0hSM1as3539i4RqYKKuJzbruGTfFJ3Q3UMrQvPGWoVfk CKDYXl6LnoM2rq0/W9msSiNQwIaicDxxMasumq6ZKwnhzsasBnHpt3f489Hdvu+yJ3d/ UOmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=yIv+zbXX; 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 z2si9316500pln.247.2019.06.24.03.22.58; Mon, 24 Jun 2019 03:23:13 -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=yIv+zbXX; 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 S1731124AbfFXKW0 (ORCPT + 99 others); Mon, 24 Jun 2019 06:22:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:58232 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731101AbfFXKWU (ORCPT ); Mon, 24 Jun 2019 06:22:20 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (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 09C2F20645; Mon, 24 Jun 2019 10:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371739; bh=hiIZuYsTTiR3Joxulex90+VVmemtEuq0BwbeSceJ1Ho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yIv+zbXXlodOJQ1bfUvkvwXq8l3kz9XAivcZLslzJ9qyp/Ha5erqmyfJ9rHo2oNLB 2Ry5mBiwPQI82eNjsZGsapj5cnpNKlPNc4xN5x3VnSGUBaNJypChGOUEKXsjt9UuZs 5nbMSztwPn9TEREH1fTqVzJVYUrbDGau8RRXcyfk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg Subject: [PATCH 5.1 116/121] mac80211: drop robust management frames from unknown TA Date: Mon, 24 Jun 2019 17:57:28 +0800 Message-Id: <20190624092326.563304390@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@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: Johannes Berg commit 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f upstream. When receiving a robust management frame, drop it if we don't have rx->sta since then we don't have a security association and thus couldn't possibly validate the frame. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- net/mac80211/rx.c | 2 ++ 1 file changed, 2 insertions(+) --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3823,6 +3823,8 @@ static bool ieee80211_accept_frame(struc case NL80211_IFTYPE_STATION: if (!bssid && !sdata->u.mgd.use_4addr) return false; + if (ieee80211_is_robust_mgmt_frame(skb) && !rx->sta) + return false; if (multicast) return true; return ether_addr_equal(sdata->vif.addr, hdr->addr1);