All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
To: Joe Perches <joe@perches.com>
Cc: <kvalo@qca.qualcomm.com>, <linux-wireless@vger.kernel.org>,
	<ath6kl-devel@qualcomm.com>,
	Subramania Sharma <sharmat@qca.qualcomm.com>
Subject: Re: [PATCH V2] ath6kl: Fix 4-way handshake failure in AP and P2P GO mode
Date: Tue, 10 Apr 2012 13:20:37 +0530	[thread overview]
Message-ID: <4F83E64D.4010102@qca.qualcomm.com> (raw)
In-Reply-To: <1333987238.2152.5.camel@joe2Laptop>

>> +static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
>> +				u8 *rsn_capab)
>> +{
>> +	const u8 *rsn_ie;
>> +	size_t rsn_ie_len;
>> +	u16 cnt;
>> +
>> +	if (!beacon->tail)
>> +		return -EINVAL;
>> +
>> +	rsn_ie = cfg80211_find_ie(WLAN_EID_RSN, beacon->tail, beacon->tail_len);
>> +	if (!rsn_ie)
>> +		return -EINVAL;
>> +
>> +	rsn_ie_len = *(rsn_ie + 1);
>> +	/* skip element id and length */
>> +	rsn_ie += 2;
>> +
>> +	/* skip version, group cipher */
>> +	if (rsn_ie_len<  6)
>> +		return -EINVAL;
>> +	rsn_ie +=  6;
>> +	rsn_ie_len -= 6;
>> +
>> +	/* skip pairwise cipher suite */
>> +	if (rsn_ie_len<  2)
>> +		return -EINVAL;
>> +	cnt = *((u16 *) rsn_ie);
>
> Any endian or alignment issues?

Indeed this can pretty much result in unaligned memory access.
I'll fix that. Thanks for pointing this out.
>
>> +	rsn_ie += (2 + cnt * 4);
>> +	rsn_ie_len -= (2 + cnt * 4);
>> +
>> +	/* skip akm suite */
>> +	if (rsn_ie_len<  2)
>> +		return -EINVAL;
>> +	cnt = *((u16 *) rsn_ie);

This too.

Vasanth

  reply	other threads:[~2012-04-10  7:50 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <\>
2011-05-19  1:24 ` [PATCH] Remove unused PROC_CHANGE_PENALTY constant Stephen Boyd
2011-07-15  5:26 ` [PATCH 0/1] linux-yocto/meta: update SRCREVs Bruce Ashfield
2011-07-15  5:26   ` [PATCH 1/1] linux-yocto/meta-yocto: update SRCREVS Bruce Ashfield
2011-07-20 14:51     ` Richard Purdie
2012-04-09 15:21 ` [PATCH V2] ath6kl: Fix 4-way handshake failure in AP and P2P GO mode Vasanthakumar Thiagarajan
2012-04-09 15:34   ` Kalle Valo
2012-04-09 16:00   ` Joe Perches
2012-04-10  7:50     ` Vasanthakumar Thiagarajan [this message]
2014-02-12  7:10 ` [PATCH v2] can: xilinx CAN controller support Kedareswara rao Appana
2014-02-12  7:10   ` Kedareswara rao Appana
2014-02-12  7:10   ` Kedareswara rao Appana
2014-02-13 19:20   ` Marc Kleine-Budde
2014-02-13 19:20     ` Marc Kleine-Budde
2014-02-14  8:55     ` Michal Simek
2014-02-14  8:55       ` Michal Simek
2014-02-14  9:04       ` Marc Kleine-Budde
2014-02-14  9:04         ` Marc Kleine-Budde
2014-02-14  9:13         ` Michal Simek
2014-02-14  9:13           ` Michal Simek
2014-02-14  9:16           ` Marc Kleine-Budde
2014-02-14  9:16             ` Marc Kleine-Budde
     [not found]     ` <52FD1B16.6020600-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-02-14  9:36       ` Appana Durga Kedareswara Rao
2014-02-14  9:36         ` Appana Durga Kedareswara Rao
2014-02-14  9:36         ` Appana Durga Kedareswara Rao
2014-02-14  9:59         ` Marc Kleine-Budde
2014-02-14  9:59           ` Marc Kleine-Budde

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=4F83E64D.4010102@qca.qualcomm.com \
    --to=vthiagar@qca.qualcomm.com \
    --cc=ath6kl-devel@qualcomm.com \
    --cc=joe@perches.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sharmat@qca.qualcomm.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.