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]
Date:   Wed, 11 Oct 2017 13:33:18 +0100
From:   Alan Cox <gnomes@...rguk.ukuu.org.uk>
To:     <Mario.Limonciello@...l.com>
Cc:     <pali.rohar@...il.com>, <dvhart@...radead.org>,
        <andy.shevchenko@...il.com>, <linux-kernel@...r.kernel.org>,
        <platform-driver-x86@...r.kernel.org>, <luto@...nel.org>,
        <quasisec@...gle.com>, <rjw@...ysocki.net>, <mjg59@...gle.com>,
        <hch@....de>, <greg@...ah.com>
Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices
 when requested by drivers

On Tue, 10 Oct 2017 19:24:11 +0000
<Mario.Limonciello@...l.com> wrote:

> > -----Original Message-----
> > From: Pali Rohár [mailto:pali.rohar@...il.com]
> > Sent: Tuesday, October 10, 2017 2:12 PM
> > To: Limonciello, Mario <Mario_Limonciello@...l.com>
> > Cc: dvhart@...radead.org; Andy Shevchenko <andy.shevchenko@...il.com>;
> > LKML <linux-kernel@...r.kernel.org>; platform-driver-x86@...r.kernel.org;
> > Andy Lutomirski <luto@...nel.org>; quasisec@...gle.com; rjw@...ysocki.net;
> > mjg59@...gle.com; hch@....de; Greg KH <greg@...ah.com>
> > Subject: Re: [PATCH v6 13/14] platform/x86: wmi: create character devices when
> > requested by drivers
> > 
> > On Monday 09 October 2017 17:51:51 Mario Limonciello wrote:  
> > > +	/* make sure we're not calling a higher instance than exists*/
> > > +	if (_IOC_NR(cmd) > wblock->gblock.instance_count - 1)
> > > +		return -EINVAL;  
> > 
> > Is this condition really working? instance_count is unsigned, cmd is
> > also unsigned... and when instance_count is zero, then IIRC error would
> > not be thrown.
> >   
> 
> But instance count can't be zero.  MOF would fall apart with a zero instance count.
> If a broken BIOS was shipped with an instance count of zero bigger problems would
> have happened.

Maybe but you can still write the test correctly using >= instead.

Alan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ