Re: [PATCH net] net: pse-pd: Fix out of bound for loop

From: Simon Horman
Date: Tue Oct 15 2024 - 09:29:01 EST


On Tue, Oct 15, 2024 at 03:02:54PM +0200, Kory Maincent wrote:
> Adjust the loop limit to prevent out-of-bounds access when iterating over
> PI structures. The loop should not reach the index pcdev->nr_lines since
> we allocate exactly pcdev->nr_lines number of PI structures. This fix
> ensures proper bounds are maintained during iterations.
>
> Fixes: 9be9567a7c59 ("net: pse-pd: Add support for PSE PIs")
> Signed-off-by: Kory Maincent <kory.maincent@xxxxxxxxxxx>

Reviewed-by: Simon Horman <horms@xxxxxxxxxx>