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  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]
Date:   Mon, 28 Dec 2020 11:14:11 +0800 (GMT+08:00)
From:   dinghao.liu@....edu.cn
To:     "Leon Romanovsky" <leon@...nel.org>
Cc:     kjlu@....edu, "Saeed Mahameed" <saeedm@...dia.com>,
        "David S. Miller" <davem@...emloft.net>,
        "Jakub Kicinski" <kuba@...nel.org>, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: Re: [PATCH] net/mlx5e: Fix two double free cases

> On Mon, Dec 21, 2020 at 04:50:31PM +0800, Dinghao Liu wrote:
> > mlx5e_create_ttc_table_groups() frees ft->g on failure of
> > kvzalloc(), but such failure will be caught by its caller
> > in mlx5e_create_ttc_table() and ft->g will be freed again
> > in mlx5e_destroy_flow_table(). The same issue also occurs
> > in mlx5e_create_ttc_table_groups().
> >
> > Signed-off-by: Dinghao Liu <dinghao.liu@....edu.cn>
> > ---
> >  drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> I'm not thrilled to see release in the error flow that will be done in
> the different function. The missing piece is "ft->g = NULL" after kfree().
> 
> And also fixes lines are missing in all your patches.
> 

Thank you for your advice! I will resend a new patch soon.

Regards,
Dinghao

Powered by blists - more mailing lists