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] [day] [month] [year] [list]
Date:   Wed, 14 Dec 2022 13:28:47 -0500
From:   "Theodore Ts'o" <tytso@....edu>
To:     Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>
Cc:     Eric Dumazet <edumazet@...gle.com>,
        "Jason A. Donenfeld" <Jason@...c4.com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Peter Zijlstra <peterz@...radead.org>,
        Joonsoo Kim <iamjoonsoo.kim@....com>,
        Roman Gushchin <roman.gushchin@...ux.dev>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Alexei Starovoitov <ast@...nel.org>,
        dri-devel@...ts.freedesktop.org, Song Liu <song@...nel.org>,
        linux-mtd@...ts.infradead.org, Stanislav Fomichev <sdf@...gle.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Hyeonggon Yoo <42.hyeyoo@...il.com>,
        Christoph Lameter <cl@...ux.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Richard Weinberger <richard@....at>, x86@...nel.org,
        John Fastabend <john.fastabend@...il.com>,
        Andrii Nakryiko <andrii@...nel.org>, ilay.bahat1@...il.com,
        Ingo Molnar <mingo@...hat.com>,
        David Rientjes <rientjes@...gle.com>,
        Yonghong Song <yhs@...com>, Paolo Abeni <pabeni@...hat.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        Petr Mladek <pmladek@...e.com>,
        david.keisarschm@...l.huji.ac.il,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        intel-gfx@...ts.freedesktop.org,
        Steven Rostedt <rostedt@...dmis.org>,
        KP Singh <kpsingh@...nel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Borislav Petkov <bp@...en8.de>, Hannes Reinecke <hare@...e.de>,
        Andy Lutomirski <luto@...nel.org>,
        Jiri Pirko <jiri@...dia.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        bpf@...r.kernel.org, Vlastimil Babka <vbabka@...e.cz>,
        Hao Luo <haoluo@...gle.com>, linux-scsi@...r.kernel.org,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-mm@...ck.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Pekka Enberg <penberg@...nel.org>,
        Sergey Senozhatsky <senozhatsky@...omium.org>,
        aksecurity@...il.com, Jiri Olsa <jolsa@...nel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 1/5] Renaming weak prng invocations -
 prandom_bytes_state, prandom_u32_state

On Wed, Dec 14, 2022 at 05:21:17PM +0100, Stanislaw Gruszka wrote:
> On Wed, Dec 14, 2022 at 04:15:49PM +0100, Eric Dumazet wrote:
> > On Wed, Dec 14, 2022 at 1:34 PM Stanislaw Gruszka
> > <stanislaw.gruszka@...ux.intel.com> wrote:
> > >
> > > On Mon, Dec 12, 2022 at 03:35:20PM +0100, Jason A. Donenfeld wrote:
> > > > Please CC me on future revisions.
> > > >
> > > > As of 6.2, the prandom namespace is *only* for predictable randomness.
> > > > There's no need to rename anything. So nack on this patch 1/5.
> > >
> > > It is not obvious (for casual developers like me) that p in prandom
> > > stands for predictable. Some renaming would be useful IMHO.

I disagree.  pseudo-random has *always* menat "predictable".  And the
'p' in prandom was originally "pseudo-random".  In userspace,
random(3) is also pseudo-random, and is ***utterly*** predictable.  So
the original use of prandom() was a bit more of an explicit nod to the
fact that prandom is something which is inherently predictable.

So I don't think it's needed to rename it, whether it's to
"predictable_rng_prandom_u32", or "no_you_idiot_dont_you_dare_use_it_for_cryptographi_purposes_prandom_u32".

I think we need to assume a certain base level of competence,
especially for someone who is messing with security psensitive kernel
code.  If a developer doesn't know that a prng is predictable, that's
probably the *least* of the sort of mistakes that they might make.

					- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ