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] [day] [month] [year] [list]
Message-ID: <20200425070714.GA21938@amd>
Date:   Sat, 25 Apr 2020 09:07:14 +0200
From:   Pavel Machek <pavel@...x.de>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Andy Shevchenko <andy.shevchenko@...il.com>,
        Sascha Hauer <kernel@...gutronix.de>,
        "open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Jiri Slaby <jslaby@...e.com>,
        Linux LED Subsystem <linux-leds@...r.kernel.org>,
        Dan Murphy <dmurphy@...com>
Subject: Re: [PATCH v6 1/4] lib: new helper kstrtodev_t()

Hi!

> > > > Why simple_strto*() can't be used?
> > >
> > > I didn't really consider it, but looking in more detail I don't like it
> > > much. Without having tried it I think simple_strtoull accepts
> > > "1000000000000000000000000000000000000000000" returning some arbitrary
> > > value without an error indication.
> > 
> > So what? User has a lot of possibilities to shoot into the foot.
> > Since you interpret this as device major:minor, not founding a device
> > will be first level of error, next one when your code will try to do
> > something out of it. It shouldn't be a problem of kstrtox generic
> > helpers.
> 
> I fail to follow your argument here. In my eyes if the user writes a
> valid major:minor it should work, and if they write an invalid one this
> should result in an error and not a usage of a device that just happens
> to have the major:minor that simple_strtoull happens to return for the
> two components.

Yes please. We don't allow feet shooting where it is easy to prevent,
and that is the case here.

Best regards,
									Pavel

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ