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

Leon Romanovsky
2026-04-13T14:46:15Z

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