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: <f9f56006-8490-43cb-a622-6e95c3af1d24@auristor.com>
Date: Fri, 30 May 2025 08:43:00 -0400
From: Jeffrey E Altman <jaltman@...istor.com>
To: Su Hui <suhui@...china.com>, dhowells@...hat.com, marc.dionne@...istor.com
Cc: linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org,
 kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] afs: Replace simple_strtoul with kstrtoul in
 afs_parse_address

On 5/30/2025 6:29 AM, Su Hui wrote:
> On 5/30/25 7:35 AM, Jeffrey E Altman wrote:
>>
>> Do you see an overflow condition which would not be caught by those 
>> checks which would be caught by use of kstrtoul()?
> Actually, no example in reality.
> If p can equal to '0xffffffffffffffff0000000000000001', 
> simple_strtoul() and kstroul() all transform 'p' to unsigned long 
> value '0x1'.
> But kstrtoul() return an error and we can know overflow happens.  If 
> 'p' can be a very long string, kstroul() make sense.
>
The expected use case is for the input string not to exceed 3 
characters.  The valid range is decimal 0 to 128.  That could be 
enforced by switching to simple_strntoul() and relying upon the existing 
checks.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4276 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ