ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: Baochen Qiang <quic_bqiang@quicinc.com>,
	"open list:MEDIATEK MT76 WIRELESS LAN DRIVER"
	<linux-wireless@vger.kernel.org>
Cc: "ath11k@lists.infradead.org" <ath11k@lists.infradead.org>
Subject: Re: ath11k/WCN6855 neighbor report request made immediately after connection gets no response (with MFP)
Date: Wed, 25 Sep 2024 04:33:05 -0700	[thread overview]
Message-ID: <0d1dab88-66a0-48c1-bdbe-777d07c3132e@gmail.com> (raw)
In-Reply-To: <fd90d471-503b-4f58-ae11-bae2afab08c7@quicinc.com>

[-- Attachment #1: Type: text/plain, Size: 2298 bytes --]

Hi Baochen,

On 9/25/24 3:07 AM, Baochen Qiang wrote:
>
> On 9/19/2024 8:21 PM, James Prestwood wrote:
>> Hi,
>>
>> I noticed an issue when we started putting ath11k clients on a WPA3 network which seems to be related to the fact that management frame protection is enabled (works fine on WPA2 no MFP). Immediately after an initial association a neighbor report request goes out and we get no response from the AP. After getting a PCAP in one case we noticed the neighbor report request went out unencrypted, though still had the CCMP IV parameter. The content of the request was the unencrypted request, and something like 15 bytes of 0x00 padding. I will say, this initial PCAP was made through the AP vendor so perhaps it automatically added the right keys to decrypt the frame, this could be a red herring. I tried on my home network and it was hit or miss, sometimes I would get a response but sometimes I wouldn't, but I did see the frame was always encrypted in my home network case though when adding the PMK directly in wireshark I couldn't decrypt it, where on other hardware like iwlwifi I could.
> is your home network also WPA3?
>
> and how did you get the PMK? is it generated by IWD and printed as debug message?

I actually had to modify IWD to print out the PMK after it derived it. 
WPA3 makes this a huge pain since the PMK differs between SAE exchanges.

I've attached an IWD diff that prints out the PMK, which can be added to 
wireshark if that helps.

>
>> Some time after the connection neighbor reports work fine. I'm not sure of a time frame or delay required that gets them working, but it makes me suspect that ath11k doesn't have the keys fully added in the firmware before userspace gets signaled as "connected". Running the same scenario on ath10k or iwlwifi has no issues. This neighbor report request immediately after connecting is IWD's default behavior, so its relatively easy to test by just restarting IWD.
> I captured a WPA3 SAE PCAP too, but only can find some unencrypted ADDBA req/resp frames. for those encrypted action frames I am still struggling to decrypt them
>
>> Since the neighbor reports work fine after some time its not really a critical issue but I wanted to bring it up just in case.
>>
>> Thanks,
>>
>> James
>>

[-- Attachment #2: print-pmk.patch --]
[-- Type: text/x-patch, Size: 909 bytes --]

diff --git a/src/sae.c b/src/sae.c
index 97c0af05..f2cebe09 100644
--- a/src/sae.c
+++ b/src/sae.c
@@ -857,6 +857,20 @@ static bool sae_verify_confirm(struct sae_sm *sm, const uint8_t *frame)
        return true;
 }
 
+#include <stdio.h>
+
+static void print_pmk(uint8_t *pmk)
+{
+       unsigned int i;
+
+       printf("PMK: ");
+
+       for (i = 0; i < 32; i++)
+               printf("%02x", pmk[i]);
+
+       printf("\n");
+}
+
 static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from,
                                const uint8_t *frame, size_t len)
 {
@@ -880,6 +894,8 @@ static int sae_process_confirm(struct sae_sm *sm, const uint8_t *from,
        handshake_state_set_pmkid(sm->handshake, sm->pmkid);
        handshake_state_set_pmk(sm->handshake, sm->pmk, 32);
 
+       print_pmk(sm->pmk);
+
        sm->state = SAE_STATE_ACCEPTED;
 
        if (!sm->handshake->authenticator) {


  reply	other threads:[~2024-09-25 11:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19 12:21 ath11k/WCN6855 neighbor report request made immediately after connection gets no response (with MFP) James Prestwood
2024-09-25 10:07 ` Baochen Qiang
2024-09-25 11:33   ` James Prestwood [this message]
2024-09-26  3:16     ` Baochen Qiang
2024-09-26 12:31       ` James Prestwood
2024-09-27  5:59         ` Baochen Qiang
2024-09-27 11:53           ` James Prestwood
2024-09-29  2:14             ` Baochen Qiang
2024-10-01 13:06               ` James Prestwood
2024-09-29  2:16             ` Baochen Qiang
2024-10-01 13:08               ` James Prestwood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d1dab88-66a0-48c1-bdbe-777d07c3132e@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=quic_bqiang@quicinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox