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: <YfQhrA6P15KQTsrS@linutronix.de>
Date:   Fri, 28 Jan 2022 18:02:36 +0100
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
Cc:     Jonathan Neuschäfer <j.neuschaefer@....net>,
        Andy Lutomirski <luto@...capital.net>,
        LKML <linux-kernel@...r.kernel.org>,
        Theodore Ts'o <tytso@....edu>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
        Waiman Long <longman@...hat.com>,
        Boqun Feng <boqun.feng@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: "BUG: Invalid wait context" in invalidate_batched_entropy

On 2022-01-28 17:28:47 [+0100], Jason A. Donenfeld wrote:
> Hi Sebastian,
Hi Jason,

> Gotcha. Surely, then, Andy's patch at least goes some of the way
> toward fixing this, since it outright _removes_ a spinlock_t. There is
> still the other spinlock_t that you want removed, I realize, though
> this doesn't appear to be the one from Jonathan's bug report. It
> sounds like Andy's patch might be one side of the fix, and your patch
> the other?

Only if we want to keep that lock a raw_spinlock_t. And this change
extends your IRQ-off region. Before I was only worried about that one
lock and all the callers. Now we have a little more possibilities.

>From looking at get_random_u32(), the whole worst case includes the
whole of extract_crng(). So we have the possible call chain
crng_reseed() -> crng_finalize_init() and here we have
wake_up_interruptible() and kill_fasync() which both can't be called
with disabled interrupts.

> Jason

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ