All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masashi Honma <masashi.honma@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org, j@w1.fi, me@bobcopeland.com
Subject: Re: [PATCH v2] nl80211: Receive correct value for NL80211_MESHCONF_HT_OPMODE command
Date: Thu, 4 Aug 2016 09:37:21 +0900	[thread overview]
Message-ID: <d193404d-8a77-8a8e-10eb-f46bd4008384@gmail.com> (raw)
In-Reply-To: <1470207156.2638.9.camel@sipsolutions.net>

On 2016年08月03日 15:52, Johannes Berg wrote:
> I'm actually half thinking that we could just remove all restrictions
> on this and allow any u16 value of this field, and rely on
> wpa_supplicant to do the right thing... Then we don't have to update
> this if we ever want to do something new either.
>
> What do you think? What does the validation actually help us with?

I think checking the bits here is better than allowing all values.

Because if we allow any values for ht_opmode, kernel developer needs to 
care about any bit combination working well. For example, kernel 
developer should test there is not any unexpected thing when non-GF and 
non-HT both flags are enabled. If we check invalid bit at the entrance,
we don't need to care anymore about invalid combination. In any case we
need to care about combination. Then, it is more easy to do it near the
entrance.

And I think checking only in wpa_supplicant is not good idea. Because 
other user application can access to the kernel API. If invalid flag
combination causes kernel panic, it could be kernel vulnerability.

Masashi Honma.

  reply	other threads:[~2016-08-04  0:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 11:25 [PATCH] nl80211: Expand max value of NL80211_MESHCONF_HT_OPMODE command Masashi Honma
2016-08-02  7:43 ` Johannes Berg
2016-08-02 11:40   ` Masashi Honma
2016-08-02 11:41 ` [PATCH v2] nl80211: Receive correct value for " Masashi Honma
2016-08-03  1:07   ` Masashi Honma
2016-08-03  6:52     ` Johannes Berg
2016-08-04  0:37       ` Masashi Honma [this message]
2016-08-04  5:50         ` Johannes Berg
2016-08-03  1:07 ` [PATCH v3] " Masashi Honma
2016-08-05 12:15   ` 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=d193404d-8a77-8a8e-10eb-f46bd4008384@gmail.com \
    --to=masashi.honma@gmail.com \
    --cc=j@w1.fi \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=me@bobcopeland.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.