<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211/key.c, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-12-07T02:20:05Z</updated>
<entry>
<title>mac80211: don't compare TKIP TX MIC key in reinstall prevention</title>
<updated>2017-12-07T02:20:05Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2017-10-24T19:12:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ffff8defb5b4bc855a55ba160a3efeefb51e55fd'/>
<id>urn:sha1:ffff8defb5b4bc855a55ba160a3efeefb51e55fd</id>
<content type='text'>
[ Upstream commit cfbb0d90a7abb289edc91833d0905931f8805f12 ]

For the reinstall prevention, the code I had added compares the
whole key. It turns out though that iwlwifi firmware doesn't
provide the TKIP TX MIC key as it's not needed in client mode,
and thus the comparison will always return false.

For client mode, thus always zero out the TX MIC key part before
doing the comparison in order to avoid accepting the reinstall
of the key with identical encryption and RX MIC key, but not the
same TX MIC key (since the supplicant provides the real one.)

Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>mac80211: use constant time comparison with keys</title>
<updated>2017-12-07T02:20:05Z</updated>
<author>
<name>Jason A. Donenfeld</name>
</author>
<published>2017-10-17T18:32:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=db6a015e846a747a4b8a96daad1d9ff59454c0cc'/>
<id>urn:sha1:db6a015e846a747a4b8a96daad1d9ff59454c0cc</id>
<content type='text'>
[ Upstream commit 2bdd713b92a9cade239d3c7d15205a09f556624d ]

Otherwise we risk leaking information via timing side channel.

Fixes: fdf7cb4185b6 ("mac80211: accept key reinstall without changing anything")
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>mac80211: accept key reinstall without changing anything</title>
<updated>2017-12-07T02:20:04Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2017-09-05T12:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=003aa22c9619b49efe950aca3aebd1235a04940d'/>
<id>urn:sha1:003aa22c9619b49efe950aca3aebd1235a04940d</id>
<content type='text'>
[ Upstream commit fdf7cb4185b60c68e1a75e61691c4afdc15dea0e ]

When a key is reinstalled we can reset the replay counters
etc. which can lead to nonce reuse and/or replay detection
being impossible, breaking security properties, as described
in the "KRACK attacks".

In particular, CVE-2017-13080 applies to GTK rekeying that
happened in firmware while the host is in D3, with the second
part of the attack being done after the host wakes up. In
this case, the wpa_supplicant mitigation isn't sufficient
since wpa_supplicant doesn't know the GTK material.

In case this happens, simply silently accept the new key
coming from userspace but don't take any action on it since
it's the same key; this keeps the PN replay counters intact.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
</content>
</entry>
<entry>
<title>mac80211: fix locking in update_vlan_tailroom_need_count()</title>
<updated>2015-07-10T16:49:29Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2015-06-17T11:54:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80b856db9f9e1dbaf20a24020f8ade95c14f7477'/>
<id>urn:sha1:80b856db9f9e1dbaf20a24020f8ade95c14f7477</id>
<content type='text'>
[ Upstream commit 51f458d9612177f69c2e2c437034ae15f93078e7 ]

Unfortunately, Michal's change to fix AP_VLAN crypto tailroom
caused a locking issue that was reported by lockdep, but only
in a few cases - the issue was a classic ABBA deadlock caused
by taking the mtx after the key_mtx, where normally they're
taken the other way around.

As the key mutex protects the field in question (I'm adding a
few annotations to make that clear) only the iteration needs
to be protected, but we can also iterate the interface list
with just RCU protection while holding the key mutex.

Fixes: f9dca80b98ca ("mac80211: fix AP_VLAN crypto tailroom calculation")
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mac80211: fix AP_VLAN crypto tailroom calculation</title>
<updated>2015-05-20T13:10:11Z</updated>
<author>
<name>Michal Kazior</name>
</author>
<published>2015-05-13T09:16:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f9dca80b98caac8b4bfb43a2edf1e9f877ccf322'/>
<id>urn:sha1:f9dca80b98caac8b4bfb43a2edf1e9f877ccf322</id>
<content type='text'>
Some splats I was seeing:

 (a) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wep.c:102 ieee80211_wep_add_iv
 (b) WARNING: CPU: 1 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:73 ieee80211_tx_h_michael_mic_add
 (c) WARNING: CPU: 3 PID: 0 at /devel/src/linux/net/mac80211/wpa.c:433 ieee80211_crypto_ccmp_encrypt

I've seen (a) and (b) with ath9k hw crypto and (c)
with ath9k sw crypto. All of them were related to
insufficient skb tailroom and I was able to
trigger these with ping6 program.

AP_VLANs may inherit crypto keys from parent AP.
This wasn't considered and yielded problems in
some setups resulting in inability to transmit
data because mac80211 wouldn't resize skbs when
necessary and subsequently drop some packets due
to insufficient tailroom.

For efficiency purposes don't inspect both AP_VLAN
and AP sdata looking for tailroom counter. Instead
update AP_VLAN tailroom counters whenever their
master AP tailroom counter changes.

Signed-off-by: Michal Kazior &lt;michal.kazior@tieto.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80211: Get IV len from key conf and not cipher scheme</title>
<updated>2015-03-17T11:34:26Z</updated>
<author>
<name>Cedric Izoard</name>
</author>
<published>2015-03-17T10:47:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7ef38e0ccca25050efed56a35df2e1e93c0b469'/>
<id>urn:sha1:c7ef38e0ccca25050efed56a35df2e1e93c0b469</id>
<content type='text'>
When a key is installed using a cipher scheme, set a new
internal key flag (KEY_FLAG_CIPHER_SCHEME) on it, to allow
distinguishing such keys more easily.

In particular, use this flag on the TX path instead of
testing the sta-&gt;cipher_scheme pointer, as the station is
NULL for broad-/multicast message, and use the key's iv_len
instead of the cipher scheme information.

Signed-off-by: Cedric Izoard &lt;cedric.izoard@ceva-dsp.com&gt;
[add missing documentation, rewrite commit message]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80111: Add BIP-GMAC-128 and BIP-GMAC-256 ciphers</title>
<updated>2015-01-27T10:10:13Z</updated>
<author>
<name>Jouni Malinen</name>
</author>
<published>2015-01-24T17:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ade538bf39b1ee53418528fdacd36b8e65621b9'/>
<id>urn:sha1:8ade538bf39b1ee53418528fdacd36b8e65621b9</id>
<content type='text'>
This allows mac80211 to configure BIP-GMAC-128 and BIP-GMAC-256 to the
driver and also use software-implementation within mac80211 when the
driver does not support this with hardware accelaration.

Signed-off-by: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80111: Add BIP-CMAC-256 cipher</title>
<updated>2015-01-27T10:09:13Z</updated>
<author>
<name>Jouni Malinen</name>
</author>
<published>2015-01-24T17:52:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=56c52da2d554f081e8fce58ecbcf6a40c605b95b'/>
<id>urn:sha1:56c52da2d554f081e8fce58ecbcf6a40c605b95b</id>
<content type='text'>
This allows mac80211 to configure BIP-CMAC-256 to the driver and also
use software-implementation within mac80211 when the driver does not
support this with hardware accelaration.

Signed-off-by: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80111: Add CCMP-256 cipher</title>
<updated>2015-01-27T10:07:35Z</updated>
<author>
<name>Jouni Malinen</name>
</author>
<published>2015-01-24T17:52:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b2ba0db1c820d04d5143452d70012cd44d7b578'/>
<id>urn:sha1:2b2ba0db1c820d04d5143452d70012cd44d7b578</id>
<content type='text'>
This allows mac80211 to configure CCMP-256 to the driver and also use
software-implementation within mac80211 when the driver does not support
this with hardware accelaration.

Signed-off-by: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
[squash ccmp256 -&gt; mic_len argument change]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
<entry>
<title>mac80111: Add GCMP and GCMP-256 ciphers</title>
<updated>2015-01-27T10:06:09Z</updated>
<author>
<name>Jouni Malinen</name>
</author>
<published>2015-01-24T17:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=00b9cfa3ff38401bd70c34b250ca13e5ea347b4a'/>
<id>urn:sha1:00b9cfa3ff38401bd70c34b250ca13e5ea347b4a</id>
<content type='text'>
This allows mac80211 to configure GCMP and GCMP-256 to the driver and
also use software-implementation within mac80211 when the driver does
not support this with hardware accelaration.

Signed-off-by: Jouni Malinen &lt;jouni@qca.qualcomm.com&gt;
[remove a spurious newline]
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
</content>
</entry>
</feed>
