Re: [PATCH] qede: validate TPA aggregation indices from CQEs

From: Simon Horman

Date: Tue Mar 24 2026 - 13:57:31 EST


On Mon, Mar 23, 2026 at 03:24:15PM +0800, Pengpeng Hou wrote:
> The fast-path TPA handlers index rxq->tpa_info[] directly with the
> completion-provided tpa_agg_index field. That field is only a raw u8 in
> the CQE layout, while rxq->tpa_info has ETH_TPA_MAX_AGGS_NUM entries.
>
> Reject out-of-range indices before touching rxq->tpa_info[] and recycle
> the affected receive BDs instead of indexing past the fixed aggregation
> state array.

I'm not sure that we need to guard against out of range values here.
Can it actually happen?

>
> Signed-off-by: Pengpeng Hou <pengpeng@xxxxxxxxxxx>

...