linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>,
	linux-wireless@vger.kernel.org
Cc: Jouni Malinen <j@w1.fi>
Subject: Re: [PATCH] mac80211: ignore SA Query Requests with unknown payload data
Date: Tue, 14 Aug 2018 13:16:16 +0200	[thread overview]
Message-ID: <1534245376.3547.20.camel@sipsolutions.net> (raw)
In-Reply-To: <1534245118.3547.18.camel@sipsolutions.net> (sfid-20180814_131303_339421_811029D4)

On Tue, 2018-08-14 at 13:11 +0200, Johannes Berg wrote:
> On Tue, 2018-08-07 at 00:48 +0200, Mathy Vanhoef wrote:
> > When operating in station mode, ignore SA Query Request frames that
> > contain extra payload data. The kernel doesn't know how to handle these
> > frames. Instead, give userspace a chance to handle these frames.
> > 
> > For example, with Operating Channel Validation, SA Query Requests may
> > now contain an extra Operating Channel Information (OCI) element as
> > payload data. The kernel should ignore these frames, since it does not
> > know how to properly handle them. Instead, let userspace process these
> > frames.
> > 
> > Signed-off-by: Mathy Vanhoef <Mathy.Vanhoef@cs.kuleuven.be>
> > ---
> > For background on Operating Channel Validation, see:
> > https://mentor.ieee.org/802.11/dcn/17/11-17-1807-12-000m-defense-against-multi-channel-mitm-attacks-via-operating-channel-validation.docx
> > 
> > A corresponding patchset was also recently submitted to Hostap, see "Add
> > support for Operating Channel Validation (OCV)".
> 
> In a perfect world, this seems fine. However, what if wpa_s doesn't
> implement this (yet)? In that case, wouldn't it be better (or really
> required) to still respond to the SA query request in the kernel?
> 
> Since you change wpa_s to subscribe to the relevant action frame:
> 
> > +       /* SA Query Request */
> > +       if (nl80211_register_action_frame(bss, (u8 *) "\x08\x00", 2) < 0)
> > +               ret = -1;
> 
> we could change the logic to be
> 
> if (!frame_includes_OCV || !cfg80211_rx_mgmt(...))
> 	respond_in_kernel();
> 

An easier alternative might be to push ieee80211_process_sa_query_req()
to after ieee80211_rx_h_userspace_mgmt() so it won't see the frames if
userspace claimed them, but I'm not sure how that works in AP mode where
hostapd claims all frames - though I guess these aren't relevant in AP
mode?

johannes

  reply	other threads:[~2018-08-14 14:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 22:48 [PATCH] mac80211: ignore SA Query Requests with unknown payload data Mathy Vanhoef
2018-08-14 11:11 ` Johannes Berg
2018-08-14 11:16   ` Johannes Berg [this message]
2018-08-14 11:17     ` Johannes Berg
2018-08-15  4:54       ` Mathy Vanhoef
2018-08-15  9:16         ` 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=1534245376.3547.20.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=Mathy.Vanhoef@cs.kuleuven.be \
    --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).