Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crypto: authenc - Fix sleep in atomic context in decrypt_tail

The function crypto_authenc_decrypt_tail discards its flags
argument and always relies on the flags from the original request
when starting its sub-request.

This is clearly wrong as it may cause the SLEEPABLE flag to be
set when it shouldn't.

Fixes: 92d95ba91772 ("crypto: authenc - Convert to new AEAD interface")
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+1 -1
+1 -1
crypto/authenc.c
··· 253 253 dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen); 254 254 255 255 skcipher_request_set_tfm(skreq, ctx->enc); 256 - skcipher_request_set_callback(skreq, aead_request_flags(req), 256 + skcipher_request_set_callback(skreq, flags, 257 257 req->base.complete, req->base.data); 258 258 skcipher_request_set_crypt(skreq, src, dst, 259 259 req->cryptlen - authsize, req->iv);