From: Lei Huang <huanglei@kylinos.cn>
Hi maintainers and reviewers,
This patch series includes two improvements for the s2255 USB driver,
specifically focusing on the s2255_probe() function.
Patch 1/2 fixes a potential out-of-bounds memory access vulnerability.
The driver previously read firmware marker data from the end of the blob
without validating the file size. If the firmware is smaller than 8 bytes,
this leads to an underflow and invalid memory access. This patch adds a
size check to ensure safe access.
Patch 2/2 is a cosmetic cleanup that renames CamelCase goto labels to
snake_case to comply with the Linux kernel coding style. This improves
readability and consistency with the rest of the kernel tree. While this
patch introduces no functional changes, it touches the same error-handling
paths modified in the first patch, so they are submitted together for
contextual clarity.
Lei Huang (2):
media: s2255: check firmware size before reading trailing marker
media: s2255: Rename CamelCase goto labels to snake_case
drivers/media/usb/s2255/s2255drv.c | 41 +++++++++++++++++-------------
1 file changed, 23 insertions(+), 18 deletions(-)
--
2.25.1