iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ d5c70627a79455154f5f636096abe6fe57510605 · < 947eb6f0a274f8b15a0248051a65b069effd5057| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling
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.
From the CVE record · Linux
The Linux kernel's xilinx-ams ADC event handling can look past the end of its channel array when an event has no matching scan index. This can cause invalid memory access. The input does not specify whether an attacker can trigger it or what access or interaction would be required.
Engineers running Linux kernels with the xilinx-ams ADC driver should check their installations; affected versions were not provided.