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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202601151635.9C323403@keescook>
Date: Thu, 15 Jan 2026 16:43:46 -0800
From: Kees Cook <kees@...nel.org>
To: "Rafael V. Volkmer" <rafael.v.volkmer@...il.com>
Cc: "Gustavo A . R . Silva" <gustavoars@...nel.org>,
	linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/2] overflow: extend shift helpers and add size_shl()

On Fri, Nov 28, 2025 at 12:38:28AM -0300, Rafael V. Volkmer wrote:
> while experimenting with check_shl_overflow() on an architecture with
> native __int128 support, I noticed that the helper always reports
> overflow as soon as the promoted type of @a/@d is wider than 64 bits,
> even when *@d is actually able to represent the shifted value.

Ah, whoops. Yeah. Can you add some tests for int128 to
lib/tests/overflow_kunit.c (see how check_one_op() uses:
	check_ ## op ## _overflow

there's a bunch of type checking in there but nothing uses int128, so
there might be more than just shl?

> On a toolchain and architecture that support __int128, this reports

What's the right way to attempt such testing?

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ