From: Lei Huang <huanglei814@163.com>
To: mchehab@kernel.org
Cc: johan@kernel.org, hverkuil+cisco@kernel.org,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Lei Huang <huanglei@kylinos.cn>
Subject: [PATCH v3 0/2] media: s2255: Fix firmware parsing OOB and cleanup coding style
Date: Thu, 16 Jul 2026 10:23:56 +0800 [thread overview]
Message-ID: <20260716022358.161471-1-huanglei814@163.com> (raw)
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
next reply other threads:[~2026-07-16 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 2:23 Lei Huang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260716022358.161471-1-huanglei814@163.com \
--to=huanglei814@163.com \
--cc=huanglei@kylinos.cn \
--cc=hverkuil+cisco@kernel.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®