linux-kernelorg-stable/include
Eric Biggers 4dffc9bbff crypto: scatterwalk - Fix memcpy_sglist() to always succeed
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>
2025-11-22 10:04:50 +08:00
..
acpi
asm-generic
clocksource
crypto crypto: scatterwalk - Fix memcpy_sglist() to always succeed 2025-11-22 10:04:50 +08:00
cxl
drm
dt-bindings
hyperv
keys keys: Annotate struct asymmetric_key_id with __counted_by 2025-10-31 17:43:56 +08:00
kunit
kvm
linux rhashtable: use likely for rhashtable lookup 2025-10-20 12:10:28 +08:00
math-emu
media
memory
misc
net
pcmcia
ras
rdma
rv
scsi
soc KEYS: trusted: caam based protected key 2025-10-20 12:10:28 +08:00
sound
target
trace
uapi bpf-fixes 2025-10-11 10:31:38 -07:00
ufs
vdso
video
xen
Kbuild