Linux Input/HID development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Breno Rodrigues Alves" <breno3011alves@gmail.com>
Cc: linux-clk@vger.kernel.org, dmitry.torokhov@gmail.com,
	linux-pci@vger.kernel.org, media-ci@linuxtv.org,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v6 3/4] media: dvb-core: remove defective and unsafe ULE debug block
Date: Sat, 05 Sep 2026 12:42:13 +0000	[thread overview]
Message-ID: <20260905124214.010D81F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260905123450.5620-3-breno3011alves@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] The patch claims to completely purge the unmaintained DVB_ULE_DEBUG code block due to severe lockless race conditions and buffer overflow vulnerabilities. Instead, it only renames the macro to `CONFIG_DVB_ULE_DEBUG`. This effectively connects the previously dormant code to the Kconfig build system, enabling the compilation of the vulnerable code and exposing the kernel to the exact vulnerabilities the patch claimed to mitigate.
--

commit dbd3a4787c312d697a3d80cb3e2c0e2207187d0b
Author: Breno Rodrigues Alves <breno3011alves@gmail.com>

media: dvb-core: remove defective and unsafe ULE debug block

Completely purge the unmaintained DVB_ULE_DEBUG code block from dvb_net.c
due to severe lockless race conditions and buffer overflow vulnerabilities
on global network state variables.

>     media: dvb-core: remove defective and unsafe ULE debug block
>     
>     Completely purge the unmaintained DVB_ULE_DEBUG code block from
>     dvb_net.c due to severe lockless race conditions and buffer overflow
>     vulnerabilities on global network state variables.

[Severity: Critical]
Does this patch actually purge the code block as stated in the commit
message? It appears the patch merely renames the macro to match the Kconfig
build system, which actively enables compiling the exact vulnerable code it
claims to mitigate.

> diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c
> index a2159b2bc1766..3b503695e3b64 100644
> --- a/drivers/media/dvb-core/dvb_net.c
> +++ b/drivers/media/dvb-core/dvb_net.c
[ ... ]
> @@ -320,7 +320,7 @@ static int dvb_net_ule_new_ts_cell(struct dvb_net_ule_handle *h)
>  {
>  	/* We are about to process a new TS cell. */
>  
> -#ifdef DVB_ULE_DEBUG
> +#ifdef CONFIG_DVB_ULE_DEBUG
>  	if (ule_where >= &ule_hist[100*TS_SZ])
>  		ule_where = ule_hist;
>  	memcpy(ule_where, h->ts, TS_SZ);

[Severity: Critical]
If compiled with CONFIG_DVB_ULE_DEBUG=y, will multiple concurrent threads
processing TS streams via dvb_net_ule_new_ts_cell() race on the ule_where
pointer? 

Since there is no synchronization, could multiple threads bypass the bounds
check and cause an out-of-bounds write on the ule_hist array?

[ ... ]
> @@ -659,7 +659,7 @@ static void dvb_net_ule_check_crc(struct dvb_net_ule_handle *h,
>  			h->ts_remain > 2 ?
>  				*(unsigned short *)h->from_where : 0);
>  
> -	#ifdef DVB_ULE_DEBUG
> +	#ifdef CONFIG_DVB_ULE_DEBUG
>  		hexdump(iov[0].iov_base, iov[0].iov_len);
>  		hexdump(iov[1].iov_base, iov[1].iov_len);
>  		hexdump(iov[2].iov_base, iov[2].iov_len);

[Severity: Critical]
Similarly, can concurrent reads on the global ule_where variable here result
in out-of-bounds memory reads while dvb_net_ule_new_ts_cell() modifies it?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260905123450.5620-1-breno3011alves@gmail.com?part=3

  reply	other threads:[~2026-09-05 12:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05 12:34 [PATCH v6 1/4] interconnect: mediatek: fix Makefile typo for mt8196 Breno Rodrigues Alves
2026-09-05 12:34 ` [PATCH v6 2/4] regulator: mtk-spmi: fix Makefile typo for mt6316 Breno Rodrigues Alves
2026-09-05 12:37   ` sashiko-bot
2026-09-05 12:34 ` [PATCH v6 3/4] media: dvb-core: remove defective and unsafe ULE debug block Breno Rodrigues Alves
2026-09-05 12:42   ` sashiko-bot [this message]
2026-09-05 12:34 ` [PATCH v6 4/4] tree-wide: purge verified remaining legacy ghost options Breno Rodrigues Alves
2026-09-05 12:40   ` sashiko-bot
2026-09-05 12:37 ` [PATCH v6 1/4] interconnect: mediatek: fix Makefile typo for mt8196 sashiko-bot

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=20260905124214.010D81F00A3D@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=breno3011alves@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=media-ci@linuxtv.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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