Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp560094ybe; Wed, 11 Sep 2019 00:52:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlu4caW3ZraACH8vvvvYP8o1amo/ZtnaIxEAVxWAh8qV5sebyH6gCZBaK1ql9QQEjrWI9r X-Received: by 2002:aa7:da90:: with SMTP id q16mr28109339eds.123.1568188344385; Wed, 11 Sep 2019 00:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568188344; cv=none; d=google.com; s=arc-20160816; b=w2dy2mxv8ND7Kyq/YJQl9Wcxo8xd7K/qp03arq3dRJI2+C2EGITKKkDf7bX4xywnPT R3zw/bKwKHPVQPvFPXdHv6CTVNTGc04ZEhfmE/HnR7i7foFD1WsbLFL0qytJORqVSVOd z64IA7hgQVJNpzKDU9uO9H4GmPbbR5ar0AekSO1W7f72VbrQPrbpRCF14T4OHREypqHI 5rUujnFHfSWX/KyyOujjwOg6Zu7auhx6yXeMumykXTzQ0BPCe83q04WFFwwIAJAY98yz uF/SGMtWJSF4/FSUS9w++hDZTLO2N8dEkL15YI7+0/4/es3PKCfdakTIvvqnaiINr5pG V2fw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=q2x07Wy+m37DTqhRy1mY0t8ez6EgQlwhE4PdMPosQig=; b=waLO7O+hSB5sYBNjrs4DGlvjBVh7orTZYuy/wQUdmCV9DqjZDocgTAUDq2BmrIO0/T omSkk3WkmTbruTxXzdoQvXJQ+XnlDLIEQbR+l0Y5i5BYIm3lqaKRbwKufAN/dUrrsVFh 85H8yXu6xVidLx8OOvRMJR8ZP4xi/bEzjqnOiRCrfdaSbpBZSLz6kvvjbpdjXM6rHeUp 7y5scNlDUGCp/s1pzAabsmy5FNL4idyZloUvr/pkmFIuQOwQ65Ux40z2xPDSBcWW8d3O L63WPmhlkS1+jDJFAM2ZwB2/lIbgf5FUyV7HBcVZrztMd8eK+3FxRg3iNplla+BcjF5D gs6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=QNwDFrZZ; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hb6si10258069ejb.1.2019.09.11.00.51.49; Wed, 11 Sep 2019 00:52:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-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=@broadcom.com header.s=google header.b=QNwDFrZZ; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfIKHuj (ORCPT + 99 others); Wed, 11 Sep 2019 03:50:39 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:36352 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbfIKHuj (ORCPT ); Wed, 11 Sep 2019 03:50:39 -0400 Received: by mail-wr1-f65.google.com with SMTP id y19so23337343wrd.3 for ; Wed, 11 Sep 2019 00:50:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=q2x07Wy+m37DTqhRy1mY0t8ez6EgQlwhE4PdMPosQig=; b=QNwDFrZZWkSAYX7b+oXAmmxh+3FZ9oH6+FddbMq3nUl1DlArefwm3XaSi1qUdgngm4 goTxB/U5yz08qA2JViA7OVLvQxX89Y4DPkJbnb1g+2FMG8l8xF9EzRPnln823FrUrBUZ Nc+Dv8ZnJPlQI1qhc0TpLcG2L7UCUpHcDW2aM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=q2x07Wy+m37DTqhRy1mY0t8ez6EgQlwhE4PdMPosQig=; b=R+Da0a6MwjoYB6N5yVhXUIIPikIMKq4mrjTVmEn9NIFT6mH8UxVokY6tTW096VEJXq gMGn2nYE+AJknW/mLJu/PERktofuwYzSvOp5mf4+j8rFc2d1jmH6mPscGYwsjCS0szTg BM/VsdqdhUVLPUF4JNmQFxoRZIVGcb7t41vzBZoAOwxQQUEPRaXbFXvgORN9pJmB5dE4 spRSOBqawkyrjdY+5loodslPmaEefx1MVA5+Qjprojd2kPL0eeV7J+BocgincOMij7BR s9CPoEQLASCfABmi+YrSDaEgEJs6HoDWxae+4vCjj/nR0Silc0U9d6/EjK+MMY4wFxMS JJDA== X-Gm-Message-State: APjAAAWPDFDUeMLyQFN2MFi09NwUA/QYRZVLFfJiTqY9bAp+go92dQIo YJmGacPJ/okfjb6YEjM/VlzLrw== X-Received: by 2002:a5d:4907:: with SMTP id x7mr30654730wrq.72.1568188237349; Wed, 11 Sep 2019 00:50:37 -0700 (PDT) Received: from [10.230.40.234] ([192.19.215.250]) by smtp.gmail.com with ESMTPSA id l1sm24267771wrb.1.2019.09.11.00.50.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Sep 2019 00:50:36 -0700 (PDT) Subject: Re: [PATCH 04/11] wil6210: fix PTK re-key race To: Kalle Valo , Maya Erez Cc: Ahmad Masri , linux-wireless@vger.kernel.org, wil6210@qti.qualcomm.com References: <1567931575-27984-5-git-send-email-merez@codeaurora.org> <20190910132315.D7AC7602F2@smtp.codeaurora.org> From: Arend Van Spriel Message-ID: Date: Wed, 11 Sep 2019 09:50:34 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20190910132315.D7AC7602F2@smtp.codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 9/10/2019 3:23 PM, Kalle Valo wrote: > Maya Erez wrote: > >> Fix a race between cfg80211 add_key call and transmitting of 4/4 EAP >> packet. In case the transmit is delayed until after the add key takes >> place, message 4/4 will be encrypted with the new key, and the >> receiver side (AP) will drop it due to MIC error. >> >> Wil6210 will monitor and look for the transmitted packet 4/4 eap key. >> In case add_key takes place before the transmission completed, then >> wil6210 will let the FW store the key and wil6210 will notify the FW >> to use the PTK key only after 4/4 eap packet transmission was >> completed. > > This is rather ugly but I guess still ok. Or what do people think? The idea is similar to what we have in brcmfmac although it looks like a lot more code. So there seems precedent for the approach. > But for a proper fix you should look at: > > [PATCH v2] wpa_supplicant: Send EAPoL-Key frames over NL80211 where available > > http://lists.infradead.org/pipermail/hostap/2019-September/040516.html However, I agree that Denis did a better job with this and we should aim to use it. It is on my largish TODO list for brcmfmac. Regards, Arend