<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/key.h, branch linux-3.7.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.7.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2011-07-13T18:49:43Z</updated>
<entry>
<title>mac80211: allow driver to disconnect after resume</title>
<updated>2011-07-13T18:49:43Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-12T10:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=95acac61ba66c4abd40e038dae8c1ed2e176c7b1'/>
<id>urn:sha1:95acac61ba66c4abd40e038dae8c1ed2e176c7b1</id>
<content type='text'>
In WoWLAN, devices may use crypto keys for TX/RX
and could also implement GTK rekeying. If the
driver isn't able to retrieve replay counters and
similar information from the device upon resume,
or if the device isn't responsive due to platform
issues, it isn't safe to keep the connection up
as GTK rekey messages from during the sleep time
could be replayed against it.

The only protection against that is disconnecting
from the AP. Modifying mac80211 to do that while
it is resuming would be very complex and invasive
in the case that the driver requires a reconfig,
so do it after it has resumed completely. In that
case, however, packets might be replayed since it
can then only happen after TX/RX are up again, so
mark keys for interfaces that need to disconnect
as "tainted" and drop all packets that are sent
or received with those keys.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: allow drivers to access key sequence counter</title>
<updated>2011-07-08T15:42:22Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-07T16:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3ea542d3c2862142ae511fac5ce2dfc7419dcc53'/>
<id>urn:sha1:3ea542d3c2862142ae511fac5ce2dfc7419dcc53</id>
<content type='text'>
In order to implement GTK rekeying, the device needs
to be able to encrypt frames with the right PN/IV and
check the PN/IV in RX frames. To be able to tell it
about all those counters, we need to be able to get
them from mac80211, this adds the required API.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: simplify RX PN/IV handling</title>
<updated>2011-07-08T15:42:21Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-07T16:45:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9e26297a56453315ae6829aec609b5a6309af7b4'/>
<id>urn:sha1:9e26297a56453315ae6829aec609b5a6309af7b4</id>
<content type='text'>
The current rx-&gt;queue value is slightly confusing.
It is set to 16 on non-QoS frames, including data,
and then used for sequence number and PN/IV checks.
Until recently, we had a TKIP IV checking bug that
had been introduced in 2008 to fix a seqno issue.
Before that, we always used TID 0 for checking the
PN or IV on non-QoS packets.

Go back to the old status for PN/IV checks using
the TID 0 counter for non-QoS by splitting up the
rx-&gt;queue value into "seqno_idx" and "security_idx"
in order to avoid confusion in the future. They
each have special rules on the value used for non-
QoS data frames.

Since the handling is now unified, also revert the
special TKIP handling from my patch
"mac80211: fix TKIP replay vulnerability".

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: use AES_BLOCK_SIZE</title>
<updated>2011-07-08T15:11:24Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-06T20:02:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0cd20a278e1ef9da9f6a987942794c9d65af8c4d'/>
<id>urn:sha1:0cd20a278e1ef9da9f6a987942794c9d65af8c4d</id>
<content type='text'>
mac80211 has a defnition of AES_BLOCK_SIZE and
multiple definitions of AES_BLOCK_LEN. Remove
them all and use crypto/aes.h.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix CMAC races</title>
<updated>2011-07-08T15:11:20Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-06T20:00:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75396ae6d433b49482e377e6f8dbf1f42ad53f3a'/>
<id>urn:sha1:75396ae6d433b49482e377e6f8dbf1f42ad53f3a</id>
<content type='text'>
Just like TKIP and CCMP, CMAC has the PN race.
It might not actually be possible to hit it now
since there aren't multiple ACs for management
frames, but fix it anyway.

Also move scratch buffers onto the stack.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix CCMP races</title>
<updated>2011-07-08T15:11:19Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-06T19:59:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aba83a0b301c32dbb91c017f33307611e1a1d384'/>
<id>urn:sha1:aba83a0b301c32dbb91c017f33307611e1a1d384</id>
<content type='text'>
Since we can process multiple packets at the
same time for different ACs, but the PN is
allocated from a single counter, we need to
use an atomic value there. Use atomic64_t to
make this cheaper on 64-bit platforms, other
platforms will support this through software
emulation, see lib/atomic64.c.

We also need to use an on-stack scratch buf
so that multiple packets won't corrupt each
others scratch buffers.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix TKIP races, make API easier to use</title>
<updated>2011-07-08T15:11:19Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-07-07T20:28:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=523b02ea23b175dd3e46e3daf1bc9354376640a3'/>
<id>urn:sha1:523b02ea23b175dd3e46e3daf1bc9354376640a3</id>
<content type='text'>
Our current TKIP code races against itself on TX
since we can process multiple packets at the same
time on different ACs, but they all share the TX
context for TKIP. This can lead to bad IVs etc.

Also, the crypto offload helper code just obtains
the P1K/P2K from the cache, and can update it as
well, but there's no guarantee that packets are
really processed in order.

To fix these issues, first introduce a spinlock
that will protect the IV16/IV32 values in the TX
context. This first step makes sure that we don't
assign the same IV multiple times or get confused
in other ways.

Secondly, change the way the P1K cache works. I
add a field "p1k_iv32" that stores the value of
the IV32 when the P1K was last recomputed, and
if different from the last time, then a new P1K
is recomputed. This can cause the P1K computation
to flip back and forth if packets are processed
out of order. All this also happens under the new
spinlock.

Finally, because there are argument differences,
split up the ieee80211_get_tkip_key() API into
ieee80211_get_tkip_p1k() and ieee80211_get_tkip_p2k()
and give them the correct arguments.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: sparse RCU annotations</title>
<updated>2011-05-16T18:10:41Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-05-13T12:15:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=40b275b69ee660274b77fb612b0db31fd282fc3f'/>
<id>urn:sha1:40b275b69ee660274b77fb612b0db31fd282fc3f</id>
<content type='text'>
This adds sparse RCU annotations to most of
mac80211, only the mesh code remains to be
done.

Due the the previous patches, the annotations
are pretty simple. The only thing that this
actually changes is removing the RCU usage of
key-&gt;sta in debugfs since this pointer isn't
actually an RCU-managed pointer (it only has
a single assignment done before the key even
goes live). As that is otherwise harmless, I
decided to make it part of this patch.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: make key locking clearer</title>
<updated>2011-05-12T18:10:53Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2011-05-12T12:31:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c0c36412b2dc6b1e243c7e9115306fe286583b7'/>
<id>urn:sha1:5c0c36412b2dc6b1e243c7e9115306fe286583b7</id>
<content type='text'>
The code in ieee80211_del_key() doesn't acquire the
key_mtx properly when it dereferences the keys. It
turns out that isn't actually necessary since the
key_mtx itself seems to be redundant since all key
manipulations are done under the RTNL, but as long
as we have the key_mtx we should use it the right
way too.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
<entry>
<title>mac80211: remove unused macros</title>
<updated>2011-03-07T18:48:30Z</updated>
<author>
<name>Shan Wei</name>
</author>
<published>2011-03-04T07:14:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d0123a5d635e336dbab21eba62e8dd4eb3e39a0'/>
<id>urn:sha1:2d0123a5d635e336dbab21eba62e8dd4eb3e39a0</id>
<content type='text'>
Compile test only.

Signed-off-by: Shan Wei &lt;shanwei@cn.fujitsu.com&gt;
Signed-off-by: John W. Linville &lt;linville@tuxdriver.com&gt;
</content>
</entry>
</feed>
