All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Alexander Wetzel <alexander.wetzel@web.de>
Cc: linux-wireless@vger.kernel.org, greearb@candelatech.com,
	s.gottschall@dd-wrt.com
Subject: Re: [PATCH v2] mac80211: Fix wlan freezes under load at rekey
Date: Tue, 03 Jul 2018 11:51:24 +0200	[thread overview]
Message-ID: <1530611484.4735.18.camel@sipsolutions.net> (raw)
In-Reply-To: <bb4d75d3-7f90-1b58-9525-3f5a54cd952e@web.de>

On Fri, 2018-06-29 at 23:14 +0200, Alexander Wetzel wrote:

> I was wrong here, this is not an issue. Tkip is simply dropping frames
> when the IV is too small and never verifies the MIC. And since only MIC
> errors can trigger counter measures we are fine as it is...

Err, yes, of course. My bad.

> > > 3) Is what I implemented. We try what we can with the existing API and
> > > any driver not working with that has to be considered buggy.
> > 
> > I don't think we can really do this though. We break - in a potentially
> > security-relevant way - the older drivers. We can't just say that's
> > driver bugs, IMHO.
> 
> We would not break it, only not fix it for all drivers. The current code
> is already leaking cleartext packets for at least ath9k and most likely
> many others when the PTK is rekeyed. The patch would improve that, but
> due to more working rekeys it could leak more packets in specific
> scenarios, I assume...

Yeah, ok, fair point. I don't really know.

> > Obviously if SW crypto is used none of this is a concern, so that's
> > another factor to take into account in this decision logic of whether to
> > disconnect or not?
> 
> I did not check the SW crypto code but I'm pretty sure that indeed works
> with the current code.

Me too.

> I assume the packets will only be decrypted after an RX aggregation is
> completed. That would filter out all packets send with the old key,
> since they simply can't be decrypted any more.

Oh, good point, but that's true - reordering happens before software
decryption.

> Shall we bypass stopping aggregation sessions if we are on SW crypto?
> We'll again lose the benefit that we prevent a broken remote STA to try
> a TX Agg. (I tend to still stop them, but do not have a real opinion
> here...)

I don't really know.

> > IOW - I'd rather get bugs that we now force a disconnect (if anyone even
> > notices), rather than potentially having a bug that causes unencrypted
> > packets to be sent.
> 
> Any suggestions how to trick hostap/wpa_supplicant into dropping the
> connection? For me it looks like we can just report an error on key
> install and expect the wpa_supplicant/hostapd to handle that.

I think easier would be to just disconnect ourselves? At least if we're
in managed mode...

> Will try that for the next version of the patch, with the other
> discussed improvements: If driver is not signalling "PTK0 rekey support"
> we'll simply not accept key installs when we already have a old PTK key
> for the connection.

Since I see you have a new patch - how did that work out? :)

johannes

  reply	other threads:[~2018-07-03  9:51 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-24 10:29 [PATCH] mac80211: Fix wlan freezes under load at rekey Alexander Wetzel
2018-03-24 15:29 ` Ben Greear
2018-03-25 19:45   ` Alexander Wetzel
2018-03-25 21:59     ` Ben Greear
2018-03-26  7:43       ` Sebastian Gottschall
2018-03-26 12:22       ` Sebastian Gottschall
2018-03-26 20:24         ` Alexander Wetzel
2018-03-27 13:03           ` Johannes Berg
2018-03-27 13:13 ` Johannes Berg
2018-04-08 20:31   ` Alexander Wetzel
2018-04-09  7:25     ` Johannes Berg
2018-05-15 10:22       ` [PATCH v2] " Alexander Wetzel
2018-05-15 15:50         ` Johannes Berg
2018-05-15 22:41           ` Alexander Wetzel
2018-05-16  6:56             ` Johannes Berg
2018-06-15 11:33         ` Johannes Berg
2018-06-18 21:03           ` Alexander Wetzel
2018-06-18 21:27             ` Johannes Berg
2018-06-19 20:12               ` Alexander Wetzel
2018-06-29 10:12                 ` Johannes Berg
2018-06-29 21:14                   ` Alexander Wetzel
2018-07-03  9:51                     ` Johannes Berg [this message]
2018-07-03 19:54                       ` Alexander Wetzel
2018-07-04  0:06                         ` Johannes Berg
2018-07-08  8:10                           ` Alexander Wetzel
2018-07-09  7:13                             ` Johannes Berg
2018-07-11 16:59                               ` Alexander Wetzel
2018-07-15  9:10                               ` [PATCH v2] mac80211: Fix wlan freezes/clear text packet leaks " Alexander Wetzel
2018-07-10 21:05                             ` [PATCH v2] mac80211: Fix wlan freezes under load " Denis Kenzior
2018-07-11 17:08                               ` Alexander Wetzel
2018-07-11 19:43                                 ` Denis Kenzior
2018-06-30 21:27                   ` [PATCH v3] mac80211: Fix PTK rekey freezes and cleartext leaks 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=1530611484.4735.18.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=alexander.wetzel@web.de \
    --cc=greearb@candelatech.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.gottschall@dd-wrt.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.