<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/crypto, branch v6.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-11-10T01:04:58Z</updated>
<entry>
<title>Merge tag 'v6.7-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2023-11-10T01:04:58Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-10T01:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3b220413438184b352b297e7cf593fa56999b5b3'/>
<id>urn:sha1:3b220413438184b352b297e7cf593fa56999b5b3</id>
<content type='text'>
Pull crypto fixes from Herbert Xu:
 "This fixes a regression in ahash and hides the Kconfig sub-options for
  the jitter RNG"

* tag 'v6.7-p2' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
  crypto: ahash - Set using_shash for cloned ahash wrapper over shash
  crypto: jitterentropy - Hide esoteric Kconfig options under FIPS and EXPERT
</content>
</entry>
<entry>
<title>crypto: ahash - Set using_shash for cloned ahash wrapper over shash</title>
<updated>2023-11-07T08:44:36Z</updated>
<author>
<name>Dmitry Safonov</name>
<email>dima@arista.com</email>
</author>
<published>2023-11-07T02:37:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9aedd10fe38418319bd8ed55dc68a40ec04aaa05'/>
<id>urn:sha1:9aedd10fe38418319bd8ed55dc68a40ec04aaa05</id>
<content type='text'>
The cloned child of ahash that uses shash under the hood should use
shash helpers (like crypto_shash_setkey()).

The following panic may be observed on TCP-AO selftests:

&gt; ==================================================================
&gt; BUG: KASAN: wild-memory-access in crypto_mod_get+0x1b/0x60
&gt; Write of size 4 at addr 5d5be0ff5c415e14 by task connect_ipv4/1397
&gt;
&gt; CPU: 0 PID: 1397 Comm: connect_ipv4 Tainted: G        W          6.6.0+ #47
&gt; Call Trace:
&gt;  &lt;TASK&gt;
&gt;  dump_stack_lvl+0x46/0x70
&gt;  kasan_report+0xc3/0xf0
&gt;  kasan_check_range+0xec/0x190
&gt;  crypto_mod_get+0x1b/0x60
&gt;  crypto_spawn_alg+0x53/0x140
&gt;  crypto_spawn_tfm2+0x13/0x60
&gt;  hmac_init_tfm+0x25/0x60
&gt;  crypto_ahash_setkey+0x8b/0x100
&gt;  tcp_ao_add_cmd+0xe7a/0x1120
&gt;  do_tcp_setsockopt+0x5ed/0x12a0
&gt;  do_sock_setsockopt+0x82/0x100
&gt;  __sys_setsockopt+0xe9/0x160
&gt;  __x64_sys_setsockopt+0x60/0x70
&gt;  do_syscall_64+0x3c/0xe0
&gt;  entry_SYSCALL_64_after_hwframe+0x46/0x4e
&gt; ==================================================================
&gt; general protection fault, probably for non-canonical address 0x5d5be0ff5c415e14: 0000 [#1] PREEMPT SMP KASAN
&gt; CPU: 0 PID: 1397 Comm: connect_ipv4 Tainted: G    B   W          6.6.0+ #47
&gt; Call Trace:
&gt;  &lt;TASK&gt;
&gt;  ? die_addr+0x3c/0xa0
&gt;  ? exc_general_protection+0x144/0x210
&gt;  ? asm_exc_general_protection+0x22/0x30
&gt;  ? add_taint+0x26/0x90
&gt;  ? crypto_mod_get+0x20/0x60
&gt;  ? crypto_mod_get+0x1b/0x60
&gt;  ? ahash_def_finup_done1+0x58/0x80
&gt;  crypto_spawn_alg+0x53/0x140
&gt;  crypto_spawn_tfm2+0x13/0x60
&gt;  hmac_init_tfm+0x25/0x60
&gt;  crypto_ahash_setkey+0x8b/0x100
&gt;  tcp_ao_add_cmd+0xe7a/0x1120
&gt;  do_tcp_setsockopt+0x5ed/0x12a0
&gt;  do_sock_setsockopt+0x82/0x100
&gt;  __sys_setsockopt+0xe9/0x160
&gt;  __x64_sys_setsockopt+0x60/0x70
&gt;  do_syscall_64+0x3c/0xe0
&gt;  entry_SYSCALL_64_after_hwframe+0x46/0x4e
&gt;  &lt;/TASK&gt;
&gt; RIP: 0010:crypto_mod_get+0x20/0x60

Make sure that the child/clone has using_shash set when parent is
an shash user.

Fixes: 2f1f34c1bf7b ("crypto: ahash - optimize performance when wrapping shash")
Cc: David Ahern &lt;dsahern@kernel.org&gt;
Cc: "David S. Miller" &lt;davem@davemloft.net&gt;
Cc: Dmitry Safonov &lt;0x7f454c46@gmail.com&gt;
Cc: Eric Biggers &lt;ebiggers@google.com&gt;
Cc: Eric Dumazet &lt;edumazet@google.com&gt;
Cc: Francesco Ruggeri &lt;fruggeri05@gmail.com&gt;
To: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Cc: Jakub Kicinski &lt;kuba@kernel.org&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Cc: Salam Noureddine &lt;noureddine@arista.com&gt;
Cc: netdev@vger.kernel.org
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Dmitry Safonov &lt;dima@arista.com&gt;
Reviewed-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: jitterentropy - Hide esoteric Kconfig options under FIPS and EXPERT</title>
<updated>2023-11-07T08:44:35Z</updated>
<author>
<name>Herbert Xu</name>
<email>herbert@gondor.apana.org.au</email>
</author>
<published>2023-11-06T10:00:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e7ed6473c2c8c4e45dd861bfa06e96189b11d8db'/>
<id>urn:sha1:e7ed6473c2c8c4e45dd861bfa06e96189b11d8db</id>
<content type='text'>
As JITTERENTROPY is selected by default if you enable the CRYPTO
API, any Kconfig options added there will show up for every single
user.  Hide the esoteric options under EXPERT as well as FIPS so
that only distro makers will see them.

Reported-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Reviewed-by: Stephan Mueller &lt;smueller@chronox.de&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>Merge tag 'v6.7-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6</title>
<updated>2023-11-03T02:15:30Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-03T02:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc3012f4e3a9765de81f454cb8f9bb16aafc6ff5'/>
<id>urn:sha1:bc3012f4e3a9765de81f454cb8f9bb16aafc6ff5</id>
<content type='text'>
Pull crypto updates from Herbert Xu:
 "API:
   - Add virtual-address based lskcipher interface
   - Optimise ahash/shash performance in light of costly indirect calls
   - Remove ahash alignmask attribute

  Algorithms:
   - Improve AES/XTS performance of 6-way unrolling for ppc
   - Remove some uses of obsolete algorithms (md4, md5, sha1)
   - Add FIPS 202 SHA-3 support in pkcs1pad
   - Add fast path for single-page messages in adiantum
   - Remove zlib-deflate

  Drivers:
   - Add support for S4 in meson RNG driver
   - Add STM32MP13x support in stm32
   - Add hwrng interface support in qcom-rng
   - Add support for deflate algorithm in hisilicon/zip"

* tag 'v6.7-p1' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (283 commits)
  crypto: adiantum - flush destination page before unmapping
  crypto: testmgr - move pkcs1pad(rsa,sha3-*) to correct place
  Documentation/module-signing.txt: bring up to date
  module: enable automatic module signing with FIPS 202 SHA-3
  crypto: asymmetric_keys - allow FIPS 202 SHA-3 signatures
  crypto: rsa-pkcs1pad - Add FIPS 202 SHA-3 support
  crypto: FIPS 202 SHA-3 register in hash info for IMA
  x509: Add OIDs for FIPS 202 SHA-3 hash and signatures
  crypto: ahash - optimize performance when wrapping shash
  crypto: ahash - check for shash type instead of not ahash type
  crypto: hash - move "ahash wrapping shash" functions to ahash.c
  crypto: talitos - stop using crypto_ahash::init
  crypto: chelsio - stop using crypto_ahash::init
  crypto: ahash - improve file comment
  crypto: ahash - remove struct ahash_request_priv
  crypto: ahash - remove crypto_ahash_alignmask
  crypto: gcm - stop using alignmask of ahash
  crypto: chacha20poly1305 - stop using alignmask of ahash
  crypto: ccm - stop using alignmask of ahash
  net: ipv6: stop checking crypto_ahash_alignmask
  ...
</content>
</entry>
<entry>
<title>Merge tag 'integrity-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity</title>
<updated>2023-11-02T16:53:22Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-11-02T16:53:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ca219be012786654d5c802ee892433aaa0016d10'/>
<id>urn:sha1:ca219be012786654d5c802ee892433aaa0016d10</id>
<content type='text'>
Pull integrity updates from Mimi Zohar:
 "Four integrity changes: two IMA-overlay updates, an integrity Kconfig
  cleanup, and a secondary keyring update"

* tag 'integrity-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
  ima: detect changes to the backing overlay file
  certs: Only allow certs signed by keys on the builtin keyring
  integrity: fix indentation of config attributes
  ima: annotate iint mutex to avoid lockdep false positive warnings
</content>
</entry>
<entry>
<title>crypto: adiantum - flush destination page before unmapping</title>
<updated>2023-11-01T04:58:42Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2023-10-27T20:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a312e07a65fb598ed239b940434392721385c722'/>
<id>urn:sha1:a312e07a65fb598ed239b940434392721385c722</id>
<content type='text'>
Upon additional review, the new fast path in adiantum_finish() is
missing the call to flush_dcache_page() that scatterwalk_map_and_copy()
was doing.  It's apparently debatable whether flush_dcache_page() is
actually needed, as per the discussion at
https://lore.kernel.org/lkml/YYP1lAq46NWzhOf0@casper.infradead.org/T/#u.
However, it appears that currently all the helper functions that write
to a page, such as scatterwalk_map_and_copy(), memcpy_to_page(), and
memzero_page(), do the dcache flush.  So do it to be consistent.

Fixes: dadf5e56c967 ("crypto: adiantum - add fast path for single-page messages")
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: testmgr - move pkcs1pad(rsa,sha3-*) to correct place</title>
<updated>2023-11-01T04:58:42Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2023-10-27T19:52:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b030c45844cfe0d4c89202cd6c9f4697b3a25a6a'/>
<id>urn:sha1:b030c45844cfe0d4c89202cd6c9f4697b3a25a6a</id>
<content type='text'>
alg_test_descs[] needs to be in sorted order, since it is used for
binary search.  This fixes the following boot-time warning:

    testmgr: alg_test_descs entries in wrong order: 'pkcs1pad(rsa,sha512)' before 'pkcs1pad(rsa,sha3-256)'

Fixes: ee62afb9d02d ("crypto: rsa-pkcs1pad - Add FIPS 202 SHA-3 support")
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Reviewed-by: Dimitri John Ledkov &lt;dimitri.ledkov@canonical.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>certs: Only allow certs signed by keys on the builtin keyring</title>
<updated>2023-10-31T12:22:36Z</updated>
<author>
<name>Mimi Zohar</name>
<email>zohar@linux.ibm.com</email>
</author>
<published>2023-10-16T00:18:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b46503068cb9ed63ff1d8250f143354ead0b16eb'/>
<id>urn:sha1:b46503068cb9ed63ff1d8250f143354ead0b16eb</id>
<content type='text'>
Originally the secondary trusted keyring provided a keyring to which extra
keys may be added, provided those keys were not blacklisted and were
vouched for by a key built into the kernel or already in the secondary
trusted keyring.

On systems with the machine keyring configured, additional keys may also
be vouched for by a key on the machine keyring.

Prevent loading additional certificates directly onto the secondary
keyring, vouched for by keys on the machine keyring, yet allow these
certificates to be loaded onto other trusted keyrings.

Reviewed-by: Jarkko Sakkinen &lt;jarkko@kernel.org&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>crypto: asymmetric_keys - allow FIPS 202 SHA-3 signatures</title>
<updated>2023-10-27T10:04:30Z</updated>
<author>
<name>Dimitri John Ledkov</name>
<email>dimitri.ledkov@canonical.com</email>
</author>
<published>2023-10-22T18:22:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fdb4f66c9545f29742be5a8d325798e6016c3c4e'/>
<id>urn:sha1:fdb4f66c9545f29742be5a8d325798e6016c3c4e</id>
<content type='text'>
Add FIPS 202 SHA-3 hash signature support in x509 certificates, pkcs7
signatures, and authenticode signatures. Supports hashes of size 256
and up, as 224 is too weak for any practical purposes.

Signed-off-by: Dimitri John Ledkov &lt;dimitri.ledkov@canonical.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
<entry>
<title>crypto: rsa-pkcs1pad - Add FIPS 202 SHA-3 support</title>
<updated>2023-10-27T10:04:30Z</updated>
<author>
<name>Dimitri John Ledkov</name>
<email>dimitri.ledkov@canonical.com</email>
</author>
<published>2023-10-22T18:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee62afb9d02dd279a7b73245614f13f8fe777a6d'/>
<id>urn:sha1:ee62afb9d02dd279a7b73245614f13f8fe777a6d</id>
<content type='text'>
Add support in rsa-pkcs1pad for FIPS 202 SHA-3 hashes, sizes 256 and
up. As 224 is too weak for any practical purposes.

Signed-off-by: Dimitri John Ledkov &lt;dimitri.ledkov@canonical.com&gt;
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
</content>
</entry>
</feed>
