mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] media: s2255: Fix firmware parsing OOB and cleanup coding style
@ 2026-07-16  2:23 Lei Huang
  2026-07-16  2:23 ` [PATCH v3 1/2] media: s2255: check firmware size before reading trailing marker Lei Huang
       [not found] ` <6a587498.8e904814.3310e.980c@mx.google.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Lei Huang @ 2026-07-16  2:23 UTC (permalink / raw)
  To: mchehab; +Cc: johan, hverkuil+cisco, linux-media, linux-kernel, Lei Huang

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-16 12:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-16  2:23 [PATCH v3 0/2] media: s2255: Fix firmware parsing OOB and cleanup coding style Lei Huang
2026-07-16  2:23 ` [PATCH v3 1/2] media: s2255: check firmware size before reading trailing marker Lei Huang
     [not found] ` <6a587498.8e904814.3310e.980c@mx.google.com>
2026-07-16 12:32   ` Re:Re: [v3,0/2] media: s2255: Fix firmware parsing OOB and cleanup coding style huanglei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®