Linux
iio: adc: xilinx-ams: fix out-of-bounds channel lookup in event handling
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.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= d5c70627a79455154f5f636096abe6fe57510605, < 116d1f8805ae2daadbac89d24da4c0da50b9edae
- >= d5c70627a79455154f5f636096abe6fe57510605, < 94d158985b6ea011bdc26186f42d662a156da6cb
- >= d5c70627a79455154f5f636096abe6fe57510605, < 1d24f14e049fdd769146dda026496ed23b397ed9
- >= d5c70627a79455154f5f636096abe6fe57510605, < 9ac3675bf875792dced45efbf47116719a7c097b
- >= d5c70627a79455154f5f636096abe6fe57510605, < 3c374d33f1338dbb5676919c5194caa9c5aa1631
- >= d5c70627a79455154f5f636096abe6fe57510605, < 947eb6f0a274f8b15a0248051a65b069effd5057
Fixed in 116d1f8805ae2daadbac89d24da4c0da50b9edae, 94d158985b6ea011bdc26186f42d662a156da6cb, 1d24f14e049fdd769146dda026496ed23b397ed9, 9ac3675bf875792dced45efbf47116719a7c097b, 3c374d33f1338dbb5676919c5194caa9c5aa1631, 947eb6f0a274f8b15a0248051a65b069effd5057
- 5.17
Fixed in 0, 6.1.178, 6.6.145, 6.12.97, 6.18.40, 7.1.5, 7.2
Mitigation
Upgrade Linux to 116d1f8805ae2daadbac89d24da4c0da50b9edae or 94d158985b6ea011bdc26186f42d662a156da6cb or 1d24f14e049fdd769146dda026496ed23b397ed9 or 9ac3675bf875792dced45efbf47116719a7c097b or 3c374d33f1338dbb5676919c5194caa9c5aa1631 or 947eb6f0a274f8b15a0248051a65b069effd5057 or later.
Upgrade Linux to 0 or 6.1.178 or 6.6.145 or 6.12.97 or 6.18.40 or 7.1.5 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.