diff options
| author | Antoine Tenart <atenart@kernel.org> | 2022-11-08 16:34:58 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-16 09:57:13 +0100 |
| commit | 1a4e495edfe25b42c0b59f809a8df97ad5a6eed3 (patch) | |
| tree | 2c7c54bb74720c60505b12b4efed6f19cee91411 /drivers | |
| parent | 4ad684ba028cfb5c4bf924e46855ef11c15aa5ae (diff) | |
| download | linux-1a4e495edfe25b42c0b59f809a8df97ad5a6eed3.tar.gz linux-1a4e495edfe25b42c0b59f809a8df97ad5a6eed3.tar.bz2 linux-1a4e495edfe25b42c0b59f809a8df97ad5a6eed3.zip | |
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@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/net/phy/mscc/mscc_macsec.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |
