linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jouni Malinen <j@w1.fi>
To: Masashi Honma <masashi.honma@gmail.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2] mac80211: Encrypt "Group addressed privacy" action frames
Date: Tue, 21 Jun 2016 19:42:07 +0300	[thread overview]
Message-ID: <20160621164207.GA7323@w1.fi> (raw)
In-Reply-To: <1466490219-2891-1-git-send-email-masashi.honma@gmail.com>

On Tue, Jun 21, 2016 at 03:23:39PM +0900, Masashi Honma wrote:

> diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
> +static inline bool ieee80211_is_group_privacy_action(struct ieee80211_hdr *hdr)

This is somewhat problematic since no indication of the frame length is
passed in here and we are reading beyond the frame header below.. Maybe
this should use the same style as ieee80211_is_robust_mgmt_frame()
instead, i.e., use skb as the argument and define
_ieee80211_is_group_privacy_action() to take in struct ieee80211_hdr *.

> +	return mgmt->u.action.category == WLAN_CATEGORY_MESH_ACTION ||
> +		mgmt->u.action.category == WLAN_CATEGORY_MULTIHOP_ACTION;

These read the buffer at offset 24, i.e., just after the header. This
should do same as ieee80211_is_robust_mgmt_frame(), i.e., return false
if skb->len < 25.

> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> @@ -608,7 +611,6 @@ ieee80211_tx_h_select_key(struct ieee80211_tx_data *tx)
>  		bool skip_hw = false;
>  
>  		/* TODO: add threshold stuff again */
> -
>  		switch (tx->key->conf.cipher) {
>  		case WLAN_CIPHER_SUITE_WEP40:
>  		case WLAN_CIPHER_SUITE_WEP104:

This looks completely separate item and I don't see why we would even
delete that empty line.. In any case, it should probably not be in this
patch.
 
-- 
Jouni Malinen                                            PGP id EFC895FA

  reply	other threads:[~2016-06-21 16:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15  5:38 [PATCH] mac80211: Encrypt "Group addressed privacy" action frames Masashi Honma
2016-06-18  9:11 ` Jouni Malinen
2016-06-20  0:51   ` Masashi Honma
2016-06-20 21:25     ` Jouni Malinen
2016-06-21  6:16       ` Masashi Honma
2016-06-21 17:01         ` Jouni Malinen
2016-06-21 19:40           ` Johannes Berg
2016-06-22 10:54           ` Masashi Honma
2016-06-22 10:55           ` [PATCH v3] " Masashi Honma
2016-06-29 15:08             ` Masashi Honma
2016-06-29 16:25               ` Johannes Berg
2016-06-29 23:20                 ` Masashi Honma
2016-06-21  6:23       ` [PATCH v2] " Masashi Honma
2016-06-21 16:42         ` Jouni Malinen [this message]
2016-06-22 10:53           ` Masashi Honma

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=20160621164207.GA7323@w1.fi \
    --to=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=masashi.honma@gmail.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 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).