All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] GTK/PTK problem - key.c magic-bitshift
@ 2013-11-17 11:08 Antonio Quartulli
  2013-11-18 21:29 ` Adrian Chadd
  0 siblings, 1 reply; 16+ messages in thread
From: Antonio Quartulli @ 2013-11-17 11:08 UTC (permalink / raw)
  To: ath9k-devel

Hello list,

I am debugging a strange problem which symptom is that the PTK of some station
is messed up right after hostapd has configured a new GTK. This happens both in
WPA2 only and WPA/WPA2 mixed mode. I have no real clue of what is going on and
so, after having given a look at the hostapd code, I am now checking the driver
(Ath9k).

While digging I found a piece of code in key.c which I can't understand.
Here is the snippet:

111                 macLo = get_unaligned_le32(mac);
112                 macHi = get_unaligned_le16(mac + 4);
113                 macLo >>= 1;
114                 macLo |= (macHi & 1) << 31;
115                 macHi >>= 1;

At drivers/net/wireless/ath/key.c:113 there is a right-bitshift operation
executed on macLo. Since macLo is a 4byte variable containing 4 out of 6
bytes of the MAC address passed as argument, it looks to me like the bitshift
is throwing away one bit that we will never recover.

I don't want to claim that this is necessarily connected to the problem I am
experiencing, but I'd like to get a better understanding of this part in order
to continue my research.

However the driver I am using is not the latest one, so if somebody knows
whether this GTK/PTK problem is known and fixed I would be glad if you could
tell me :-)


Thanks a lot for your time.

Regards,


-- 
Antonio Quartulli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
Url : http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20131117/ec3e92b1/attachment.pgp 

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-01-07 15:23 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-17 11:08 [ath9k-devel] GTK/PTK problem - key.c magic-bitshift Antonio Quartulli
2013-11-18 21:29 ` Adrian Chadd
2013-11-18 21:44   ` Antonio Quartulli
2013-11-18 21:51   ` Antonio Quartulli
2013-11-20  8:41     ` Adrian Chadd
2013-11-22  9:18       ` Antonio Quartulli
2013-11-22  9:42         ` Adrian Chadd
2013-11-27  6:48           ` Antonio Quartulli
2013-12-04 13:23           ` [ath9k-devel] Key Cache corruption (was: GTK/PTK problem - key.c magic-bitshift) Antonio Quartulli
2013-12-04 17:08             ` Adrian Chadd
2013-12-09 10:17               ` [ath9k-devel] Key Cache corruption Antonio Quartulli
2013-12-09 19:38                 ` Adrian Chadd
2013-12-12  9:17                   ` Antonio Quartulli
2013-12-13 12:35                     ` Adrian Chadd
2013-12-13 12:55                       ` Antonio Quartulli
2014-01-07 15:23                       ` Antonio Quartulli

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.