* [PATCH] ath6kl: Fix possible unaligned memory access in ath6kl_get_rsn_capab()
@ 2012-04-10 8:05 Vasanthakumar Thiagarajan
2012-04-12 7:35 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Vasanthakumar Thiagarajan @ 2012-04-10 8:05 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, ath6kl-devel
alignment is not taken care in accessing pairwise cipher and AKM suite
count which are parsed from rsn ie. Fix this alignment issue.
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index fb73196..707c299 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -2546,14 +2546,14 @@ static int ath6kl_get_rsn_capab(struct cfg80211_beacon_data *beacon,
/* skip pairwise cipher suite */
if (rsn_ie_len < 2)
return -EINVAL;
- cnt = *((u16 *) rsn_ie);
+ cnt = get_unaligned_le16(rsn_ie);
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);
+ cnt = get_unaligned_le16(rsn_ie);
rsn_ie += (2 + cnt * 4);
rsn_ie_len -= (2 + cnt * 4);
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ath6kl: Fix possible unaligned memory access in ath6kl_get_rsn_capab()
2012-04-10 8:05 [PATCH] ath6kl: Fix possible unaligned memory access in ath6kl_get_rsn_capab() Vasanthakumar Thiagarajan
@ 2012-04-12 7:35 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2012-04-12 7:35 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan; +Cc: linux-wireless, ath6kl-devel
On 04/10/2012 11:05 AM, Vasanthakumar Thiagarajan wrote:
> alignment is not taken care in accessing pairwise cipher and AKM suite
> count which are parsed from rsn ie. Fix this alignment issue.
>
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Thanks, applied.
Kalle
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-12 7:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-10 8:05 [PATCH] ath6kl: Fix possible unaligned memory access in ath6kl_get_rsn_capab() Vasanthakumar Thiagarajan
2012-04-12 7:35 ` Kalle Valo
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.