[lvc-project] [Intel-wired-lan] [PATCH v3] i40e: Add checking for null for nlmsg_find_attr()

G, GurucharanX gurucharanx.g at intel.com
Tue Feb 7 13:48:14 MSK 2023



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Natalia Petrova
> Sent: Wednesday, February 1, 2023 2:36 PM
> To: Brandeburg, Jesse <jesse.brandeburg at intel.com>
> Cc: lvc-project at linuxtesting.org; intel-wired-lan at lists.osuosl.org; Natalia
> Petrova <n.petrova at fintech.ru>; linux-kernel at vger.kernel.org; Eric
> Dumazet <edumazet at google.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; netdev at vger.kernel.org; Jakub Kicinski
> <kuba at kernel.org>; Paolo Abeni <pabeni at redhat.com>; David S. Miller
> <davem at davemloft.net>
> Subject: [Intel-wired-lan] [PATCH v3] i40e: Add checking for null for
> nlmsg_find_attr()
> 
> The result of nlmsg_find_attr() 'br_spec' is dereferenced in
> nla_for_each_nested(), but it can take NULL value in nla_find() function,
> which will result in an error.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 51616018dd1b ("i40e: Add support for getlink, setlink ndo ops")
> Signed-off-by: Natalia Petrova <n.petrova at fintech.ru>
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
> ---
> v3: Fixed mailing list.
> v2: The remark about the error code by Simon Horman
> <simon.horman at corigine.com> was taken into account; return value -
> ENOENT was changed to -EINVAL.
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 

Tested-by: Gurucharan G <gurucharanx.g at intel.com> (A Contingent worker at Intel)



More information about the lvc-project mailing list