linux-yocto/include/crypto
Eric Biggers 17900c56e2 crypto: scatterwalk - Fix memcpy_sglist() to always succeed
commit 4dffc9bbffb9ccfcda730d899c97c553599e7ca8 upstream.

The original implementation of memcpy_sglist() was broken because it
didn't handle scatterlists that describe exactly the same memory, which
is a case that many callers rely on.  The current implementation is
broken too because it calls the skcipher_walk functions which can fail.
It ignores any errors from those functions.

Fix it by replacing it with a new implementation written from scratch.
It always succeeds.  It's also a bit faster, since it avoids the
overhead of skcipher_walk.  skcipher_walk includes a lot of
functionality (such as alignmask handling) that's irrelevant here.

Reported-by: Colin Ian King <coking@nvidia.com>
Closes: https://lore.kernel.org/r/20251114122620.111623-1-coking@nvidia.com
Fixes: 131bdceca1 ("crypto: scatterwalk - Add memcpy_sglist")
Fixes: 0f8d42bf12 ("crypto: scatterwalk - Move skcipher walk and use it for memcpy_sglist")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-02 12:57:08 +01:00
..
internal This update includes the following changes: 2025-10-04 14:59:29 -07:00
acompress.h crypto: acomp - Clone folios properly 2025-05-05 18:20:45 +08:00
aead.h
aes.h
akcipher.h crypto: akcipher - Drop sign/verify operations 2024-10-05 13:22:04 +08:00
algapi.h module: remove meaningless 'name' parameter from __MODULE_INFO() 2025-06-24 20:33:31 +09:00
arc4.h
aria.h
authenc.h crypto: Add 'krb5enc' hash and cipher AEAD algorithm 2025-03-02 21:39:34 +00:00
b128ops.h
blake2b.h crypto: arm/blake2b - Use API partial block handling 2025-04-23 11:33:46 +08:00
blake2s.h
blowfish.h
cast_common.h
cast5.h
cast6.h
chacha.h lib/crypto: chacha: Consolidate into single module 2025-08-29 09:50:19 -07:00
chacha20poly1305.h
cryptd.h
ctr.h crypto: ctr - Remove unnecessary header inclusions 2025-04-16 15:16:21 +08:00
curve25519.h lib/crypto: curve25519: Consolidate into single module 2025-09-06 16:32:43 -07:00
des.h
dh.h
drbg.h
ecc_curve.h
ecdh.h
engine.h crypto: engine - remove request batching support 2025-07-18 20:52:00 +10:00
gcm.h
gf128mul.h crypto: lib/gf128mul - Remove some bbe deadcode 2024-12-21 22:46:24 +08:00
ghash.h crypto: riscv/ghash - Use API partial block handling 2025-04-23 11:33:47 +08:00
hash_info.h
hash.h crypto: hash - Make HASH_MAX_DESCSIZE a bit more obvious 2025-08-22 17:28:44 +08:00
hkdf.h crypto,fs: Separate out hkdf_extract() and hkdf_expand() 2025-03-20 16:53:53 -07:00
hmac.h
if_alg.h crypto: af_alg - Fix incorrect boolean values in af_alg_ctx 2025-09-24 14:43:32 -07:00
kdf_sp800108.h
kpp.h
krb5.h rxrpc: Add the security index for yfs-rxgk 2025-04-14 17:36:41 -07:00
md5.h lib/crypto: md5: Add MD5 and HMAC-MD5 library functions 2025-08-26 12:52:27 -04:00
nhpoly1305.h
null.h crypto: null - remove the default null skcipher 2025-05-12 13:32:53 +08:00
padlock.h
pcrypt.h
pkcs7.h
poly1305.h lib/crypto: poly1305: Remove unused function poly1305_is_arch_optimized() 2025-08-29 09:49:18 -07:00
polyval.h crypto: polyval-generic - Use API partial block handling 2025-04-28 19:40:54 +08:00
public_key.h crypto: asymmetric_keys - Remove unused functions 2024-11-02 18:23:24 +08:00
rng.h crypto: rng - fix documentation for crypto_rng_alg() 2025-05-05 18:20:45 +08:00
scatterwalk.h crypto: scatterwalk - Fix memcpy_sglist() to always succeed 2026-01-02 12:57:08 +01:00
serpent.h
sha1.h lib/crypto: sha1: Add HMAC support 2025-07-14 08:59:20 -07:00
sha2.h lib/crypto: sha256: Add support for 2-way interleaved hashing 2025-09-17 13:09:39 -05:00
sha3.h crypto: zynqmp-sha - Fix partial block implementation 2025-05-05 18:20:46 +08:00
sig.h crypto: ecdsa - Fix NIST P521 key size reported by KEYCTL_PKEY_QUERY 2025-04-16 15:16:21 +08:00
skcipher.h crypto: skcipher - Set tfm in SYNC_SKCIPHER_REQUEST_ON_STACK 2025-02-22 15:56:03 +08:00
sm3_base.h crypto: lib/sm3 - Remove partial block helpers 2025-04-23 15:52:47 +08:00
sm3.h crypto: lib/sm3 - Remove partial block helpers 2025-04-23 15:52:47 +08:00
sm4.h
streebog.h crypto: streebog - Use API partial block handling 2025-05-05 18:20:44 +08:00
twofish.h
utils.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
xts.h