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]
Date:   Thu, 4 Aug 2022 18:04:52 +0300
From:   Tariq Toukan <ttoukan.linux@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     Leon Romanovsky <leon@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Tariq Toukan <tariqt@...dia.com>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, kernel-janitors@...r.kernel.org,
        Lama Kayal <lkayal@...dia.com>,
        Saeed Mahameed <saeedm@...dia.com>,
        Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH net] net/mlx5e: Fix use after free in mlx5e_fs_init()



On 8/4/2022 5:43 PM, Dan Carpenter wrote:
> Call mlx5e_fs_vlan_free(fs) before kvfree(fs).
> 
> Fixes: af8bbf730068 ("net/mlx5e: Convert mlx5e_flow_steering member of mlx5e_priv to pointer")
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
> ---
> This applies to net but I never really understand how mellanox patches
> work...
> 

Hi Dan,
This patch belongs to next kernel (6.0).
It seems that net-next (or parts of it) is already merged into net as 
we're in the merge window.


>   drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
> index e2a9b9be5c1f..e0ce5a233d0b 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c
> @@ -1395,10 +1395,11 @@ struct mlx5e_flow_steering *mlx5e_fs_init(const struct mlx5e_profile *profile,
>   	}
>   
>   	return fs;
> -err_free_fs:
> -	kvfree(fs);
> +
>   err_free_vlan:
>   	mlx5e_fs_vlan_free(fs);
> +err_free_fs:
> +	kvfree(fs);
>   err:
>   	return NULL;
>   }

Reviewed-by: Tariq Toukan <tariqt@...dia.com>

Thanks for your patch!

Powered by blists - more mailing lists