Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2650778pxj; Mon, 31 May 2021 07:24:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrkAbBHljJH3AHTlrJPrpEh7jSDMzzhu+hrhh9nfoXEFHs5xCSS32tl+mswGT7m2JXunhw X-Received: by 2002:a17:906:240b:: with SMTP id z11mr14392558eja.545.1622471061980; Mon, 31 May 2021 07:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471061; cv=none; d=google.com; s=arc-20160816; b=LJcU3c/mjFzTQcXoGmfFRTzSbyKUuC1Z6bJEKMAK1NjEQ9mjVumom3bk0Un0eBPJup haAvV3deZU4CDbfLmnLJqoKxV4z27DCCHclbJCLKxXTwPNrfP656kVlKtznqUuW22iJP BmqxrEfZXSDCfJCZT3zEJ70EYgetvHb1zRNd9oXKeO58NysocZzD/PhcZeKtehcKAKBf 1VPCdvLjI7lK/2JVnUYhEPDLSrxNknGWNiJRrhx2IWe95ABg+2n0OXDqtyPDaM0ccrKr nL8OjhKRFSjttU6X0xipwbPVvr/97vQwD7OS60QGNKwlkJ1BFAi8xe0KIGQBR8MCpklM z2oQ== 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=HFKUfJulu6q+umAnw4J4TJbwj0amsnGJUq4m0+Po+7U=; b=iMCQGNejQ4gDMfIaVQxEnx1z+2ZU7ssbz0OASqdyM07vNEMXunZAkhnuN5HtYNe7cE QO7AHlGg2HbufNX5vU4tp3J6ARO3Iuer7ObAQ0iJiD7z+IHOKBWARV11vxILX5spvLfg 1aa6bUfw9HbrEtR9NOHsu5CzcFO42n5oP7EhJia8A9a/dKgVEkqsogAJBU7Yln+zCaoi baV0DuaSdLdsTeW1GeHkppuOYv15/R8Xf5UgHLmxvjaY4qhe6Md02hztC5YWCZNMlQJB dmOwd4JU0Ampr4LlNCnDVLBGDgQIwz/y6p6f319xfjl4MbjnR1dLtjh1wQZ2XoYUYV38 n2gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=gWHO1eNr; 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 v9si12929627edc.608.2021.05.31.07.23.59; Mon, 31 May 2021 07:24:21 -0700 (PDT) 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=gWHO1eNr; 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 S233991AbhEaOWB (ORCPT + 99 others); Mon, 31 May 2021 10:22:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:55012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231714AbhEaNtE (ORCPT ); Mon, 31 May 2021 09:49:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2FA061424; Mon, 31 May 2021 13:31:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622467884; bh=1dCvVlGuxfmLXgO3Knl11lfZ+HgO81o6Inj7BWyWH6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gWHO1eNrNMSuXCUtOfPX+zZoUHTfNfRXIvex+6/8HxRkJODyZAAZioj3oX+J/sIW4 a5J2C2pDaOsxd20G37bSSG0YHwBslLdaGiajwrJ9vRN+qffW/Jk2x05dQcXSm4QvmS 3hlYi4uLToC4qbrxqZo80Tjy7P3BcOHK9cXfeeeI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wen Gong , Jouni Malinen , Johannes Berg Subject: [PATCH 5.10 035/252] ath10k: drop fragments with multicast DA for SDIO Date: Mon, 31 May 2021 15:11:40 +0200 Message-Id: <20210531130659.175365531@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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: Wen Gong commit 40e7462dad6f3d06efdb17d26539e61ab6e34db1 upstream. Fragmentation is not used with multicast frames. Discard unexpected fragments with multicast DA. This fixes CVE-2020-26145. Tested-on: QCA6174 hw3.2 SDIO WLAN.RMH.4.4.1-00049 Cc: stable@vger.kernel.org Signed-off-by: Wen Gong Signed-off-by: Jouni Malinen Link: https://lore.kernel.org/r/20210511200110.9ca6ca7945a9.I1e18b514590af17c155bda86699bc3a971a8dcf4@changeid Signed-off-by: Johannes Berg Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/ath/ath10k/htt_rx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2617,6 +2617,13 @@ static bool ath10k_htt_rx_proc_rx_frag_i rx_desc = (struct htt_hl_rx_desc *)(skb->data + tot_hdr_len); rx_desc_info = __le32_to_cpu(rx_desc->info); + hdr = (struct ieee80211_hdr *)((u8 *)rx_desc + rx_hl->fw_desc.len); + + if (is_multicast_ether_addr(hdr->addr1)) { + /* Discard the fragment with multicast DA */ + goto err; + } + if (!MS(rx_desc_info, HTT_RX_DESC_HL_INFO_ENCRYPTED)) { spin_unlock_bh(&ar->data_lock); return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, @@ -2624,8 +2631,6 @@ static bool ath10k_htt_rx_proc_rx_frag_i HTT_RX_NON_TKIP_MIC); } - hdr = (struct ieee80211_hdr *)((u8 *)rx_desc + rx_hl->fw_desc.len); - if (ieee80211_has_retry(hdr->frame_control)) goto err;