Patch "net: phy: mscc: macsec: clear encryption keys when freeing a flow" has been added to the 6.0-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

    net: phy: mscc: macsec: clear encryption keys when freeing a flow

to the 6.0-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:
     net-phy-mscc-macsec-clear-encryption-keys-when-freei.patch
and it can be found in the queue-6.0 subdirectory.

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



commit c93c52027e4e42cf4157d3de9805a1464ef22ee4
Author: Antoine Tenart <atenart@xxxxxxxxxx>
Date:   Tue Nov 8 16:34:58 2022 +0100

    net: phy: mscc: macsec: clear encryption keys when freeing a flow
    
    [ Upstream commit 1b16b3fdf675cca15a537572bac50cc5354368fc ]
    
    Commit aaab73f8fba4 ("macsec: clear encryption keys from the stack after
    setting up offload") made sure to clean encryption keys from the stack
    after setting up offloading, but the MSCC PHY driver made a copy, kept
    it in the flow data and did not clear it when freeing a flow. Fix this.
    
    Fixes: 28c5107aa904 ("net: phy: mscc: macsec support")
    Signed-off-by: Antoine Tenart <atenart@xxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/mscc/mscc_macsec.c b/drivers/net/phy/mscc/mscc_macsec.c
index b7b2521c73fb..c00eef457b85 100644
--- a/drivers/net/phy/mscc/mscc_macsec.c
+++ b/drivers/net/phy/mscc/mscc_macsec.c
@@ -632,6 +632,7 @@ static void vsc8584_macsec_free_flow(struct vsc8531_private *priv,
 
 	list_del(&flow->list);
 	clear_bit(flow->index, bitmap);
+	memzero_explicit(flow->key, sizeof(flow->key));
 	kfree(flow);
 }
 



[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