Re: [PATCH v4] net/mlx5: Fix OOB access and stack information leak in PTP event handling

From: Leon Romanovsky

Date: Mon Apr 13 2026 - 10:46:40 EST


On Sun, Apr 12, 2026 at 01:04:10AM +0100, Prathamesh Deshpande wrote:
> In mlx5_pps_event(), several critical issues were identified:
>
> 1. The 'pin' index from the hardware event was used without bounds
> checking to index 'pin_config' and 'pps_info->start'. Check against
> MAX_PIN_NUM to prevent out-of-bounds access.

You were told more than once that this is impossible.

<...>

> + if (WARN_ON_ONCE(pin >= MAX_PIN_NUM))
> + return NOTIFY_OK;

Let's not add useless checks in fast path.

Thanks