Linux Media Controller development
 help / color / mirror / Atom feed
From: Jonathan Corbet <corbet@lwn.net>
To: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: dvb-frontends: ds3000: validate firmware size
Date: Sun, 30 Aug 2026 08:45:40 -0600	[thread overview]
Message-ID: <87o6ejll9n.fsf@trenco.lwn.net> (raw)
In-Reply-To: <20260830124034.95459-1-pengpeng@iscas.ac.cn>

Pengpeng Hou <pengpeng@iscas.ac.cn> writes:

> The firmware diagnostic reads the first two and final two bytes without
> proving that the firmware object contains at least two bytes.
>
> Reject undersized firmware before the diagnostic and upload path consume
> it.
>
> Fixes: 09ea33e5c696 ("V4L/DVB (13493): TeVii S470 and TBS 6920 fixes")
> Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
> ---
>  drivers/media/dvb-frontends/ds3000.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/dvb-frontends/ds3000.c b/drivers/media/dvb-frontends/ds3000.c
> index ce7ae424b27cc..76d2eb98932ae 100644
> --- a/drivers/media/dvb-frontends/ds3000.c
> +++ b/drivers/media/dvb-frontends/ds3000.c
> @@ -374,6 +374,8 @@ static int ds3000_load_firmware(struct dvb_frontend *fe,
>  	int ret = 0;
>  
>  	dprintk("%s\n", __func__);
> +	if (fw->size < 2)
> +		return -EINVAL;

So, you have generated an awful lot of fixes all over the tree in the
last few months.  Can you tell us about what tool you are using to find
and fix these bugs, and how you are testing your fixes?

Thanks,

jon

  reply	other threads:[~2026-08-30 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-30 12:39 [PATCH] media: dvb-frontends: ds3000: validate firmware size Pengpeng Hou
2026-08-30 14:45 ` Jonathan Corbet [this message]
2026-08-30 22:45   ` 侯朋朋
2026-08-30 23:06     ` Jonathan Corbet

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=87o6ejll9n.fsf@trenco.lwn.net \
    --to=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=pengpeng@iscas.ac.cn \
    /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