[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHmME9qP2jwSk7o6EYGK_=vRntfLq6O1BcnH46ibt=Ypv3v-vw@mail.gmail.com>
Date: Sun, 16 Apr 2023 19:26:08 +0200
From: "Jason A. Donenfeld" <Jason@...c4.com>
To: david.keisarschm@...l.huji.ac.il
Cc: linux-kernel@...r.kernel.org,
Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
keescook@...omium.org, ilay.bahat1@...il.com, aksecurity@...il.com
Subject: Re: [PATCH v6 3/3] arch/x86/mm/kaslr: use siphash instead of prandom_bytes_state
On 4/16/23, david.keisarschm@...l.huji.ac.il
<david.keisarschm@...l.huji.ac.il> wrote:
> From: David Keisar Schmidt <david.keisarschm@...l.huji.ac.il>
>
> However, the seeding here is done by calling prandom_seed_state,
> which effectively uses only 32bits of the seed, which means that observing
> ONE
> region's offset (say 30 bits) can provide the attacker with 2 possible
> seeds
> (from which the attacker can calculate the remaining two regions)
>
> In order to fix it, we have replaced the two invocations of
> prandom_bytes_state and prandom_seed_state
> with siphash, which is considered more secure.
> Besides, the original code used the same pseudo-random number in every
> iteration,
> so to add some additional randomization
> we call siphash every iteration, hashing the iteration index with the
> described key.
>
>
Nack. Please don't add bespoke new RNG constructions willy nilly. I
just spent a while cleaning this kind of thing up.
Powered by blists - more mailing lists