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] [day] [month] [year] [list]
Message-ID: <bb12f21b-8b36-4fd8-80a7-4a25221f6d18@gmail.com>
Date: Tue, 20 May 2025 14:14:15 +0300
From: Tariq Toukan <ttoukan.linux@...il.com>
To: Charles Han <hanchunchao@...pur.com>, saeedm@...dia.com, leon@...nel.org,
 andrew+netdev@...n.ch, davem@...emloft.net, edumazet@...gle.com,
 kuba@...nel.org, pabeni@...hat.com, roid@...dia.com, jianbol@...dia.com
Cc: linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
 Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH] net/mlx5: Add NULL check in
 mlx5e_tc_nic_create_miss_table


For EN driver changes, please use net/mlx5e prefix.

On 19/05/2025 14:27, Charles Han wrote:
> The mlx5e_tc_nic_create_miss_table() function did not check the
> return value of mlx5_get_flow_namespace(). This could lead to
> subsequent code using an invalid flow namespace pointer,
> potentially causing crashes or undefined behavior.
> 
> Fixes: 794131c40850 ("net/mlx5: E-Switch, Return EBUSY if can't get mode lock")

Tagged commit doesn't seem related.

> Signed-off-by: Charles Han <hanchunchao@...pur.com>
> ---

Explicitly mention target branch, and add the netdev mailing list.

>   drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> index f1d908f61134..81f0db29a2bb 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
> @@ -5213,6 +5213,10 @@ static int mlx5e_tc_nic_create_miss_table(struct mlx5e_priv *priv)
>   	ft_attr.level = MLX5E_TC_MISS_LEVEL;
>   	ft_attr.prio = 0;
>   	ns = mlx5_get_flow_namespace(priv->mdev, MLX5_FLOW_NAMESPACE_KERNEL);
> +	if (!ns) {
> +		mlx5_core_err(priv->mdev, "Failed to get flow namespace\n");
> +		return -EOPNOTSUPP;
> +	}
>   
>   	*ft = mlx5_create_auto_grouped_flow_table(ns, &ft_attr);
>   	if (IS_ERR(*ft)) {


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ