lkml.org 
[lkml]   [2021]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] media: sq905.c: fix uninitialized variable
From
Date
Hi!

On Fri, 2021-03-26 at 08:14 +0100, 'Dmitry Vyukov' via syzkaller wrote:
> On Fri, Mar 26, 2021 at 8:11 AM Greg KH <gregkh@linuxfoundation.org>
> wrote:
> >
> > On Thu, Mar 25, 2021 at 11:22:02PM +0200, Alaa Emad wrote:
> > > Reported-by: syzbot+a4e309017a5f3a24c7b3@syzkaller.appspotmail.com
> > > Signed-off-by: Alaa Emad <alaaemadhossney.ae@gmail.com>
> > > ---
> >
> > I know I do not take patches with no changelog text, but other
> > maintainers might be more leniant :(
>
> I wonder if it's the right fix or not.
> Initializing variables will, of course, silence the warning, but it's
> not necessarily the right fix. I suspect there is something wrong in
> how ret/act_len are user/checked.
>

There is a problem in usb_bulk_msg() call. It could return before
act_len initialization, so i think, act_len should be intialized with
smth wrong like 0 or -1. BTW, I already send patch for that, but it was
marked as obsoleted.

--
With regards,

Pavel Skripkin

\
 
 \ /
  Last update: 2021-03-26 08:25    [W:0.056 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site