macsec: clear encryption keys from the stack after setting up offload
stable inclusion from stable-v5.10.155 commit adaa0f180de5236e086ddab6476c4364d922f1fd category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7M5F4 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=adaa0f180de5236e086ddab6476c4364d922f1fd -------------------------------- [ Upstream commit aaab73f8 ] macsec_add_rxsa and macsec_add_txsa copy the key to an on-stack offloading context to pass it to the drivers, but leaves it there when it's done. Clear it with memzero_explicit as soon as it's not needed anymore. Fixes: 3cf3227a ("net: macsec: hardware offloading infrastructure") Signed-off-by:Sabrina Dubroca <sd@queasysnail.net> Reviewed-by:
Antoine Tenart <atenart@kernel.org> Reviewed-by:
Leon Romanovsky <leonro@nvidia.com> Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment