linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Alexander Wetzel <alexander.wetzel@web.de>
Cc: "Peer, Ilan" <ilan.peer@intel.com>,
	Emmanuel Grumbach <egrumbach@gmail.com>, Jouni Malinen <j@w1.fi>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: mac80211 drops packet with old IV after rekeying
Date: Mon, 18 May 2015 23:55:57 +0200	[thread overview]
Message-ID: <1431986157.10489.12.camel@sipsolutions.net> (raw)
In-Reply-To: <555A41EA.4090905@web.de>

On Mon, 2015-05-18 at 21:47 +0200, Alexander Wetzel wrote:

> For my understanding that has already be done. And at least for me it
> looks like we have hard evidence for that fact.
[...]
> The Key information used to decrypt the packets is added in the same
> section as the key index, if you have problems finding it.

[building a new wireshark was awkward ... between their git being really
slow and the build needing to be completely deleted first ...]

I agree with you - what you can see in the capture, assuming the TK/PMK
display is correct, is that

packet 11: PN 0x11F2B, old key
packet 15: PN 0x11F40, old key 
packet 19: PN 0x11F2C, new key

Note how packet 15, since it's VO priority, goes out far before packet
19, although packet 19 got the sequence number immediately after packet
11.

So... I guess we can, for now, go back to my earlier email and look at
the transmitter problem after all. I still think the receiver has a
similar issue though.

To be honest though, I'm not sure how to really solve this. Without
multi index capability, the spec doesn't really support PTK rekeying
well. With it, this is clearly no problem, but that would depend on more
code and driver support etc. and perhaps can't even be done with all
drivers/devices.

The first idea here would be to stop using HW crypto for TX while
changing the key, but I think at least ath10k wouldn't support that, not
sure what would happen though? Either way, it'd need a TX path flush, so
I guess it doesn't really make a difference.

So really, I guess what we need to do - and this will suck for
performance - is to stop queues and flush the TX path while the old key
is still programmed into the device, reinstall the key, and only then
restart transmission...

johannes


  reply	other threads:[~2015-05-18 21:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-15  6:48 mac80211 drops packet with old IV after rekeying Emmanuel Grumbach
2015-05-15  7:25 ` Johannes Berg
2015-05-15  7:52   ` Emmanuel Grumbach
2015-05-15 18:35     ` Johannes Berg
2015-05-16 18:18       ` Emmanuel Grumbach
2015-05-16 19:57         ` Johannes Berg
2015-05-17 16:05           ` Jouni Malinen
2015-05-17 18:23             ` Emmanuel Grumbach
2015-05-17 19:25               ` Johannes Berg
2015-05-17 19:49                 ` Emmanuel Grumbach
2015-05-17 20:05                   ` Johannes Berg
2015-05-17 20:13                     ` Emmanuel Grumbach
2015-05-17 20:22                       ` Johannes Berg
2015-05-18  6:14                         ` Peer, Ilan
2015-05-18  8:03                           ` Janusz Dziedzic
2015-05-18 14:40                             ` Ben Greear
2015-05-18 15:02                           ` Johannes Berg
2015-05-18 19:34                             ` Emmanuel Grumbach
2015-05-18 19:47                             ` Alexander Wetzel
2015-05-18 21:55                               ` Johannes Berg [this message]
2015-05-20 20:55                                 ` mac80211 drops packet with old IV after rekeying - workaround patch for CCMP Alexander Wetzel
2015-05-21  7:11                                   ` Johannes Berg
2015-05-17 19:14             ` mac80211 drops packet with old IV after rekeying Johannes Berg

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=1431986157.10489.12.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=alexander.wetzel@web.de \
    --cc=egrumbach@gmail.com \
    --cc=ilan.peer@intel.com \
    --cc=j@w1.fi \
    --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).