Skip to content

Commit d3ecf03

Browse files
raed-salemkuba-moo
authored andcommitted
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: aae3454 ("net/mlx5e: Add MACsec offload Rx command support") Signed-off-by: Raed Salem <[email protected]> Reviewed-by: Lior Nahmanson <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent aefb62a commit d3ecf03

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/macsec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int mlx5e_macsec_update_rx_sa(struct mlx5e_macsec *macsec,
432432
bool active)
433433
{
434434
struct mlx5_core_dev *mdev = macsec->mdev;
435-
struct mlx5_macsec_obj_attrs attrs;
435+
struct mlx5_macsec_obj_attrs attrs = {};
436436
int err = 0;
437437

438438
if (rx_sa->active != active)

0 commit comments

Comments
 (0)