<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/crypto, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/crypto?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/crypto?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-24T18:05:18Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2013-07-24T18:05:18Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-24T18:05:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b48a97be8e6c2afdba2f3b61fd88c3c7743fbd73'/>
<id>urn:sha1:b48a97be8e6c2afdba2f3b61fd88c3c7743fbd73</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This push fixes a memory corruption issue in caam, as well as
  reverting the new optimised crct10dif implementation as it breaks boot
  on initrd systems.

  Hopefully crct10dif will be reinstated once the supporting code is
  added so that it doesn't break boot"

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  Revert "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework"
  crypto: caam - Fixed the memory out of bound overwrite issue
</content>
</entry>
<entry>
<title>Revert "crypto: crct10dif - Wrap crc_t10dif function all to use crypto transform framework"</title>
<updated>2013-07-24T07:04:16Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2013-07-24T07:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e70308ec0e4bff344fcfdf160de40e1150552c5f'/>
<id>urn:sha1:e70308ec0e4bff344fcfdf160de40e1150552c5f</id>
<content type='text'>
This reverts commits
    67822649d7305caf3dd50ed46c27b99c94eff996
    39761214eefc6b070f29402aa1165f24d789b3f7
    0b95a7f85718adcbba36407ef88bba0a7379ed03
    31d939625a9a20b1badd2d4e6bf6fd39fa523405
    2d31e518a42828df7877bca23a958627d60408bc

Unfortunately this change broke boot on some systems that used an
initrd which does not include the newly created crct10dif modules.
As these modules are required by sd_mod under certain configurations
this is a serious problem.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: add lz4 Cryptographic API</title>
<updated>2013-07-09T17:33:30Z</updated>
<author>
<name>Chanho Min</name>
<email>chanho.min@lge.com</email>
</author>
<published>2013-07-08T23:01:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0ea8530dcf762526459b29ac713a623b51fd691f'/>
<id>urn:sha1:0ea8530dcf762526459b29ac713a623b51fd691f</id>
<content type='text'>
Add support for lz4 and lz4hc compression algorithm using the lib/lz4/*
codebase.

[akpm@linux-foundation.org: fix warnings]
Signed-off-by: Chanho Min &lt;chanho.min@lge.com&gt;
Cc: "Darrick J. Wong" &lt;djwong@us.ibm.com&gt;
Cc: Bob Pearson &lt;rpearson@systemfabricworks.com&gt;
Cc: Richard Weinberger &lt;richard@nod.at&gt;
Cc: Herbert Xu &lt;herbert@gondor.hengli.com.au&gt;
Cc: Yann Collet &lt;yann.collet.73@gmail.com&gt;
Cc: Kyungsik Lee &lt;kyungsik.lee@lge.com&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>Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2013-07-05T19:12:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-05T19:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2c311075db578f1433d9b303698491bfa21279a'/>
<id>urn:sha1:b2c311075db578f1433d9b303698491bfa21279a</id>
<content type='text'>
Pull crypto update from Herbert Xu:
 - Do not idle omap device between crypto operations in one session.
 - Added sha224/sha384 shims for SSSE3.
 - More optimisations for camellia-aesni-avx2.
 - Removed defunct blowfish/twofish AVX2 implementations.
 - Added unaligned buffer self-tests.
 - Added PCLMULQDQ optimisation for CRCT10DIF.
 - Added support for Freescale's DCP co-processor
 - Misc fixes.

* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (44 commits)
  crypto: testmgr - test hash implementations with unaligned buffers
  crypto: testmgr - test AEADs with unaligned buffers
  crypto: testmgr - test skciphers with unaligned buffers
  crypto: testmgr - check that entries in alg_test_descs are in correct order
  Revert "crypto: twofish - add AVX2/x86_64 assembler implementation of twofish cipher"
  Revert "crypto: blowfish - add AVX2/x86_64 implementation of blowfish cipher"
  crypto: camellia-aesni-avx2 - tune assembly code for more performance
  hwrng: bcm2835 - fix MODULE_LICENSE tag
  hwrng: nomadik - use clk_prepare_enable()
  crypto: picoxcell - replace strict_strtoul() with kstrtoul()
  crypto: dcp - Staticize local symbols
  crypto: dcp - Use NULL instead of 0
  crypto: dcp - Use devm_* APIs
  crypto: dcp - Remove redundant platform_set_drvdata()
  hwrng: use platform_{get,set}_drvdata()
  crypto: omap-aes - Don't idle/start AES device between Encrypt operations
  crypto: crct10dif - Use PTR_RET
  crypto: ux500 - Cocci spatch "resource_size.spatch"
  crypto: sha256_ssse3 - add sha224 support
  crypto: sha512_ssse3 - add sha384 support
  ...
</content>
</entry>
<entry>
<title>drivers/dma: remove unused support for MEMSET operations</title>
<updated>2013-07-03T23:07:42Z</updated>
<author>
<name>Bartlomiej Zolnierkiewicz</name>
<email>b.zolnierkie@samsung.com</email>
</author>
<published>2013-07-03T22:05:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=48a9db462d99494583dad829969616ac90a8df4e'/>
<id>urn:sha1:48a9db462d99494583dad829969616ac90a8df4e</id>
<content type='text'>
There have never been any real users of MEMSET operations since they
have been introduced in January 2007 by commit 7405f74badf4 ("dmaengine:
refactor dmaengine around dma_async_tx_descriptor").  Therefore remove
support for them for now, it can be always brought back when needed.

[sebastian.hesselbarth@gmail.com: fix drivers/dma/mv_xor]
Signed-off-by: Bartlomiej Zolnierkiewicz &lt;b.zolnierkie@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
Signed-off-by: Sebastian Hesselbarth &lt;sebastian.hesselbarth@gmail.com&gt;
Cc: Vinod Koul &lt;vinod.koul@intel.com&gt;
Acked-by: Dan Williams &lt;djbw@fb.com&gt;
Cc: Tomasz Figa &lt;t.figa@samsung.com&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Olof Johansson &lt;olof@lixom.net&gt;
Cc: Kevin Hilman &lt;khilman@linaro.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>drivers: avoid format strings in names passed to alloc_workqueue()</title>
<updated>2013-07-03T23:07:41Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-07-03T22:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8537548c924db3c44afde7646b6e220c7beb79d'/>
<id>urn:sha1:d8537548c924db3c44afde7646b6e220c7beb79d</id>
<content type='text'>
For the workqueue creation interfaces that do not expect format strings,
make sure they cannot accidently be parsed that way.  Additionally, clean
up calls made with a single parameter that would be handled as a format
string.  Many callers are passing potentially dynamic string content, so
use "%s" in those cases to avoid any potential accidents.

Signed-off-by: Kees Cook &lt;keescook@chromium.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: sanitize argument for format string</title>
<updated>2013-07-03T23:07:25Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2013-07-03T22:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c8fca1d92e14859159a82b8a380d220139b7344'/>
<id>urn:sha1:1c8fca1d92e14859159a82b8a380d220139b7344</id>
<content type='text'>
The template lookup interface does not provide a way to use format
strings, so make sure that the interface cannot be abused accidentally.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Cc: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: &lt;stable@vger.kernel.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: algboss - Hold ref count on larval</title>
<updated>2013-06-25T11:15:17Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2013-06-25T11:15:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=939e17799619e31331d2433041196529515a86a6'/>
<id>urn:sha1:939e17799619e31331d2433041196529515a86a6</id>
<content type='text'>
On Thu, Jun 20, 2013 at 10:00:21AM +0200, Daniel Borkmann wrote:
&gt; After having fixed a NULL pointer dereference in SCTP 1abd165e ("net:
&gt; sctp: fix NULL pointer dereference in socket destruction"), I ran into
&gt; the following NULL pointer dereference in the crypto subsystem with
&gt; the same reproducer, easily hit each time:
&gt; 
&gt; BUG: unable to handle kernel NULL pointer dereference at (null)
&gt; IP: [&lt;ffffffff81070321&gt;] __wake_up_common+0x31/0x90
&gt; PGD 0
&gt; Oops: 0000 [#1] SMP
&gt; Modules linked in: padlock_sha(F-) sha256_generic(F) sctp(F) libcrc32c(F) [..]
&gt; CPU: 6 PID: 3326 Comm: cryptomgr_probe Tainted: GF            3.10.0-rc5+ #1
&gt; Hardware name: Dell Inc. PowerEdge T410/0H19HD, BIOS 1.6.3 02/01/2011
&gt; task: ffff88007b6cf4e0 ti: ffff88007b7cc000 task.ti: ffff88007b7cc000
&gt; RIP: 0010:[&lt;ffffffff81070321&gt;]  [&lt;ffffffff81070321&gt;] __wake_up_common+0x31/0x90
&gt; RSP: 0018:ffff88007b7cde08  EFLAGS: 00010082
&gt; RAX: ffffffffffffffe8 RBX: ffff88003756c130 RCX: 0000000000000000
&gt; RDX: 0000000000000000 RSI: 0000000000000003 RDI: ffff88003756c130
&gt; RBP: ffff88007b7cde48 R08: 0000000000000000 R09: ffff88012b173200
&gt; R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000282
&gt; R13: ffff88003756c138 R14: 0000000000000000 R15: 0000000000000000
&gt; FS:  0000000000000000(0000) GS:ffff88012fc60000(0000) knlGS:0000000000000000
&gt; CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
&gt; CR2: 0000000000000000 CR3: 0000000001a0b000 CR4: 00000000000007e0
&gt; DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
&gt; Stack:
&gt;  ffff88007b7cde28 0000000300000000 ffff88007b7cde28 ffff88003756c130
&gt;  0000000000000282 ffff88003756c128 ffffffff81227670 0000000000000000
&gt;  ffff88007b7cde78 ffffffff810722b7 ffff88007cdcf000 ffffffff81a90540
&gt; Call Trace:
&gt;  [&lt;ffffffff81227670&gt;] ? crypto_alloc_pcomp+0x20/0x20
&gt;  [&lt;ffffffff810722b7&gt;] complete_all+0x47/0x60
&gt;  [&lt;ffffffff81227708&gt;] cryptomgr_probe+0x98/0xc0
&gt;  [&lt;ffffffff81227670&gt;] ? crypto_alloc_pcomp+0x20/0x20
&gt;  [&lt;ffffffff8106760e&gt;] kthread+0xce/0xe0
&gt;  [&lt;ffffffff81067540&gt;] ? kthread_freezable_should_stop+0x70/0x70
&gt;  [&lt;ffffffff815450dc&gt;] ret_from_fork+0x7c/0xb0
&gt;  [&lt;ffffffff81067540&gt;] ? kthread_freezable_should_stop+0x70/0x70
&gt; Code: 41 56 41 55 41 54 53 48 83 ec 18 66 66 66 66 90 89 75 cc 89 55 c8
&gt;       4c 8d 6f 08 48 8b 57 08 41 89 cf 4d 89 c6 48 8d 42 e
&gt; RIP  [&lt;ffffffff81070321&gt;] __wake_up_common+0x31/0x90
&gt;  RSP &lt;ffff88007b7cde08&gt;
&gt; CR2: 0000000000000000
&gt; ---[ end trace b495b19270a4d37e ]---
&gt; 
&gt; My assumption is that the following is happening: the minimal SCTP
&gt; tool runs under ``echo 1 &gt; /proc/sys/net/sctp/auth_enable'', hence
&gt; it's making use of crypto_alloc_hash() via sctp_auth_init_hmacs().
&gt; It forks itself, heavily allocates, binds, listens and waits in
&gt; accept on sctp sockets, and then randomly kills some of them (no
&gt; need for an actual client in this case to hit this). Then, again,
&gt; allocating, binding, etc, and then killing child processes.
&gt; 
&gt; The problem that might be happening here is that cryptomgr requests
&gt; the module to probe/load through cryptomgr_schedule_probe(), but
&gt; before the thread handler cryptomgr_probe() returns, we return from
&gt; the wait_for_completion_interruptible() function and probably already
&gt; have cleared up larval, thus we run into a NULL pointer dereference
&gt; when in cryptomgr_probe() complete_all() is being called.
&gt; 
&gt; If we wait with wait_for_completion() instead, this panic will not
&gt; occur anymore. This is valid, because in case a signal is pending,
&gt; cryptomgr_probe() returns from probing anyway with properly calling
&gt; complete_all().

The use of wait_for_completion_interruptible is intentional so that
we don't lock up the thread if a bug causes us to never wake up.

This bug is caused by the helper thread using the larval without
holding a reference count on it.  If the helper thread completes
after the original thread requesting for help has gone away and
destroyed the larval, then we get the crash above.

So the fix is to hold a reference count on the larval.

Cc: &lt;stable@vger.kernel.org&gt; # 3.6+
Reported-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Tested-by: Daniel Borkmann &lt;dborkman@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: testmgr - test hash implementations with unaligned buffers</title>
<updated>2013-06-21T06:44:31Z</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2013-06-13T14:37:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=da5ffe11342a0ecf2cce7000a9392c9ca959e9c8'/>
<id>urn:sha1:da5ffe11342a0ecf2cce7000a9392c9ca959e9c8</id>
<content type='text'>
This patch adds unaligned buffer tests for hashes.

The first new test is with one byte offset and the second test checks if
cra_alignmask for driver is big enough; for example, for testing a case
where cra_alignmask is set to 7, but driver really needs buffers to be
aligned to 16 bytes.

Signed-off-by: Jussi Kivilinna &lt;jussi.kivilinna@iki.fi&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: testmgr - test AEADs with unaligned buffers</title>
<updated>2013-06-21T06:44:30Z</updated>
<author>
<name>Jussi Kivilinna</name>
<email>jussi.kivilinna@iki.fi</email>
</author>
<published>2013-06-13T14:37:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=58dcf5484c0cbaddbba1d3ed074729f5078346bb'/>
<id>urn:sha1:58dcf5484c0cbaddbba1d3ed074729f5078346bb</id>
<content type='text'>
This patch adds unaligned buffer tests for AEADs.

The first new test is with one byte offset and the second test checks if
cra_alignmask for driver is big enough; for example, for testing a case
where cra_alignmask is set to 7, but driver really needs buffers to be
aligned to 16 bytes.

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