net: phy: mscc: macsec: clear encryption keys when freeing a flow
authorAntoine Tenart <atenart@kernel.org>
Tue, 8 Nov 2022 15:34:58 +0000 (16:34 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Nov 2022 08:58:22 +0000 (09:58 +0100)
commitfca3b0a1fd3ef30679da19bb1f17f1b3f045939e
tree5793785732a2baa7370e99342a010fa42d07c242
parent60a0af8813fddf3f1315e3dd79254a9b1845a294
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>
drivers/net/phy/mscc/mscc_macsec.c