This update includes the following changes:
API:
- Add af_alg_restrict sysctl and white list.
- Fix potential suspend/resume races in hwrng.
Algorithms:
- Optimize vli additive operations using compiler builtins in ecc.
Drivers:
- Remove unsafe/deprecated algorithms from qce.
- Mark qce as BROKEN.
- Add runtime PM and interconnect bandwidth scaling support to qce.
- Remove crypto_rng from qcom, sun8i and caam.
- Fix SG list issues in iaa.
- Fix SEV init path bugs in ccp.
crypto: lskcipher - propagate errors from unaligned crypt
The while loop declares a second err variable that shadows the outer
one. When the crypt callback fails, the goto out path returns the outer
err, which still holds the -ENOMEM value assigned before the successful
allocation check. The real error from the cipher is discarded and the
caller sees -ENOMEM instead.
Drop the inner declaration so the callback error reaches the caller.
Verified with a test module that registers an lskcipher whose encrypt
callback fails with -EIO and calls it through a misaligned buffer.
An unpatched kernel returns -ENOMEM, a patched kernel returns -EIO.
Found with Clang's -Wshadow.
Fixes: 31865c4c4db2b ("crypto: skcipher - Add lskcipher")
Assisted-by: Claude:claude-fable-5
Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 file changed