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: <417e3654-27bf-4fc4-8adb-36ec6010f027@zytor.com>
Date: Tue, 20 Jan 2026 12:24:07 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: David Desobry <david.desobry@...malgen.com>,
        Borislav Petkov <bp@...en8.de>
Cc: tglx@...nel.org, mingo@...hat.com, dave.hansen@...ux.intel.com,
        x86@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/lib: Fix num_digits() signed overflow for INT_MIN

On 2026-01-20 12:16, David Desobry wrote:
> I haven't hit this corner case in practice; I was just auditing the code and
> noticed the corner case overflow leading to wrong logic.
> Then in a v2 version I brought some design improvement (switch case).

The switch is a good improvement. I would say, though, that if we don't need
signed input then we should just take out the minus handling code and have the
function take an unsigned int as input.

	-hpa


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ