lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZEEdY+qtAQQaFbZP@corigine.com>
Date:   Thu, 20 Apr 2023 13:09:23 +0200
From:   Simon Horman <simon.horman@...igine.com>
To:     Leon Romanovsky <leon@...nel.org>
Cc:     Jakub Kicinski <kuba@...nel.org>,
        Leon Romanovsky <leonro@...dia.com>,
        Emeel Hakim <ehakim@...dia.com>,
        Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org,
        Paolo Abeni <pabeni@...hat.com>, Raed Salem <raeds@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Steffen Klassert <steffen.klassert@...unet.com>
Subject: Re: [PATCH net-next 3/5] net/mlx5e: Compare all fields in IPv6
 address

On Thu, Apr 20, 2023 at 11:02:49AM +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@...dia.com>
> 
> Fix size argument in memcmp to compare whole IPv6 address.
> 
> Fixes: b3beba1fb404 ("net/mlx5e: Allow policies with reqid 0, to support IKE policy holes")
> Reviewed-by: Raed Salem <raeds@...dia.com>
> Reviewed-by: Emeel Hakim <ehakim@...dia.com>
> Signed-off-by: Leon Romanovsky <leonro@...dia.com>
> ---
>  drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
> index f7f7c09d2b32..4e9887171508 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.h
> @@ -287,7 +287,7 @@ static inline bool addr6_all_zero(__be32 *addr6)
>  {
>  	static const __be32 zaddr6[4] = {};
>  
> -	return !memcmp(addr6, zaddr6, sizeof(*zaddr6));
> +	return !memcmp(addr6, zaddr6, sizeof(zaddr6));

1. Perhaps array_size() is appropriate here?
2. It's a shame that ipv6_addr_any() or some other common helper
   can't be used.

>  }
>  #else
>  static inline void mlx5e_ipsec_init(struct mlx5e_priv *priv)
> -- 
> 2.40.0
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ