Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Antonio Quartulli <antonio@open-mesh.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] GTK/PTK problem - key.c magic-bitshift
Date: Sun, 17 Nov 2013 12:08:02 +0100	[thread overview]
Message-ID: <20131117110802.GD1381@neomailbox.net> (raw)

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 

             reply	other threads:[~2013-11-17 11:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-17 11:08 Antonio Quartulli [this message]
2013-11-18 21:29 ` [ath9k-devel] GTK/PTK problem - key.c magic-bitshift 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

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=20131117110802.GD1381@neomailbox.net \
    --to=antonio@open-mesh.com \
    --cc=ath9k-devel@lists.ath9k.org \
    /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