lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201230125628.GB13161@duo.ucw.cz>
Date:   Wed, 30 Dec 2020 13:56:28 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Laurent Pinchart <laurent.pinchart@...asonboard.com>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Pavel Machek <pavel@...x.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Stable <stable@...r.kernel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab+huawei@...nel.org>
Subject: Re: [PATCH 5.10 527/717] media: ipu3-cio2: Validate mbus format in
 setting subdev format

On Wed 2020-12-30 14:44:41, Laurent Pinchart wrote:
> On Wed, Dec 30, 2020 at 02:32:46PM +0200, Andy Shevchenko wrote:
> > On Wed, Dec 30, 2020 at 2:25 PM Pavel Machek wrote:
> > 
> > > > commit a86cf9b29e8b12811cf53c4970eefe0c1d290476 upstream.
> > > >
> > > > Validate media bus code, width and height when setting the subdev format.
> > > >
> > > > This effectively reworks how setting subdev format is implemented in the
> > > > driver.
> > >
> > > Something is wrong here:
> > >
> > > > +     fmt->format.code = formats[0].mbus_code;
> > > > +     for (i = 0; i < ARRAY_SIZE(formats); i++) {
> > 
> > Looks like 'i = 1' should be...
> > 
> > > > +             if (formats[i].mbus_code == fmt->format.code) {
> 
> More likely
> 
> 			if (formats[i].mbus_code == mbus_code) {
> 
> I think.

That looks reasonable, but I don't have hardware to test.

> Pavel, would you like to submit a patch ?

Done, should be in your inbox.

Best regards,
								Pavel
-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ