]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix macsec coverity issue at rx sa update
authorRaed Salem <raeds@nvidia.com>
Wed, 26 Oct 2022 13:51:50 +0000 (14:51 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 18:06:56 +0000 (11:06 -0700)
commit2ed6d47b6f720ad7329444be9dfc702d5c781648
treed4a4e925c30c8873b5978b5c8e1d5191899a97e7
parent728435480278017787fbc847cf8b9b05f4ac5a6d
net/mlx5e: Fix macsec coverity issue at rx sa update

The cited commit at update rx sa operation passes object attributes
to MACsec object create function without initializing/setting all
attributes fields leaving some of them with garbage values, therefore
violating the implicit assumption at create object function, which
assumes that all input object attributes fields are set.

Fix by initializing the object attributes struct to zero, thus leaving
unset fields with the legal zero value.

Fixes: 1adff4e96712 ("net/mlx5e: Add MACsec offload Rx command support")
Signed-off-by: Raed Salem <raeds@nvidia.com>
Reviewed-by: Lior Nahmanson <liorna@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Link: https://lore.kernel.org/r/20221026135153.154807-13-saeed@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c