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

From: Paolo Abeni

Date: Thu Mar 26 2026 - 07:14:39 EST


On 3/24/26 6:57 PM, Simon Horman wrote:
> 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?

Seconding Simon's opinion: it looks like such bad values can be possible
only due memory corruption or the H/W going wild. In both case the real
problem is somewhere else.

If you have a good explanation for the root cause, please add to the
commit message together with a suitable fixes tag and re-submit.

/P