Patch "crypto: seqiv - Handle EBUSY correctly" has been added to the 4.19-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: seqiv - Handle EBUSY correctly

to the 4.19-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-seqiv-handle-ebusy-correctly.patch
and it can be found in the queue-4.19 subdirectory.

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



commit 05e9e6eef5007d6939c205b344b5080ebaa45a1f
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date:   Fri Jan 13 18:27:51 2023 +0800

    crypto: seqiv - Handle EBUSY correctly
    
    [ Upstream commit 32e62025e5e52fbe4812ef044759de7010b15dbc ]
    
    As it is seqiv only handles the special return value of EINPROGERSS,
    which means that in all other cases it will free data related to the
    request.
    
    However, as the caller of seqiv may specify MAY_BACKLOG, we also need
    to expect EBUSY and treat it in the same way.  Otherwise backlogged
    requests will trigger a use-after-free.
    
    Fixes: 0a270321dbf9 ("[CRYPTO] seqiv: Add Sequence Number IV Generator")
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/crypto/seqiv.c b/crypto/seqiv.c
index 39dbf2f7e5f5c..ca68608ab14e1 100644
--- a/crypto/seqiv.c
+++ b/crypto/seqiv.c
@@ -30,7 +30,7 @@ static void seqiv_aead_encrypt_complete2(struct aead_request *req, int err)
 	struct aead_request *subreq = aead_request_ctx(req);
 	struct crypto_aead *geniv;
 
-	if (err == -EINPROGRESS)
+	if (err == -EINPROGRESS || err == -EBUSY)
 		return;
 
 	if (err)



[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