numam-dpdk/drivers/common
Michael Baum a1d59091a6 common/mlx5: fix missing validation in devargs parsing
The rte_kvargs_parse function parses the arguments
"key=value,key=value,..." string and return an allocated structure that
contains a key/value list.
It enables also to send a key without value and updates the values in
the following ways:
 - "key=value,key,..." - value is updated as NULL.
 - "key=value,key=,..." - value is updated as "" (empty string).

Mlx5 PMDs use this function to parse, but they don't support key without
value. They send the value as an argument to strtol function.
When strtol gets NULL as a parameter it cause a crash, when it gets ""
(empty string) it returns 0.

Adds a check that will prevent an argument in these formats, and returns
an error for it.

Fixes: 8520992403 ("common/mlx5: share memory related devargs")
Cc: stable@dpdk.org

Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
2021-12-22 09:56:12 +01:00
..
cnxk common/cnxk: wait for XAQ pool to fill 2022-01-10 08:15:43 +01:00
cpt fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
dpaax fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
iavf fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
mlx5 common/mlx5: fix missing validation in devargs parsing 2021-12-22 09:56:12 +01:00
mvep drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
octeontx common/octeontx: enable build only on 64-bit Linux 2021-10-15 19:13:13 +02:00
qat fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
sfc_efx fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
meson.build drivers: remove octeontx2 drivers 2022-01-12 15:36:32 +01:00