Files
linux/drivers/media/usb/gspca
Dan Carpenter aef89c0b24 media: gspca: Add bounds checking to firmware parser
This sd_init() function reads the firmware.  The firmware data holds a
series of records and the function reads each record and sends the data
to the device.  The request_ihex_firmware() function
calls ihex_validate_fw() which ensures that the total length of all the
records won't read out of bounds of the fw->data[].

However, a potential issue is if there is a single very large
record (larger than PAGE_SIZE) and that would result in memory
corruption.  Generally we trust the firmware, but it's always better to
double check.

Fixes: 49b61ec9b5 ("[media] gspca: Add new vicam subdriver")
Cc: stable@vger.kernel.org
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2025-06-17 10:35:15 +02:00
..
2024-05-03 11:13:45 +01:00
2021-04-09 13:19:38 +02:00
2022-03-18 05:58:35 +01:00
2022-03-12 16:59:52 +01:00
2020-08-29 08:35:27 +02:00