diff options
| author | Sam Daly <sam@samdaly.ie> | 2026-05-14 19:23:21 +0300 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2026-05-15 17:33:27 +0300 |
| commit | 307dc4240bd41852d9e0912921e298160db1c109 (patch) | |
| tree | 0588323b1b509307827c271b128eb9dc9ade5aa5 /scripts/Makefile.thinlto | |
| parent | a5b7991d5a737df71a5e4230554481255af64ed4 (diff) | |
| download | linux-307dc4240bd41852d9e0912921e298160db1c109.tar.xz | |
iio: light: veml6075: add bounds check to veml6075_it_ms index
veml6075_it_ms has 5 elements but VEML6075_CONF_IT can yield values 0-7.
If it returns a value >= 5, this causes an out-of-bounds array access.
Add a bounds check and return -EINVAL if the index is out of range.
The problem values are reserved so should never be read from the
register. Hence this is hardening against fault device, missprogramming
or bus corruption.
Assisted-by: gkh_clanker_2000
Cc: stable <stable@kernel.org>
Signed-off-by: Sam Daly <sam@samdaly.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
