<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/crypto/asymmetric_keys, branch v4.9.25</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>X.509: Fix double free in x509_cert_parse() [ver #3]</title>
<updated>2016-11-25T01:57:48+00:00</updated>
<author>
<name>Andrey Ryabinin</name>
<email>aryabinin@virtuozzo.com</email>
</author>
<published>2016-11-24T13:23:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2b95fda2c4fcb6d6625963f889247538f247fce0'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>KEYS: Fix for erroneous trust of incorrectly signed X.509 certs</title>
<updated>2016-07-18T02:19:47+00:00</updated>
<author>
<name>Mat Martineau</name>
<email>mathew.j.martineau@linux.intel.com</email>
</author>
<published>2016-07-17T23:10:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=acddc72015e5bc8f640b02d38b36afd7841c9c14'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>pefile: Fix the failure of calculation for digest</title>
<updated>2016-07-18T02:19:46+00:00</updated>
<author>
<name>Lans Zhang</name>
<email>jia.zhang@windriver.com</email>
</author>
<published>2016-07-17T23:10:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d128471a14775cd11abd81c09b2a086997ab3150'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined</title>
<updated>2016-07-18T02:19:44+00:00</updated>
<author>
<name>Lans Zhang</name>
<email>jia.zhang@windriver.com</email>
</author>
<published>2016-07-17T23:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a46e667887448da10e26e46442bda01d1f311aaf'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</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:18+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-30T22:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=446985428d2cd10efd5d139c33de16c50ee771ba'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>crypto: public_key: select CRYPTO_AKCIPHER</title>
<updated>2016-05-19T10:03:01+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-05-18T14:55:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bad6a185b4d6f81d0ed2b6e4c16307969f160b95'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>KEYS: The PKCS#7 test key type should use the secondary keyring</title>
<updated>2016-05-11T13:31:55+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-05-11T13:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3c8f2278716dc862c420d3d256a83ce30fd12e74'/>
<id>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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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;
</pre>
</div>
</content>
</entry>
<entry>
<title>KEYS: Move the point of trust determination to __key_link()</title>
<updated>2016-04-11T21:43:43+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a511e1af8b12f44c6e55786c463c9f093c214fb6'/>
<id>a511e1af8b12f44c6e55786c463c9f093c214fb6</id>
<content type='text'>
Move the point at which a key is determined to be trustworthy to
__key_link() so that we use the contents of the keyring being linked in to
to determine whether the key being linked in is trusted or not.

What is 'trusted' then becomes a matter of what's in the keyring.

Currently, the test is done when the key is parsed, but given that at that
point we can only sensibly refer to the contents of the system trusted
keyring, we can only use that as the basis for working out the
trustworthiness of a new key.

With this change, a trusted keyring is a set of keys that once the
trusted-only flag is set cannot be added to except by verification through
one of the contained keys.

Further, adding a key into a trusted keyring, whilst it might grant
trustworthiness in the context of that keyring, does not automatically
grant trustworthiness in the context of a second keyring to which it could
be secondarily linked.

To accomplish this, the authentication data associated with the key source
must now be retained.  For an X.509 cert, this means the contents of the
AuthorityKeyIdentifier and the signature data.


If system keyrings are disabled then restrict_link_by_builtin_trusted()
resolves to restrict_link_reject().  The integrity digital signature code
still works correctly with this as it was previously using
KEY_FLAG_TRUSTED_ONLY, which doesn't permit anything to be added if there
is no system keyring against which trust can be determined.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the point at which a key is determined to be trustworthy to
__key_link() so that we use the contents of the keyring being linked in to
to determine whether the key being linked in is trusted or not.

What is 'trusted' then becomes a matter of what's in the keyring.

Currently, the test is done when the key is parsed, but given that at that
point we can only sensibly refer to the contents of the system trusted
keyring, we can only use that as the basis for working out the
trustworthiness of a new key.

With this change, a trusted keyring is a set of keys that once the
trusted-only flag is set cannot be added to except by verification through
one of the contained keys.

Further, adding a key into a trusted keyring, whilst it might grant
trustworthiness in the context of that keyring, does not automatically
grant trustworthiness in the context of a second keyring to which it could
be secondarily linked.

To accomplish this, the authentication data associated with the key source
must now be retained.  For an X.509 cert, this means the contents of the
AuthorityKeyIdentifier and the signature data.


If system keyrings are disabled then restrict_link_by_builtin_trusted()
resolves to restrict_link_reject().  The integrity digital signature code
still works correctly with this as it was previously using
KEY_FLAG_TRUSTED_ONLY, which doesn't permit anything to be added if there
is no system keyring against which trust can be determined.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KEYS: Make the system trusted keyring depend on the asymmetric key type</title>
<updated>2016-04-11T21:43:24+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=99716b7cae8263e1c7e7c1987e95d8f67071ab3e'/>
<id>99716b7cae8263e1c7e7c1987e95d8f67071ab3e</id>
<content type='text'>
Make the system trusted keyring depend on the asymmetric key type as
there's not a lot of point having it if you can't then load asymmetric keys
onto it.

This requires the ASYMMETRIC_KEY_TYPE to be made a bool, not a tristate, as
the Kconfig language doesn't then correctly force ASYMMETRIC_KEY_TYPE to
'y' rather than 'm' if SYSTEM_TRUSTED_KEYRING is 'y'.

Making SYSTEM_TRUSTED_KEYRING *select* ASYMMETRIC_KEY_TYPE instead doesn't
work as the Kconfig interpreter then wrongly complains about dependency
loops.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the system trusted keyring depend on the asymmetric key type as
there's not a lot of point having it if you can't then load asymmetric keys
onto it.

This requires the ASYMMETRIC_KEY_TYPE to be made a bool, not a tristate, as
the Kconfig language doesn't then correctly force ASYMMETRIC_KEY_TYPE to
'y' rather than 'm' if SYSTEM_TRUSTED_KEYRING is 'y'.

Making SYSTEM_TRUSTED_KEYRING *select* ASYMMETRIC_KEY_TYPE instead doesn't
work as the Kconfig interpreter then wrongly complains about dependency
loops.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>X.509: Move the trust validation code out to its own file</title>
<updated>2016-04-11T21:42:55+00:00</updated>
<author>
<name>David Howells</name>
<email>dhowells@redhat.com</email>
</author>
<published>2016-04-06T15:14:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=cfb664ff2b71fbbdc438b8e6db2a1412440432a2'/>
<id>cfb664ff2b71fbbdc438b8e6db2a1412440432a2</id>
<content type='text'>
Move the X.509 trust validation code out to its own file so that it can be
generalised.

Signed-off-by: David Howells &lt;dhowells@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the X.509 trust validation code out to its own file so that it can be
generalised.

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