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: <alpine.DEB.2.21.1808301535110.1210@nanos.tec.linutronix.de>
Date:   Thu, 30 Aug 2018 15:36:46 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Nadav Amit <nadav.amit@...il.com>
cc:     Andy Lutomirski <luto@...nel.org>, x86@...nel.org,
        Borislav Petkov <bp@...en8.de>,
        Rik van Riel <riel@...riel.com>,
        Jann Horn <jannh@...gle.com>,
        LKML <linux-kernel@...r.kernel.org>, stable@...r.kernel.org,
        Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v2] x86/nmi: Fix some races in NMI uaccess

On Wed, 29 Aug 2018, Nadav Amit wrote:
> at 8:47 AM, Andy Lutomirski <luto@...nel.org> wrote:
> 
> > In NMI context, we might be in the middle of context switching or in
> > the middle of switch_mm_irqs_off().  In either case, CR3 might not
> > match current->mm, which could cause copy_from_user_nmi() and
> > friends to read the wrong memory.
> > 
> > Fix it by adding a new nmi_uaccess_okay() helper and checking it in
> > copy_from_user_nmi() and in __copy_from_user_nmi()'s callers.
> > 
> > Cc: stable@...r.kernel.org
> > Cc: Peter Zijlstra <peterz@...radead.org>
> > Cc: Nadav Amit <nadav.amit@...il.com>
> > Signed-off-by: Andy Lutomirski <luto@...nel.org>
> > ---
> > 
> > Nadav, this is intended for your series.  Want to add it right
> > before the use_temporary_mm() stuff?
> 
> Sure. Thanks! I will apply the following small fix:
> 
> > +
> > +#ifdef CONFIG_DEBUG_VM
> > +	WARN_ON_ONCE(!loaded_mm);
> > +#endif
> 
> Will be changed to VM_WARN_ON_ONCE() in the two instances.

Unless I'm completely lost, this can just be applied to tip right
away. It's not depending on anything else.

Thanks,

	tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ