Patch "crypto: mxs-dcp - Ensure payload is zero when using key slot" has been added to the 6.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: mxs-dcp - Ensure payload is zero when using key slot

to the 6.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-mxs-dcp-ensure-payload-is-zero-when-using-key.patch
and it can be found in the queue-6.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 54227e4ed9b28b7255c76deac5fede8f83ead644
Author: David Gstir <david@xxxxxxxxxxxxx>
Date:   Wed Jul 3 14:49:58 2024 +0200

    crypto: mxs-dcp - Ensure payload is zero when using key slot
    
    [ Upstream commit dd52b5eeb0f70893f762da7254e923fd23fd1379 ]
    
    We could leak stack memory through the payload field when running
    AES with a key from one of the hardware's key slots. Fix this by
    ensuring the payload field is set to 0 in such cases.
    
    This does not affect the common use case when the key is supplied
    from main memory via the descriptor payload.
    
    Signed-off-by: David Gstir <david@xxxxxxxxxxxxx>
    Reported-by: kernel test robot <lkp@xxxxxxxxx>
    Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
    Closes: https://lore.kernel.org/r/202405270146.Y9tPoil8-lkp@xxxxxxxxx/
    Fixes: 3d16af0b4cfa ("crypto: mxs-dcp: Add support for hardware-bound keys")
    Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/crypto/mxs-dcp.c b/drivers/crypto/mxs-dcp.c
index 057d73c370b73..c82775dbb557a 100644
--- a/drivers/crypto/mxs-dcp.c
+++ b/drivers/crypto/mxs-dcp.c
@@ -225,7 +225,8 @@ static int mxs_dcp_start_dma(struct dcp_async_ctx *actx)
 static int mxs_dcp_run_aes(struct dcp_async_ctx *actx,
 			   struct skcipher_request *req, int init)
 {
-	dma_addr_t key_phys, src_phys, dst_phys;
+	dma_addr_t key_phys = 0;
+	dma_addr_t src_phys, dst_phys;
 	struct dcp *sdcp = global_sdcp;
 	struct dcp_dma_desc *desc = &sdcp->coh->desc[actx->chan];
 	struct dcp_aes_req_ctx *rctx = skcipher_request_ctx(req);




[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