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: <03c0d0b106954d24aba1f7417a41349f@AcuMS.aculab.com>
Date:   Wed, 24 Nov 2021 12:55:33 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Ido Schimmel' <idosch@...sch.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "nikolay@...dia.com" <nikolay@...dia.com>,
        "roopa@...dia.com" <roopa@...dia.com>,
        "bernard@...o.com" <bernard@...o.com>,
        "mlxsw@...dia.com" <mlxsw@...dia.com>,
        Ido Schimmel <idosch@...dia.com>
Subject: RE: [PATCH net-next] net: bridge: Allow base 16 inputs in sysfs

From: Ido Schimmel
> Sent: 24 November 2021 10:11
>
> Cited commit converted simple_strtoul() to kstrtoul() as suggested by
> the former's documentation. However, it also forced all the inputs to be
> decimal resulting in user space breakage.
> 
> Fix by setting the base to '0' so that the base is automatically
> detected.

Do both functions ignore leading whitespace?

I recently had to fix some code that did:
	if (write(sys_class_led_fd, on ? "255" : "  0", 3) != 3)
		return error.
I'm pretty sure I'd tested it before and it worked ok.
But I had to use "000" with a later kernel.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ