[PATCH 1/3] iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling

Guilherme Bozi guilherme.bozi em usp.br
Seg Maio 25 04:42:01 -03 2026


hi

On 14/04/2026 05:45, Guilherme Ivo Bozi wrote:
> ams_event_to_channel() may return a pointer past the end of
> dev->channels when no matching scan_index is found. This can lead
> to invalid memory access in ams_handle_event().
>
> Add a bounds check in ams_event_to_channel() and return NULL when
> no channel is found. Also guard the caller to safely handle this
> case.
>
> Fixes: <d5c70627a79455154f5f636096abe6fe57510605>
> Signed-off-by: Guilherme Ivo Bozi <guilherme.bozi em usp.br>
test reply-to


Mais detalhes sobre a lista de discussão kernel