Re: [PATCH] net/iavf: fix null pointer dereference in eCPRI FDIR pattern

Bruce Richardson <[email protected]>
Newsgroups org.dpdk.dev
Message-ID <[email protected]>
On Sun, Jul 19, 2026 at 08:34:12PM -0400, [email protected] wrote:
> From: Sandeep Penigalapati <[email protected]>
> 
> In iavf_fdir_parse_pattern(), the RTE_FLOW_ITEM_TYPE_ECPRI case reads
> ecpri_spec->hdr.common.u32 before checking that ecpri_spec is non-null.
> A wildcard eCPRI flow item (no spec) with a queue or drop action, which
> routes the rule to the FDIR engine, leaves item->spec as null, so the
> unconditional dereference crashes the application at rule creation.
> 
> Move the ecpri_common read inside the existing
> "if (ecpri_spec && ecpri_mask)" guard, mirroring the other pattern items
> and the RSS-hash parser in iavf_hash.c which already handles a null
> eCPRI spec. The rule is then rejected cleanly with -EINVAL.
> 
> Fixes: 6c37927479be ("net/iavf: support eCPRI message type 0 for flow director")
> Cc: [email protected]
> Signed-off-by: Sandeep Penigalapati <[email protected]>
Acked-by: Bruce Richardson <[email protected]>

Applied to dpdk-next-net-intel.
Thanks,
/Bruce
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.