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

Bruce Richardson bruce.richardson at intel.com
Thu Jul 23 13:12:33 CEST 2026


On Sun, Jul 19, 2026 at 08:34:12PM -0400, sandeep.penigalapati at intel.com wrote:
> From: Sandeep Penigalapati <sandeep.penigalapati at intel.com>
> 
> 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: stable at dpdk.org
> Signed-off-by: Sandeep Penigalapati <sandeep.penigalapati at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>

Applied to dpdk-next-net-intel.
Thanks,
/Bruce



More information about the dev mailing list