linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Wetzel <alexander@wetzel-home.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC PATCH v3 07/12] iwlwifi: Extended Key ID support (NATIVE)
Date: Sun, 14 Apr 2019 18:12:58 +0200	[thread overview]
Message-ID: <45ae97d6-3357-64ac-0a40-9ae3ea4a8ed2@wetzel-home.de> (raw)
In-Reply-To: <0de9d60ffef574b34e9a76ad2cea68fab49aac0f.camel@sipsolutions.net>

> I'll take a look, but a trace-cmd recording would be more interesting
> than the monitor interface, as it also tells us when what key was
> installed etc.

I've just uploaded better captures also including traces to the same 
location. Everything relevant for this mail is in the folder
iwlwifi-debug here:
https://www.awhome.eu/index.php/s/AJJXBLsZmzHdxpX

The old traces have been moved to top dir "old", if you still are 
interested in them, but I think the new ones should be better.

1) Both AP and the STA are now running wt-2019-04-10 *without* the not 
merged patches from the Extended Key ID series. (I've only enabled 
Ext_Key_ID for mvm and dvm on top and added some printk's. The patches 
for that are also available via the link above but really boring...

2) the files with the same prefix (in the format HH:MM) show the same 
communication.
The AP files are of course from the AP, STA from the client station and 
Sniff from my Netgear 7800 used as a OTA sniffer. With the AP literally 
sitting on top of it.
The "Sniff" files can be decoded with the WPA Password "ExtKeyTestAP".

My "Hack" patch to wireshark to allow it to decode keyID 1 is also 
uploaded. (The hack just allows decoding of keyID 1 at the price of no 
longer decoding frames encrypted with gtk keyid 1.)

3) the AP is using a AC 3168NGW and the STA a AC 8265. The two devices 
are roughly 2m apart with a direct line of sight on a channel with next 
to no other traffic on it. (You see what's there in the Sniff captures, 
these are all totally unfiltered.)

4) I also tried running a trace on the STA. But I could not reproduce 
the issue when a trace was running on the STA. (That's probably 
coincidence, through, I just gave it three tries and the first without a 
trace on the STA worked.)

5) The files in the "broken" folder are showing the issue and the ones 
in "working" (seem) to be ok at a first glance.

I can run more tests and also try catch the problem with a STA trace, 
too, if you want. But that may not be necessary:

It looks like we only have a problem when we get frames with the "new" 
keyID and then again some with the "old" keyID. Of course we also could 
have multiple problems, too... But in that case I would say let's first 
look at this one.
The problematic frames are encrypted with the correct "old" key, 
according to wireshark.

But on the STA they are scrambled and therefor probably have been 
decrypted with the - in this case - wrong new key.

And as it happens there is also a really good looking first suspect why 
this may have happened:
According to the STA captures the broken frames came in one A-MPDU which 
started with keyID 1 and then "appended" the older keyID 0 frames at the 
end. (The OTA sniffer seems to be miss the A-MPDU details, see the STA 
capture...)

Now it really looks like the mvm cards are trusting the standard and 
decode all MPDUs within one A-MPDU with the same key while at the same 
time allow mixing different keyIDs in a-MPDU.

The so far mostly theoretical question how far mac80211 should support 
the driver (e.g. key ID border signal) or if we want to let the 
drivers/card handle that would become much more pressing...

Ideally the card/firmware would be able to detect that and start a new 
A-MPDU. But for my understanding the driver could also set A-MPDU to 
only one frame, forcing the firmware to flush all A-MPDUs under 
construction and then set it back to the normal value. (Or that is how 
I've planned to test that in that way with your tips in the past and 
what's documented of the mvm/dvm firmware API.)


> Please do review the privacy notes there at the end of the page if you
> do this, you should probably send the files to me/us directly rather
> than post publicly. They do contain the keys of your (test) network to
> some extent - at least of course the PTK(s)/GTK(s), but usually also the
> KEK/KCK.

Thanks for the reminder.
I'll definitely will remember the option, I was not aware that there was 
a more private way:-)

So far I can accept the risk - as I understand it - or even some short 
term intruders in my test network.

For my understanding  the previous captures (without the PSK in the 
mail) only allows brute forcing the PSK due to the 4-way handshakes.
Providing a valid handshake allows anyone to crack the PSK, without the 
challenge to capture it himself.

But risk of providing eapol frames of your network changed last year, 
the handshake is no longer required to crack the password. Anyone able 
to talk to the AP can get equivalent information by a simple query. So I 
assume sharing captures with the eapol handshakes is not impacting the 
security of my (test) Wlan in any relevant way. So I'm only giving 
everyone a small peak in my normally encrypted wlan, correct?

Here a link to the vulnerability discovered last year:
https://blog.avira.com/cracking-your-wpa2-wi-fi-password-just-became-easier/

But I've changed the PSK already for my test Wlan again from the ones 
used in the provided captures. The "real" Wlan is using EAP-TLS, the one 
I had the ptk rekey freezes some years ago:-)

Alexander

  reply	other threads:[~2019-04-14 16:13 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-10 21:06 [RFC PATCH v3 00/12] Draft for Extended Key ID support Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 01/12] mac80211: Optimize tailroom_needed update checks Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 02/12] nl80211/cfg80211: Extended Key ID support Alexander Wetzel
2019-02-15 10:52   ` Johannes Berg
2019-02-17 19:19     ` Alexander Wetzel
2019-02-22  8:30       ` Johannes Berg
2019-02-22 23:04         ` Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 03/12] mac80211: IEEE 802.11 " Alexander Wetzel
2019-02-15 11:06   ` Johannes Berg
2019-02-19 20:58     ` Alexander Wetzel
2019-02-21 19:47       ` Alexander Wetzel
2019-02-22  8:41         ` Johannes Berg
2019-02-23 21:02           ` Alexander Wetzel
2019-03-01 20:43           ` Alexander Wetzel
2019-02-23 17:26         ` Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 04/12] mac80211: Compatibility " Alexander Wetzel
2019-02-15 11:09   ` Johannes Berg
2019-02-21 20:07     ` Alexander Wetzel
2019-02-22  8:53       ` Johannes Berg
2019-02-23 22:50         ` Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 05/12] mac80211: Mark A-MPDU keyid borders for drivers Alexander Wetzel
2019-02-15 11:50   ` Johannes Berg
2019-02-21 21:20     ` Alexander Wetzel
2019-02-22  8:51       ` Johannes Berg
2019-02-23 21:47         ` Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 06/12] mac80211_hwsim: Ext Key ID support (NATIVE) Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 07/12] iwlwifi: Extended " Alexander Wetzel
2019-02-15 11:52   ` Johannes Berg
2019-02-22 20:50     ` Alexander Wetzel
2019-02-22 21:06       ` Johannes Berg
2019-02-24 13:04         ` Alexander Wetzel
2019-04-08 20:10           ` Johannes Berg
2019-04-10 20:46             ` Alexander Wetzel
2019-04-12  9:51               ` Johannes Berg
2019-04-14 16:12                 ` Alexander Wetzel [this message]
2019-04-15  8:44                   ` Johannes Berg
2019-04-15 20:09                     ` Alexander Wetzel
2019-04-16  9:31                       ` Johannes Berg
2019-04-16 18:28                         ` Alexander Wetzel
2019-04-16 19:11                           ` Johannes Berg
2019-04-16 21:32                             ` Alexander Wetzel
2019-04-12 11:19               ` Johannes Berg
2019-02-10 21:06 ` [RFC PATCH v3 08/12] iwlwifi: dvm - EXT_KEY_ID A-MPDU API update Alexander Wetzel
2019-02-15 11:54   ` Johannes Berg
2019-02-22 21:15     ` Alexander Wetzel
2019-02-22 21:20       ` Johannes Berg
2019-02-10 21:06 ` [RFC PATCH v3 09/12] ath: Basic Extended Key ID support (COMPAT+NATIVE) Alexander Wetzel
2019-02-13 11:05   ` Kalle Valo
2019-02-13 23:15     ` Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 10/12] ath5k: ath_key_config() API compatibility update Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 11/12] ath9k: Extended Key ID support (COMPAT) Alexander Wetzel
2019-02-10 21:06 ` [RFC PATCH v3 12/12] ath9k: EXT_KEY_ID A-MPDU API update Alexander Wetzel
2019-02-15 11:10 ` [RFC PATCH v3 00/12] Draft for Extended Key ID support Johannes Berg
2019-02-21 20:44   ` Alexander Wetzel

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=45ae97d6-3357-64ac-0a40-9ae3ea4a8ed2@wetzel-home.de \
    --to=alexander@wetzel-home.de \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).