<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/crypto/blkcipher.c, branch v3.12.10</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/crypto/blkcipher.c?h=v3.12.10</id>
<link rel='self' href='https://git.amat.us/linux/atom/crypto/blkcipher.c?h=v3.12.10'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-02-19T12:27:03Z</updated>
<entry>
<title>crypto: user - fix info leaks in report API</title>
<updated>2013-02-19T12:27:03Z</updated>
<author>
<name>Mathias Krause</name>
<email>minipli@googlemail.com</email>
</author>
<published>2013-02-05T17:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6'/>
<id>urn:sha1:9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6</id>
<content type='text'>
Three errors resulting in kernel memory disclosure:

1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of the API. Switch to strncpy() to fix this.

2/ crypto_report_one() does not initialize all field of struct
crypto_user_alg. Fix this to fix the heap info leak.

3/ For the module name we should copy only as many bytes as
module_name() returns -- not as much as the destination buffer could
hold. But the current code does not and therefore copies random data
from behind the end of the module name, as the module name is always
shorter than CRYPTO_MAX_ALG_NAME.

Also switch to use strncpy() to copy the algorithm's name and
driver_name. They are strings, after all.

Signed-off-by: Mathias Krause &lt;minipli@googlemail.com&gt;
Cc: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: use ERR_CAST</title>
<updated>2013-02-04T13:16:53Z</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2013-01-22T11:29:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e8afe35c36fa0e928e038667709966a71a9cfa5'/>
<id>urn:sha1:3e8afe35c36fa0e928e038667709966a71a9cfa5</id>
<content type='text'>
Replace PTR_ERR followed by ERR_PTR by ERR_CAST, to be more concise.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
@@
expression err,x;
@@
-       err = PTR_ERR(x);
        if (IS_ERR(x))
-                return ERR_PTR(err);
+                return ERR_CAST(x);
// &lt;/smpl&gt;

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: Stop using NLA_PUT*().</title>
<updated>2012-04-02T08:33:42Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2012-04-02T00:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6662df33f85b87bb29f2ecad124efe7bb2c08e05'/>
<id>urn:sha1:6662df33f85b87bb29f2ecad124efe7bb2c08e05</id>
<content type='text'>
These macros contain a hidden goto, and are thus extremely error
prone and make code hard to audit.

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>crypto: remove the second argument of k[un]map_atomic()</title>
<updated>2012-03-20T13:48:16Z</updated>
<author>
<name>Cong Wang</name>
<email>amwang@redhat.com</email>
</author>
<published>2011-11-25T15:14:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f0dfc0b0b7f3d961da8a98bcfccc8be9107a848b'/>
<id>urn:sha1:f0dfc0b0b7f3d961da8a98bcfccc8be9107a848b</id>
<content type='text'>
Signed-off-by: Cong Wang &lt;amwang@redhat.com&gt;
</content>
</entry>
<entry>
<title>crypto: algapi - Fix build problem with NET disabled</title>
<updated>2011-11-10T22:57:06Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2011-11-03T12:46:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3acc84739dd5d746840f881ad4d60bd2a428f1dd'/>
<id>urn:sha1:3acc84739dd5d746840f881ad4d60bd2a428f1dd</id>
<content type='text'>
The report functions use NLA_PUT so we need to ensure that NET
is enabled.

Reported-by: Luis Henriques &lt;henrix@camandro.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: Add userspace report for blkcipher type algorithms</title>
<updated>2011-10-21T12:24:05Z</updated>
<author>
<name>Steffen Klassert</name>
<email>steffen.klassert@secunet.com</email>
</author>
<published>2011-09-27T05:41:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=50496a1fab6c6a90b77da4b247321a88e632bd46'/>
<id>urn:sha1:50496a1fab6c6a90b77da4b247321a88e632bd46</id>
<content type='text'>
Signed-off-by: Steffen Klassert &lt;steffen.klassert@secunet.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>mm: strictly nested kmap_atomic()</title>
<updated>2010-10-26T23:52:08Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2010-10-26T21:21:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=61ecdb801ef2cd28e32442383106d7837d76deac'/>
<id>urn:sha1:61ecdb801ef2cd28e32442383106d7837d76deac</id>
<content type='text'>
Ensure kmap_atomic() usage is strictly nested

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Reviewed-by: Rik van Riel &lt;riel@redhat.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Cc: David Howells &lt;dhowells@redhat.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: "H. Peter Anvin" &lt;hpa@zytor.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Russell King &lt;rmk@arm.linux.org.uk&gt;
Cc: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: David Miller &lt;davem@davemloft.net&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&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>
<entry>
<title>crypto: skcipher - Avoid infinite loop when cipher fails selftest</title>
<updated>2009-02-18T13:20:06Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-02-18T12:33:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b170a137f467ea951c3f256da1b911545acf3ffd'/>
<id>urn:sha1:b170a137f467ea951c3f256da1b911545acf3ffd</id>
<content type='text'>
When an skcipher constructed through crypto_givcipher_default fails
its selftest, we'll loop forever trying to construct new skcipher
objects but failing because it already exists.

The crux of the issue is that once a givcipher fails the selftest,
we'll ignore it on the next run through crypto_skcipher_lookup and
attempt to construct a new givcipher.

We should instead return an error to the caller if we find a
givcipher that has failed the test.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: blkcipher - Fix WARN_ON handling in walk_done</title>
<updated>2009-01-27T06:11:13Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2009-01-16T03:40:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=bac1b5c4696f217afeac5b29874a337bc39da717'/>
<id>urn:sha1:bac1b5c4696f217afeac5b29874a337bc39da717</id>
<content type='text'>
When we get left-over bits from a slow walk, it means that the
underlying cipher has gone troppo.  However, as we're handling
that case we should ensure that the caller terminates the walk.

This patch does this by setting walk-&gt;nbytes to zero.

Reported-by: Roel Kluin &lt;roel.kluin@gmail.com&gt;
Reported-by: Huang Ying &lt;ying.huang@intel.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: skcipher - Move IV generators into their own modules</title>
<updated>2008-08-29T05:50:00Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2008-08-17T08:04:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5be5e667a9a5d8d5553e009e67bc692d95e5916a'/>
<id>urn:sha1:5be5e667a9a5d8d5553e009e67bc692d95e5916a</id>
<content type='text'>
This patch moves the default IV generators into their own modules
in order to break a dependency loop between cryptomgr, rng, and
blkcipher.

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