All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: dwlsalmeida@gmail.com, mchehab@kernel.org, linmag7@gmail.com,
	linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	syzbot+96f901260a0b2d29cd1a@syzkaller.appspotmail.com
Subject: Re: [PATCH] media: vidtv: fix uninitialized args.buf_sz passed by value
Date: Thu, 19 Feb 2026 11:17:55 +0100	[thread overview]
Message-ID: <m28qcpyr3g.fsf@gmail.com> (raw)
In-Reply-To: <20260218141123-d54e3a23-c3dc-4ce7-8a8f-1d77fa4c7960@linutronix.de>

On Wed, Feb 18, 2026 at 14:24 +0100, Thomas Weißschuh wrote:

Hi Thomas,

Thank you for the feedback.

> Hi Abd-Alrhman!
>
> On Mon, Feb 16, 2026 at 10:17:03PM +0100, Abd-Alrhman Masalkhi wrote:
>> vidtv_ts_null_write_into() takes null_packet_write_args by value,
>> causing MSAN to report an uninit-value warning on buf_sz inside
>> the function.
>> 
>> Fix by passing the struct by pointer instead, avoiding the stack copy
>> entirely.
>> 
>> Reported-by: syzbot+96f901260a0b2d29cd1a@syzkaller.appspotmail.com
>> Closes: https://syzkaller.appspot.com/bug?extid=96f901260a0b2d29cd1a
>> Fixes: cd7a5651db26 ("alpha: add missing address argument in call to page_table_check_pte_clear()")
>
> The Fixes tag should point to the commit which originally introduced
> the issue that is being fixed. My commit for alpha-specific code is
> unlikely to be the root cause because a) syscaller is not running alpha
> systems and b) the first occurrence of the syscaller was before my patch
> was picked up by Linus. So please try to find a better Fixes tag.
>
I will fix the Fixes tag to point to the correct vidtv commit.

>> Signed-off-by: Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>
>> ---
>>  drivers/media/test-drivers/vidtv/vidtv_mux.c |  2 +-
>>  drivers/media/test-drivers/vidtv/vidtv_ts.c  | 18 +++++++++---------
>>  drivers/media/test-drivers/vidtv/vidtv_ts.h  |  2 +-
>>  3 files changed, 11 insertions(+), 11 deletions(-)
>> 
>> diff --git a/drivers/media/test-drivers/vidtv/vidtv_mux.c b/drivers/media/test-drivers/vidtv/vidtv_mux.c
>> index f99878eff7ac..67a580396112 100644
>> --- a/drivers/media/test-drivers/vidtv/vidtv_mux.c
>> +++ b/drivers/media/test-drivers/vidtv/vidtv_mux.c
>> @@ -363,7 +363,7 @@ static u32 vidtv_mux_pad_with_nulls(struct vidtv_mux *m, u32 npkts)
>>  	args.continuity_counter = &ctx->cc;
>>  
>>  	for (i = 0; i < npkts; ++i) {
>> -		m->mux_buf_offset += vidtv_ts_null_write_into(args);
>> +		m->mux_buf_offset += vidtv_ts_null_write_into(&args);
>
> Please explain in the commit message why this is change is safe to do.
> Modifying shared data might break the logic. (I have not verified this)
>
vidtv_ts_null_write_into() only reads from the struct and does not
modify it. should I add a const qualifier to the parameter? 

>>  		args.dest_offset  = m->mux_buf_offset;
>>  	}
>
> (...)
>
> Did have syscaller test this patch before submission?
> See the following documentation from the report:
>
> 	If you want syzbot to run the reproducer, reply with:
> 	#syz test: git://repo/address.git branch-or-commit-hash
> 	If you attach or paste a git patch, syzbot will apply it before testing.
>
I will test with syzbot before sending v2.

>
> Thomas

-- 
Best Regards,
Abd-Alrhman

  reply	other threads:[~2026-02-19 10:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-16 21:17 [PATCH] media: vidtv: fix uninitialized args.buf_sz passed by value Abd-Alrhman Masalkhi
2026-02-18 13:24 ` Thomas Weißschuh
2026-02-19 10:17   ` Abd-Alrhman Masalkhi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-02-20 13:39 Ding Yihan
2026-02-20 13:56 ` Thomas Weißschuh
2026-02-20 14:58   ` Abd-Alrhman Masalkhi
2026-02-20 16:32     ` Thomas Weißschuh
2026-02-20 14:53 ` Abd-Alrhman Masalkhi
2026-02-21 10:31 ` Abd-Alrhman Masalkhi

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=m28qcpyr3g.fsf@gmail.com \
    --to=abd.masalkhi@gmail.com \
    --cc=dwlsalmeida@gmail.com \
    --cc=linmag7@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=syzbot+96f901260a0b2d29cd1a@syzkaller.appspotmail.com \
    --cc=thomas.weissschuh@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.