<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/crypto, branch v4.12.7</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.7</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.12.7'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-08-06T16:21:08Z</updated>
<entry>
<title>crypto: authencesn - Fix digest_null crash</title>
<updated>2017-08-06T16:21:08Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2017-07-17T07:32:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=0cc185f8da6f5a2171a06251c503bfa73ad30326'/>
<id>urn:sha1:0cc185f8da6f5a2171a06251c503bfa73ad30326</id>
<content type='text'>
commit 41cdf7a45389e01991ee31e3301ed83cb3e3f7dc upstream.

When authencesn is used together with digest_null a crash will
occur on the decrypt path.  This is because normally we perform
a special setup to preserve the ESN, but this is skipped if there
is no authentication.  However, on the post-authentication path
it always expects the preservation to be in place, thus causing
a crash when digest_null is used.

This patch fixes this by also skipping the post-processing when
there is no authentication.

Fixes: 104880a6b470 ("crypto: authencesn - Convert to new AEAD...")
Reported-by: Jan Tluka &lt;jtluka@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: rsa-pkcs1pad - use constant time memory comparison for MACs</title>
<updated>2017-07-15T11:09:05Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2017-06-11T21:20:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f85a3c8f00bd687d26e70b0f58df0041aabde601'/>
<id>urn:sha1:f85a3c8f00bd687d26e70b0f58df0041aabde601</id>
<content type='text'>
commit fec17cb2231733174e039ad9054fa16bb358e2ec upstream.

Otherwise, we enable all sorts of forgeries via timing attack.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Suggested-by: Stephan Müller &lt;smueller@chronox.de&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: linux-crypto@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto: drbg - Fixes panic in wait_for_completion call</title>
<updated>2017-07-12T14:55:26Z</updated>
<author>
<name>Stephan Mueller</name>
<email>smueller@chronox.de</email>
</author>
<published>2017-05-26T10:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=ead4cb80dbe1e24b8372dd3faa5211adfaa832f9'/>
<id>urn:sha1:ead4cb80dbe1e24b8372dd3faa5211adfaa832f9</id>
<content type='text'>
commit b61929c654f2e725644935737c4c1ea9c741e2f8 upstream.

Initialise ctr_completion variable before use.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Harsh Jain &lt;harshjain.prof@gmail.com&gt;
Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>crypto : asymmetric_keys : verify_pefile:zero memory content before freeing</title>
<updated>2017-06-09T03:29:50Z</updated>
<author>
<name>Loganaden Velvindron</name>
<email>logan@hackers.mu</email>
</author>
<published>2017-06-08T13:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=da7798a7b6714cf35ea6084ad6b1fe0497566cf2'/>
<id>urn:sha1:da7798a7b6714cf35ea6084ad6b1fe0497566cf2</id>
<content type='text'>
Signed-off-by: Loganaden Velvindron &lt;logan@hackers.mu&gt;
Signed-off-by: Yasir Auleear &lt;yasirmx@hackers.mu&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>X.509: Fix error code in x509_cert_parse()</title>
<updated>2017-06-09T03:29:45Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-06-08T13:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4e880168e9ffb1cdbdb72b3b48ab0324b30c2d62'/>
<id>urn:sha1:4e880168e9ffb1cdbdb72b3b48ab0324b30c2d62</id>
<content type='text'>
We forgot to set the error code on this path so it could result in
returning NULL which leads to a NULL dereference.

Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>crypto: gcm - wait for crypto op not signal safe</title>
<updated>2017-05-23T04:45:11Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2017-05-18T13:29:25Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f3ad587070d6bd961ab942b3fd7a85d00dfc934b'/>
<id>urn:sha1:f3ad587070d6bd961ab942b3fd7a85d00dfc934b</id>
<content type='text'>
crypto_gcm_setkey() was using wait_for_completion_interruptible() to
wait for completion of async crypto op but if a signal occurs it
may return before DMA ops of HW crypto provider finish, thus
corrupting the data buffer that is kfree'ed in this case.

Resolve this by using wait_for_completion() instead.

Reported-by: Eric Biggers &lt;ebiggers3@gmail.com&gt;
Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - wait for crypto op not signal safe</title>
<updated>2017-05-23T04:45:11Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2017-05-18T13:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=a5dfefb1c3f3db81662556393fd9283511e08430'/>
<id>urn:sha1:a5dfefb1c3f3db81662556393fd9283511e08430</id>
<content type='text'>
drbg_kcapi_sym_ctr() was using wait_for_completion_interruptible() to
wait for completion of async crypto op but if a signal occurs it
may return before DMA ops of HW crypto provider finish, thus
corrupting the output buffer.

Resolve this by using wait_for_completion() instead.

Reported-by: Eric Biggers &lt;ebiggers3@gmail.com&gt;
Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: asymmetric_keys - handle EBUSY due to backlog correctly</title>
<updated>2017-05-23T04:45:10Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
<email>gilad@benyossef.com</email>
</author>
<published>2017-05-18T13:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e68368aed56324e2e38d4f6b044bb8cf82077fc2'/>
<id>urn:sha1:e68368aed56324e2e38d4f6b044bb8cf82077fc2</id>
<content type='text'>
public_key_verify_signature() was passing the CRYPTO_TFM_REQ_MAY_BACKLOG
flag to akcipher_request_set_callback() but was not handling correctly
the case where a -EBUSY error could be returned from the call to
crypto_akcipher_verify() if backlog was used, possibly casuing
data corruption due to use-after-free of buffers.

Resolve this by handling -EBUSY correctly.

Signed-off-by: Gilad Ben-Yossef &lt;gilad@benyossef.com&gt;
CC: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Add missing API setkey checks</title>
<updated>2017-05-18T05:04:05Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2017-05-09T19:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9933e113c2e87a9f46a40fde8dafbf801dca1ab9'/>
<id>urn:sha1:9933e113c2e87a9f46a40fde8dafbf801dca1ab9</id>
<content type='text'>
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion.  This patch restores them.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng &lt;sploving1@gmail.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>treewide: use kv[mz]alloc* rather than opencoded variants</title>
<updated>2017-05-09T00:15:13Z</updated>
<author>
<name>Michal Hocko</name>
<email>mhocko@suse.com</email>
</author>
<published>2017-05-08T22:57:27Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=752ade68cbd81d0321dfecc188f655a945551b25'/>
<id>urn:sha1:752ade68cbd81d0321dfecc188f655a945551b25</id>
<content type='text'>
There are many code paths opencoding kvmalloc.  Let's use the helper
instead.  The main difference to kvmalloc is that those users are
usually not considering all the aspects of the memory allocator.  E.g.
allocation requests &lt;= 32kB (with 4kB pages) are basically never failing
and invoke OOM killer to satisfy the allocation.  This sounds too
disruptive for something that has a reasonable fallback - the vmalloc.
On the other hand those requests might fallback to vmalloc even when the
memory allocator would succeed after several more reclaim/compaction
attempts previously.  There is no guarantee something like that happens
though.

This patch converts many of those places to kv[mz]alloc* helpers because
they are more conservative.

Link: http://lkml.kernel.org/r/20170306103327.2766-2-mhocko@kernel.org
Signed-off-by: Michal Hocko &lt;mhocko@suse.com&gt;
Reviewed-by: Boris Ostrovsky &lt;boris.ostrovsky@oracle.com&gt; # Xen bits
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Acked-by: Vlastimil Babka &lt;vbabka@suse.cz&gt;
Acked-by: Andreas Dilger &lt;andreas.dilger@intel.com&gt; # Lustre
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt; # KVM/s390
Acked-by: Dan Williams &lt;dan.j.williams@intel.com&gt; # nvdim
Acked-by: David Sterba &lt;dsterba@suse.com&gt; # btrfs
Acked-by: Ilya Dryomov &lt;idryomov@gmail.com&gt; # Ceph
Acked-by: Tariq Toukan &lt;tariqt@mellanox.com&gt; # mlx4
Acked-by: Leon Romanovsky &lt;leonro@mellanox.com&gt; # mlx5
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Anton Vorontsov &lt;anton@enomsg.org&gt;
Cc: Colin Cross &lt;ccross@android.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: "Rafael J. Wysocki" &lt;rjw@rjwysocki.net&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Cc: Kent Overstreet &lt;kent.overstreet@gmail.com&gt;
Cc: Santosh Raspatur &lt;santosh@chelsio.com&gt;
Cc: Hariprasad S &lt;hariprasad@chelsio.com&gt;
Cc: Yishai Hadas &lt;yishaih@mellanox.com&gt;
Cc: Oleg Drokin &lt;oleg.drokin@intel.com&gt;
Cc: "Yan, Zheng" &lt;zyan@redhat.com&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
