<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/crypto/drbg.c, branch linux-4.11.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.11.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-07-12T14:53:58Z</updated>
<entry>
<title>crypto: drbg - Fixes panic in wait_for_completion call</title>
<updated>2017-07-12T14:53:58Z</updated>
<author>
<name>Stephan Mueller</name>
</author>
<published>2017-05-26T10:11:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=471475402812f28d109ac5dc479bd38a168fffdb'/>
<id>urn:sha1:471475402812f28d109ac5dc479bd38a168fffdb</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: drbg - wait for crypto op not signal safe</title>
<updated>2017-06-14T13:07:38Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2017-05-18T13:29:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1286652e80cc3c847ca23aac4a91ecd232095ff9'/>
<id>urn:sha1:1286652e80cc3c847ca23aac4a91ecd232095ff9</id>
<content type='text'>
commit a5dfefb1c3f3db81662556393fd9283511e08430 upstream.

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;
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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-11-30T11:53:12Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2016-11-30T11:53:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=479d014de544a0916037fcf77e873f815545cd5e'/>
<id>urn:sha1:479d014de544a0916037fcf77e873f815545cd5e</id>
<content type='text'>
Merge the crypto tree to pull in chelsio chcr fix.
</content>
</entry>
<entry>
<title>crypto: drbg - prevent invalid SG mappings</title>
<updated>2016-11-30T11:46:44Z</updated>
<author>
<name>Stephan Mueller</name>
</author>
<published>2016-11-29T08:45:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5102981212454998d549273ff9847f19e97a1794'/>
<id>urn:sha1:5102981212454998d549273ff9847f19e97a1794</id>
<content type='text'>
When using SGs, only heap memory (memory that is valid as per
virt_addr_valid) is allowed to be referenced. The CTR DRBG used to
reference the caller-provided memory directly in an SG. In case the
caller provided stack memory pointers, the SG mapping is not considered
to be valid. In some cases, this would even cause a paging fault.

The change adds a new scratch buffer that is used unconditionally to
catch the cases where the caller-provided buffer is not suitable for
use in an SG. The crypto operation of the CTR DRBG produces its output
with that scratch buffer and finally copies the content of the
scratch buffer to the caller's buffer.

The scratch buffer is allocated during allocation time of the CTR DRBG
as its access is protected with the DRBG mutex.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - advance output buffer pointer</title>
<updated>2016-11-21T14:50:24Z</updated>
<author>
<name>Stephan Mueller</name>
</author>
<published>2016-11-18T11:27:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ff4c191d1123ea1ba610dbc25e93568d9e7756c'/>
<id>urn:sha1:8ff4c191d1123ea1ba610dbc25e93568d9e7756c</id>
<content type='text'>
The CTR DRBG segments the number of random bytes to be generated into
128 byte blocks. The current code misses the advancement of the output
buffer pointer when the requestor asks for more than 128 bytes of data.
In this case, the next 128 byte block of random numbers is copied to
the beginning of the output buffer again. This implies that only the
first 128 bytes of the output buffer would ever be filled.

The patch adds the advancement of the buffer pointer to fill the entire
buffer.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - fix error return code</title>
<updated>2016-08-24T13:04:49Z</updated>
<author>
<name>Wei Yongjun</name>
</author>
<published>2016-08-20T15:06:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a45d7e343251e5396d353c1ae6ab1cebead9766'/>
<id>urn:sha1:1a45d7e343251e5396d353c1ae6ab1cebead9766</id>
<content type='text'>
Fix to return a negative error code from the error handling
case instead of 0.

Signed-off-by: Wei Yongjun &lt;weiyj.lk@gmail.com&gt;
Acked-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - do not call drbg_instantiate in healt test</title>
<updated>2016-08-16T09:20:19Z</updated>
<author>
<name>Stephan Mueller</name>
</author>
<published>2016-08-09T19:02:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d89a67134fcc7e863530624fe5a88dde0159cfb8'/>
<id>urn:sha1:d89a67134fcc7e863530624fe5a88dde0159cfb8</id>
<content type='text'>
When calling the DRBG health test in FIPS mode, the Jitter RNG is not
yet present in the kernel crypto API which will cause the instantiation
to fail and thus the health test to fail.

As the health tests cover the enforcement of various thresholds, invoke
the functions that are supposed to enforce the thresholds directly.

This patch also saves precious seed.

Reported-by: Tapas Sarangi &lt;TSarangi@trustwave.com&gt;
Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - fix an error code in drbg_init_sym_kernel()</title>
<updated>2016-06-20T11:25:03Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2016-06-17T09:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01ac94580ac2f7076394212ca963da7409016796'/>
<id>urn:sha1:01ac94580ac2f7076394212ca963da7409016796</id>
<content type='text'>
We accidentally return PTR_ERR(NULL) which is success but we should
return -ENOMEM.

Fixes: 355912852115 ('crypto: drbg - use CTR AES instead of ECB AES')
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Acked-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - fix semicolon.cocci warnings</title>
<updated>2016-06-20T11:24:36Z</updated>
<author>
<name>Wu Fengguang</name>
</author>
<published>2016-06-15T11:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88f1d316b9d0a213a9590fb5da6a72c0ec7012de'/>
<id>urn:sha1:88f1d316b9d0a213a9590fb5da6a72c0ec7012de</id>
<content type='text'>
crypto/drbg.c:1637:39-40: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

CC: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Acked-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: drbg - avoid duplicate maintenance of key</title>
<updated>2016-06-15T09:07:54Z</updated>
<author>
<name>Stephan Mueller</name>
</author>
<published>2016-06-14T05:36:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=103eb3f7bfb4fce0e299afbf50fef8ffa8d9d38c'/>
<id>urn:sha1:103eb3f7bfb4fce0e299afbf50fef8ffa8d9d38c</id>
<content type='text'>
The TFM object maintains the key for the CTR DRBG.

Signed-off-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
