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: <YhMNZQb6S+qV+NR6@sol.localdomain>
Date:   Sun, 20 Feb 2022 19:56:21 -0800
From:   Eric Biggers <ebiggers@...nel.org>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
        tytso@....edu, linux@...inikbrodowski.net
Subject: Re: [PATCH v2 9/9] random: remove outdated INT_MAX >> 6 check in
 urandom_read()

On Wed, Feb 09, 2022 at 02:19:19AM +0100, Jason A. Donenfeld wrote:
> In 79a8468747c5 ("random: check for increase of entropy_count because of
> signed conversion"), a number of checks were added around what values
> were passed to account(), because account() was doing fancy fixed point
> fractional arithmetic, and a user had some ability to pass large values
> directly into it. One of things in that commit was limiting those values
> to INT_MAX >> 6.
> 
> However, for several years now, urandom reads no longer touch entropy
> accounting, and so this check serves no purpose. The current flow is:
> 
> urandom_read_nowarn()-->get_random_bytes_user()-->chacha20_block()
> 
> We arrive at urandom_read_nowarn() in the first place either via
> ordinary fops, which limits reads to MAX_RW_COUNT, or via getrandom()
> which limits reads to INT_MAX.
> 
> Cc: Theodore Ts'o <tytso@....edu>
> Cc: Dominik Brodowski <linux@...inikbrodowski.net>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
>  drivers/char/random.c | 1 -
>  1 file changed, 1 deletion(-)
> 

Reviewed-by: Eric Biggers <ebiggers@...gle.com>

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ