<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/crypto/asymmetric_keys, 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-06-14T13:07:37Z</updated>
<entry>
<title>crypto: asymmetric_keys - handle EBUSY due to backlog correctly</title>
<updated>2017-06-14T13:07:37Z</updated>
<author>
<name>Gilad Ben-Yossef</name>
</author>
<published>2017-05-18T13:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e423898fd89fc5c69e61dd7e7ca617f1394516c3'/>
<id>urn:sha1:e423898fd89fc5c69e61dd7e7ca617f1394516c3</id>
<content type='text'>
commit e68368aed56324e2e38d4f6b044bb8cf82077fc2 upstream.

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;
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 branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-12-15T19:41:37Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2016-12-15T19:41:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=19c75bcbe0113cbbf05e4d89e0502a23358bfca9'/>
<id>urn:sha1:19c75bcbe0113cbbf05e4d89e0502a23358bfca9</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - a crash regression in the new skcipher walker

   - incorrect return value in public_key_verify_signature

   - fix for in-place signing in the sign-file utility"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: skcipher - fix crash in virtual walk
  sign-file: Fix inplace signing when src and dst names are both specified
  crypto: asymmetric_keys - set error code on failure
</content>
</entry>
<entry>
<title>crypto: asymmetric_keys - set error code on failure</title>
<updated>2016-12-14T10:33:13Z</updated>
<author>
<name>Pan Bian</name>
</author>
<published>2016-12-13T09:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fbb726302a9ae06b373e04a54ad30eafa288dd10'/>
<id>urn:sha1:fbb726302a9ae06b373e04a54ad30eafa288dd10</id>
<content type='text'>
In function public_key_verify_signature(), returns variable ret on
error paths. When the call to kmalloc() fails, the value of ret is 0,
and it is not set to an errno before returning. This patch fixes the
bug.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188891

Signed-off-by: Pan Bian &lt;bianpan2016@163.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>X.509: Fix double free in x509_cert_parse() [ver #3]</title>
<updated>2016-11-25T01:57:48Z</updated>
<author>
<name>Andrey Ryabinin</name>
</author>
<published>2016-11-24T13:23:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b95fda2c4fcb6d6625963f889247538f247fce0'/>
<id>urn:sha1:2b95fda2c4fcb6d6625963f889247538f247fce0</id>
<content type='text'>
We shouldn't free cert-&gt;pub-&gt;key in x509_cert_parse() because
x509_free_certificate() also does this:
	BUG: Double free or freeing an invalid pointer
	...
	Call Trace:
	 [&lt;ffffffff81896c20&gt;] dump_stack+0x63/0x83
	 [&lt;ffffffff81356571&gt;] kasan_object_err+0x21/0x70
	 [&lt;ffffffff81356ed9&gt;] kasan_report_double_free+0x49/0x60
	 [&lt;ffffffff813561ad&gt;] kasan_slab_free+0x9d/0xc0
	 [&lt;ffffffff81350b7a&gt;] kfree+0x8a/0x1a0
	 [&lt;ffffffff81844fbf&gt;] public_key_free+0x1f/0x30
	 [&lt;ffffffff818455d4&gt;] x509_free_certificate+0x24/0x90
	 [&lt;ffffffff818460bc&gt;] x509_cert_parse+0x2bc/0x300
	 [&lt;ffffffff81846cae&gt;] x509_key_preparse+0x3e/0x330
	 [&lt;ffffffff818444cf&gt;] asymmetric_key_preparse+0x6f/0x100
	 [&lt;ffffffff8178bec0&gt;] key_create_or_update+0x260/0x5f0
	 [&lt;ffffffff8178e6d9&gt;] SyS_add_key+0x199/0x2a0
	 [&lt;ffffffff821d823b&gt;] entry_SYSCALL_64_fastpath+0x1e/0xad
	Object at ffff880110bd1900, in cache kmalloc-512 size: 512
	....
	Freed:
	PID = 2579
	[&lt;ffffffff8104283b&gt;] save_stack_trace+0x1b/0x20
	[&lt;ffffffff813558f6&gt;] save_stack+0x46/0xd0
	[&lt;ffffffff81356183&gt;] kasan_slab_free+0x73/0xc0
	[&lt;ffffffff81350b7a&gt;] kfree+0x8a/0x1a0
	[&lt;ffffffff818460a3&gt;] x509_cert_parse+0x2a3/0x300
	[&lt;ffffffff81846cae&gt;] x509_key_preparse+0x3e/0x330
	[&lt;ffffffff818444cf&gt;] asymmetric_key_preparse+0x6f/0x100
	[&lt;ffffffff8178bec0&gt;] key_create_or_update+0x260/0x5f0
	[&lt;ffffffff8178e6d9&gt;] SyS_add_key+0x199/0x2a0
	[&lt;ffffffff821d823b&gt;] entry_SYSCALL_64_fastpath+0x1e/0xad

Fixes: db6c43bd2132 ("crypto: KEYS: convert public key and digsig asym to the akcipher api")
Signed-off-by: Andrey Ryabinin &lt;aryabinin@virtuozzo.com&gt;
Cc: &lt;stable@vger.kernel.org&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>KEYS: Fix for erroneous trust of incorrectly signed X.509 certs</title>
<updated>2016-07-18T02:19:47Z</updated>
<author>
<name>Mat Martineau</name>
</author>
<published>2016-07-17T23:10:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=acddc72015e5bc8f640b02d38b36afd7841c9c14'/>
<id>urn:sha1:acddc72015e5bc8f640b02d38b36afd7841c9c14</id>
<content type='text'>
Arbitrary X.509 certificates without authority key identifiers (AKIs)
can be added to "trusted" keyrings, including IMA or EVM certs loaded
from the filesystem. Signature verification is currently bypassed for
certs without AKIs.

Trusted keys were recently refactored, and this bug is not present in
4.6.

restrict_link_by_signature should return -ENOKEY (no matching parent
certificate found) if the certificate being evaluated has no AKIs,
instead of bypassing signature checks and returning 0 (new certificate
accepted).

Reported-by: Petko Manolov &lt;petkan@mip-labs.com&gt;
Signed-off-by: Mat Martineau &lt;mathew.j.martineau@linux.intel.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>pefile: Fix the failure of calculation for digest</title>
<updated>2016-07-18T02:19:46Z</updated>
<author>
<name>Lans Zhang</name>
</author>
<published>2016-07-17T23:10:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d128471a14775cd11abd81c09b2a086997ab3150'/>
<id>urn:sha1:d128471a14775cd11abd81c09b2a086997ab3150</id>
<content type='text'>
Commit e68503bd68 forgot to set digest_len and thus cause the following
error reported by kexec when launching a crash kernel:

	kexec_file_load failed: Bad message

Fixes: e68503bd68 (KEYS: Generalise system_verify_data() to provide access to internal content)
Signed-off-by: Lans Zhang &lt;jia.zhang@windriver.com&gt;
Tested-by: Dave Young &lt;dyoung@redhat.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
cc: kexec@lists.infradead.org
cc: linux-crypto@vger.kernel.org
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined</title>
<updated>2016-07-18T02:19:44Z</updated>
<author>
<name>Lans Zhang</name>
</author>
<published>2016-07-17T23:10:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a46e667887448da10e26e46442bda01d1f311aaf'/>
<id>urn:sha1:a46e667887448da10e26e46442bda01d1f311aaf</id>
<content type='text'>
This fix resolves the following kernel panic if an empty or missing
AuthorityKeyIdentifier is encountered and DEBUG is defined in
pkcs7_verify.c.

[  459.041989] PKEY: &lt;==public_key_verify_signature() = 0
[  459.041993] PKCS7: Verified signature 1
[  459.041995] PKCS7: ==&gt; pkcs7_verify_sig_chain()
[  459.041999] PKCS7: verify Sample DB Certificate for SCP: 01
[  459.042002] PKCS7: - issuer Sample KEK Certificate for SCP
[  459.042014] BUG: unable to handle kernel NULL pointer dereference at           (null)
[  459.042135] IP: [&lt;ffffffff813e7b4c&gt;] pkcs7_verify+0x72c/0x7f0
[  459.042217] PGD 739e6067 PUD 77719067 PMD 0
[  459.042286] Oops: 0000 [#1] PREEMPT SMP
[  459.042328] Modules linked in:
[  459.042368] CPU: 0 PID: 474 Comm: kexec Not tainted 4.7.0-rc7-WR8.0.0.0_standard+ #18
[  459.042462] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 10/09/2014
[  459.042586] task: ffff880073a50000 ti: ffff8800738e8000 task.ti: ffff8800738e8000
[  459.042675] RIP: 0010:[&lt;ffffffff813e7b4c&gt;]  [&lt;ffffffff813e7b4c&gt;] pkcs7_verify+0x72c/0x7f0
[  459.042784] RSP: 0018:ffff8800738ebd58  EFLAGS: 00010246
[  459.042845] RAX: 0000000000000000 RBX: ffff880076b7da80 RCX: 0000000000000006
[  459.042929] RDX: 0000000000000001 RSI: ffffffff81c85001 RDI: ffffffff81ca00a9
[  459.043014] RBP: ffff8800738ebd98 R08: 0000000000000400 R09: ffff8800788a304c
[  459.043098] R10: 0000000000000000 R11: 00000000000060ca R12: ffff8800769a2bc0
[  459.043182] R13: ffff880077358300 R14: 0000000000000000 R15: ffff8800769a2dc0
[  459.043268] FS:  00007f24cc741700(0000) GS:ffff880074e00000(0000) knlGS:0000000000000000
[  459.043365] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  459.043431] CR2: 0000000000000000 CR3: 0000000073a36000 CR4: 00000000001006f0
[  459.043514] Stack:
[  459.043530]  0000000000000000 ffffffbf00000020 31ffffff813e68b0 0000000000000002
[  459.043644]  ffff8800769a2bc0 0000000000000000 00000000007197b8 0000000000000002
[  459.043756]  ffff8800738ebdd8 ffffffff81153fb1 0000000000000000 0000000000000000
[  459.043869] Call Trace:
[  459.043898]  [&lt;ffffffff81153fb1&gt;] verify_pkcs7_signature+0x61/0x140
[  459.043974]  [&lt;ffffffff813e7f0b&gt;] verify_pefile_signature+0x2cb/0x830
[  459.044052]  [&lt;ffffffff813e8470&gt;] ? verify_pefile_signature+0x830/0x830
[  459.044134]  [&lt;ffffffff81048e25&gt;] bzImage64_verify_sig+0x15/0x20
[  459.046332]  [&lt;ffffffff81046e09&gt;] arch_kexec_kernel_verify_sig+0x29/0x40
[  459.048552]  [&lt;ffffffff810f10e4&gt;] SyS_kexec_file_load+0x1f4/0x6c0
[  459.050768]  [&lt;ffffffff81050e36&gt;] ? __do_page_fault+0x1b6/0x550
[  459.052996]  [&lt;ffffffff8199241f&gt;] entry_SYSCALL_64_fastpath+0x17/0x93
[  459.055242] Code: e8 0a d6 ff ff 85 c0 0f 88 7a fb ff ff 4d 39 fd 4d 89 7d 08 74 45 4d 89 fd e9 14 fe ff ff 4d 8b 76 08 31 c0 48 c7 c7 a9 00 ca 81 &lt;41&gt; 0f b7 36 49 8d 56 02 e8 d0 91 d6 ff 4d 8b 3c 24 4d 85 ff 0f
[  459.060535] RIP  [&lt;ffffffff813e7b4c&gt;] pkcs7_verify+0x72c/0x7f0
[  459.063040]  RSP &lt;ffff8800738ebd58&gt;
[  459.065456] CR2: 0000000000000000
[  459.075998] ---[ end trace c15f0e897cda28dc ]---

Signed-off-by: Lans Zhang &lt;jia.zhang@windriver.com&gt;
Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
Cc: Dave Young &lt;dyoung@redhat.com&gt;
Cc: Baoquan He &lt;bhe@redhat.com&gt;
Cc: Vivek Goyal &lt;vgoyal@redhat.com&gt;
cc: linux-crypto@vger.kernel.org
cc: kexec@lists.infradead.org
Signed-off-by: James Morris &lt;james.l.morris@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2016-05-30T22:20:18Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2016-05-30T22:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=446985428d2cd10efd5d139c33de16c50ee771ba'/>
<id>urn:sha1:446985428d2cd10efd5d139c33de16c50ee771ba</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes the following issues:

   - missing selection in public_key that may result in a build failure

   - Potential crash in error path in omap-sham

   - ccp AES XTS bug that affects requests larger than 4096"

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ccp - Fix AES XTS error for request sizes above 4096
  crypto: public_key: select CRYPTO_AKCIPHER
  crypto: omap-sham - potential Oops on error in probe
</content>
</entry>
<entry>
<title>crypto: public_key: select CRYPTO_AKCIPHER</title>
<updated>2016-05-19T10:03:01Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2016-05-18T14:55:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bad6a185b4d6f81d0ed2b6e4c16307969f160b95'/>
<id>urn:sha1:bad6a185b4d6f81d0ed2b6e4c16307969f160b95</id>
<content type='text'>
In some rare randconfig builds, we can end up with
ASYMMETRIC_PUBLIC_KEY_SUBTYPE enabled but CRYPTO_AKCIPHER disabled,
which fails to link because of the reference to crypto_alloc_akcipher:

crypto/built-in.o: In function `public_key_verify_signature':
:(.text+0x110e4): undefined reference to `crypto_alloc_akcipher'

This adds a Kconfig 'select' statement to ensure the dependency
is always there.

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>KEYS: The PKCS#7 test key type should use the secondary keyring</title>
<updated>2016-05-11T13:31:55Z</updated>
<author>
<name>David Howells</name>
</author>
<published>2016-05-11T13:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3c8f2278716dc862c420d3d256a83ce30fd12e74'/>
<id>urn:sha1:3c8f2278716dc862c420d3d256a83ce30fd12e74</id>
<content type='text'>
The PKCS#7 test key type should use the secondary keyring instead of the
built-in keyring if available as the source of trustworthy keys.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
</entry>
</feed>
