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: 131bdceca1f0 ("crypto: scatterwalk - Add memcpy_sglist")
Fixes: 0f8d42bf128d ("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
..
2025-11-22 10:04:50 +08:00
2025-07-09 22:57:54 -07:00
2025-07-18 20:52:00 +10:00
2025-09-20 20:21:03 +08:00
2025-05-05 18:20:45 +08:00
2025-05-05 18:20:44 +08:00
2025-10-31 17:43:56 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:03:57 +08:00
2025-09-21 14:22:09 -07:00
2025-04-16 15:36:24 +08:00
2025-05-19 13:48:20 +08:00
2025-05-12 13:33:14 +08:00
2025-05-12 13:32:53 +08:00
2025-10-17 16:03:57 +08:00
2025-10-17 16:03:57 +08:00
2025-09-20 20:21:04 +08:00
2025-05-23 19:25:47 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:03:58 +08:00
2025-05-12 13:32:53 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-03-02 15:19:43 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-08-29 09:50:19 -07:00
2024-12-02 11:34:44 -08:00
2025-05-05 18:20:44 +08:00
2025-03-15 16:21:22 +08:00
2025-06-30 09:31:56 -07:00
2025-06-30 09:31:56 -07:00
2025-09-13 12:11:06 +08:00
2025-07-18 20:52:00 +10:00
2025-05-12 13:32:53 +08:00
2025-03-21 17:39:06 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-11-06 14:31:08 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:10:27 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:03:57 +08:00
2025-05-05 18:20:44 +08:00
2025-02-09 18:08:12 +08:00
2025-05-05 18:20:44 +08:00
2025-04-16 15:16:21 +08:00
2025-04-16 15:16:21 +08:00
2025-05-05 18:20:44 +08:00
2025-05-12 13:32:53 +08:00
2025-04-16 15:16:21 +08:00
2025-10-09 15:02:35 +08:00
2025-05-05 18:20:44 +08:00
2025-10-17 16:03:57 +08:00
2025-05-12 13:32:53 +08:00
2025-05-12 13:32:53 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-06-11 10:59:45 +08:00
2025-05-19 13:48:20 +08:00
2025-05-12 13:33:14 +08:00
2025-08-30 15:43:25 +08:00
2025-07-18 20:52:01 +10:00
2025-11-22 10:04:50 +08:00
2025-05-12 13:33:14 +08:00
2025-05-05 18:20:44 +08:00
2025-04-16 15:36:24 +08:00
2025-05-05 18:20:44 +08:00
2025-05-19 13:48:20 +08:00
2025-04-16 15:36:24 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2025-09-20 20:21:03 +08:00
2025-11-22 10:04:50 +08:00
2025-05-05 18:20:44 +08:00
2025-09-08 09:47:38 -07:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-06-13 17:26:17 +08:00
2025-05-05 18:20:44 +08:00
2025-03-21 17:39:06 +08:00
2025-05-05 18:20:44 +08:00
2025-10-06 10:17:07 +08:00
2025-05-05 18:20:44 +08:00
2025-04-16 15:16:21 +08:00
2025-11-22 10:04:50 +08:00
2025-09-21 14:22:09 -07:00
2025-05-05 18:20:44 +08:00
2025-05-12 13:32:53 +08:00
2025-05-05 18:20:44 +08:00
2025-09-02 19:02:35 -07:00
2025-04-23 15:52:46 +08:00
2025-09-02 19:02:37 -07:00
2025-09-02 19:02:39 -07:00
2025-05-27 13:43:32 +08:00
2025-04-16 15:36:24 +08:00
2025-10-08 16:13:07 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-11-22 10:04:50 +08:00
2025-11-22 10:04:50 +08:00
2025-05-05 18:20:44 +08:00
2025-11-22 10:04:50 +08:00
2025-11-22 10:04:50 +08:00
2025-05-05 18:20:44 +08:00
2025-06-23 16:56:56 +08:00
2025-05-05 18:20:44 +08:00
2025-05-05 18:20:44 +08:00
2025-05-19 13:48:20 +08:00
2025-05-05 18:20:44 +08:00
2025-11-14 18:15:49 +08:00