mbox series

[0/2] mlx5: fix miss NULL check in devargs parsing

Message ID 20221024123335.3163331-1-michaelba@nvidia.com (mailing list archive)
Headers
Series mlx5: fix miss NULL check in devargs parsing |

Message

Michael Baum Oct. 24, 2022, 12:33 p.m. UTC
  The MLX5 PMD parses the devargs in several places.
It gets structure called "devargs" as a member of EAL device containing
all needed information.

When "devargs" structure is invalid, the PMD avoids parsing it.
However, when it valid but its field "args" is invalid, the PMD tries to
parse it and dereference to NULL pointer.

Those patches add checks to avoid these NULL dereferencing.


Michael Baum (2):
  common/mlx5: fix miss null check in devargs parsing
  net/mlx5: fix miss null check in ETH devargs parsing

 drivers/common/mlx5/mlx5_common.c | 8 +++++---
 drivers/net/mlx5/linux/mlx5_os.c  | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
  

Comments

Raslan Darawsheh Oct. 25, 2022, 1:54 p.m. UTC | #1
Hi,

> -----Original Message-----
> From: Michael Baum <michaelba@nvidia.com>
> Sent: Monday, October 24, 2022 3:34 PM
> To: dev@dpdk.org
> Cc: Matan Azrad <matan@nvidia.com>; Raslan Darawsheh
> <rasland@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>
> Subject: [PATCH 0/2] mlx5: fix miss NULL check in devargs parsing
> 
> The MLX5 PMD parses the devargs in several places.
> It gets structure called "devargs" as a member of EAL device containing all
> needed information.
> 
> When "devargs" structure is invalid, the PMD avoids parsing it.
> However, when it valid but its field "args" is invalid, the PMD tries to parse it
> and dereference to NULL pointer.
> 
> Those patches add checks to avoid these NULL dereferencing.
> 
> 
> Michael Baum (2):
>   common/mlx5: fix miss null check in devargs parsing
>   net/mlx5: fix miss null check in ETH devargs parsing
> 
>  drivers/common/mlx5/mlx5_common.c | 8 +++++---
> drivers/net/mlx5/linux/mlx5_os.c  | 2 +-
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> --
> 2.25.1

Series applied to next-net-mlx,

Kindest regards,
Raslan Darawsheh