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: <CAEnQdOpKmQSH+CZFgqpfXBDpcntgjusw3-GEGrnLmgmUG9Fhmw@mail.gmail.com>
Date: Tue, 8 Apr 2025 23:20:24 +0800
From: henry martin <bsdhenrymartin@...il.com>
To: Mark Bloch <mbloch@...dia.com>
Cc: Markus Elfring <Markus.Elfring@....de>, Paolo Abeni <pabeni@...hat.com>, linux-rdma@...r.kernel.org, 
	netdev@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>, 
	Amir Tzin <amirtz@...dia.com>, Andrew Lunn <andrew+netdev@...n.ch>, Aya Levin <ayal@...dia.com>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Leon Romanovsky <leon@...nel.org>, Saeed Mahameed <saeedm@...dia.com>, 
	Simon Horman <horms@...nel.org>, Tariq Toukan <tariqt@...dia.com>
Subject: Re: [PATCH] net/mlx5: Fix null-ptr-deref in mlx5_create_inner_ttc_table()

Thank you for the review. This check will be kept, and I'll follow Paolo's
suggestion about adding a blank line before the return statements in the v2.


Mark Bloch <mbloch@...dia.com> 于2025年4月8日周二 23:01写道:
>
>
>
> On 08/04/2025 15:25, Markus Elfring wrote:
> > …
> >>> +++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_ttc.c
> >>> @@ -655,6 +655,8 @@ struct mlx5_ttc_table *mlx5_create_inner_ttc_table(struct mlx5_core_dev *dev,
> >>>     }
> >>>
> >>>     ns = mlx5_get_flow_namespace(dev, params->ns_type);
> >>> +   if (!ns)
> >>> +           return ERR_PTR(-EOPNOTSUPP);
> >>
> >> I suspect the ns_type the caller always sets a valid 'ns_type', so the
> >> NULL ptr is not really possible here.
> >
> > Is there a need to mark such a check result as “unlikely”?
> >
>
> Please don't. I'm fine with simply adding the check, as
> Paolo suggested. When TTC was originally introduced, its
> functionality was more limited, and reaching this point in the driver
> meant we could be certain the namespace existed. Now that TTC has
> become more advanced, adding this check makes sense and I'm okay with
> it.
>
> Mark
>
> > Regards,
> > Markus
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ