[PATCH v2] argparse: fix null dereference in corelist parsing
fengchengwen
fengchengwen at huawei.com
Mon Nov 16 12:35:34 CET 2026
Acked-by: Chengwen Feng <fengchengwen at huawei.com>
On 11/16/2026 4:58 PM, Artem Novikov wrote:
> Parsing a corelist without a value dereferences val_set even when no
> default is configured. This also occurs with
> rte_argparse_parse_type(NULL, RTE_ARGPARSE_VALUE_TYPE_CORELIST, &cpus).
>
> Return -EINVAL when the default is missing. Reject a NULL input string
> or output pointer in rte_argparse_parse_type() before parsing the value.
> Add regression tests for both parsing APIs and copying a configured
> default.
>
> Fixes: d78103fb9488 ("argparse: support core lists")
> Cc: stable at dpdk.org
>
> Signed-off-by: Artem Novikov <naa at amicon.ru>
More information about the dev
mailing list