Message ID | 20200401161547.322161405@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <SRS0=zuZT=5R=vger.kernel.org=stable-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2417DC2D0F3 for <stable@archiver.kernel.org>; Wed, 1 Apr 2020 16:39:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A33C92166E for <stable@archiver.kernel.org>; Wed, 1 Apr 2020 16:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585759144; bh=GauZb6dHMyz2R4rmS5GEIj7YAt4mU6G0N83gbZEowaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HnFWt6tJNrQN8qEUkxWWHr51CZlR1RGtTQ8PnqH4vL9iqIho1D6Bq76644iCugV4L 6Q5FJYBWo/cpcJmQRrZ5ZxDS0QU69HoADOY3mgF69/yml5lx0VQgiYMsEdy4mL3iET lFU7F3KJOc0QlTePahiMpTxExcue/NygNKLfa1YU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389146AbgDAQjC (ORCPT <rfc822;stable@archiver.kernel.org>); Wed, 1 Apr 2020 12:39:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:38882 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389151AbgDAQjB (ORCPT <rfc822;stable@vger.kernel.org>); Wed, 1 Apr 2020 12:39:01 -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 65D54214D8; Wed, 1 Apr 2020 16:39:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585759140; bh=GauZb6dHMyz2R4rmS5GEIj7YAt4mU6G0N83gbZEowaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZIDbxPEdUvzycAEV1C3uOH/J0zEP9jhnegIrbLwQ/LOYafNLymY4zpP8ao7YUeKJL jTqBPim4FjYv2Yr8A1CcYwz9AvZAaZ6IH2mx643JnbQctHjxFbeE5sHXOExv0FjFyJ 6pcguVQo3Wd5378e07TnHee2U5/SJ+z6x8wJuHfE= From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, stable@vger.kernel.org, Jouni Malinen <jouni@codeaurora.org>, Johannes Berg <johannes.berg@intel.com> Subject: [PATCH 4.9 090/102] mac80211: Check port authorization in the ieee80211_tx_dequeue() case Date: Wed, 1 Apr 2020 18:18:33 +0200 Message-Id: <20200401161547.322161405@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161530.451355388@linuxfoundation.org> References: <20200401161530.451355388@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@vger.kernel.org |
Series |
None
|
expand
|
--- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c @@ -3412,8 +3412,25 @@ begin: tx.skb = skb; tx.sdata = vif_to_sdata(info->control.vif); - if (txq->sta) + if (txq->sta) { tx.sta = container_of(txq->sta, struct sta_info, sta); + /* + * Drop unicast frames to unauthorised stations unless they are + * EAPOL frames from the local station. + */ + if (unlikely(!ieee80211_vif_is_mesh(&tx.sdata->vif) && + tx.sdata->vif.type != NL80211_IFTYPE_OCB && + !is_multicast_ether_addr(hdr->addr1) && + !test_sta_flag(tx.sta, WLAN_STA_AUTHORIZED) && + (!(info->control.flags & + IEEE80211_TX_CTRL_PORT_CTRL_PROTO) || + !ether_addr_equal(tx.sdata->vif.addr, + hdr->addr2)))) { + I802_DEBUG_INC(local->tx_handlers_drop_unauth_port); + ieee80211_free_txskb(&local->hw, skb); + goto begin; + } + } /* * The key can be removed while the packet was queued, so need to call