Patch "crypto: authenc - Fix sleep in atomic context in decrypt_tail" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    crypto: authenc - Fix sleep in atomic context in decrypt_tail

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     crypto-authenc-fix-sleep-in-atomic-context-in-decryp.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit b464fa805bad2b4ad1fd9c82c1281c6e4688580a
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date:   Wed Jan 19 17:58:40 2022 +1100

    crypto: authenc - Fix sleep in atomic context in decrypt_tail
    
    [ Upstream commit 66eae850333d639fc278d6f915c6fc01499ea893 ]
    
    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@xxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Tested-by: Corentin Labbe <clabbe.montjoie@xxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/crypto/authenc.c b/crypto/authenc.c
index 670bf1a01d00..17f674a7cdff 100644
--- a/crypto/authenc.c
+++ b/crypto/authenc.c
@@ -253,7 +253,7 @@ static int crypto_authenc_decrypt_tail(struct aead_request *req,
 		dst = scatterwalk_ffwd(areq_ctx->dst, req->dst, req->assoclen);
 
 	skcipher_request_set_tfm(skreq, ctx->enc);
-	skcipher_request_set_callback(skreq, aead_request_flags(req),
+	skcipher_request_set_callback(skreq, flags,
 				      req->base.complete, req->base.data);
 	skcipher_request_set_crypt(skreq, src, dst,
 				   req->cryptlen - authsize, req->iv);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux