Patch "crypto: sahara - handle zero-length aes requests" has been added to the 5.15-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: sahara - handle zero-length aes requests

to the 5.15-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-sahara-handle-zero-length-aes-requests.patch
and it can be found in the queue-5.15 subdirectory.

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



commit dc862be15cfc1f6780ba2a36fc29f8a7939e9b2b
Author: Ovidiu Panait <ovidiu.panait@xxxxxxxxxxxxx>
Date:   Sun Dec 24 10:21:31 2023 +0200

    crypto: sahara - handle zero-length aes requests
    
    [ Upstream commit d1d6351e37aac14b32a291731d0855996c459d11 ]
    
    In case of a zero-length input, exit gracefully from sahara_aes_crypt().
    
    Fixes: 5de8875281e1 ("crypto: sahara - Add driver for SAHARA2 accelerator.")
    Signed-off-by: Ovidiu Panait <ovidiu.panait@xxxxxxxxxxxxx>
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index bbd2c6474b50..3229dd180d0c 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -677,6 +677,9 @@ static int sahara_aes_crypt(struct skcipher_request *req, unsigned long mode)
 	struct sahara_dev *dev = dev_ptr;
 	int err = 0;
 
+	if (!req->cryptlen)
+		return 0;
+
 	if (unlikely(ctx->keylen != AES_KEYSIZE_128))
 		return sahara_aes_fallback(req, mode);
 




[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