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]
Date:	Tue, 12 Jul 2016 11:03:02 -0700
From:	Andy Lutomirski <luto@...capital.net>
To:	Dave Hansen <dave.hansen@...el.com>
Cc:	"kernel-hardening@...ts.openwall.com" 
	<kernel-hardening@...ts.openwall.com>, X86 ML <x86@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	linux-arch <linux-arch@...r.kernel.org>,
	Borislav Petkov <bp@...en8.de>,
	Nadav Amit <nadav.amit@...il.com>,
	Kees Cook <keescook@...omium.org>,
	Brian Gerst <brgerst@...il.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Josh Poimboeuf <jpoimboe@...hat.com>,
	Jann Horn <jann@...jh.net>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	Andy Lutomirski <luto@...nel.org>
Subject: Re: [kernel-hardening] [PATCH v5 13/32] x86/mm/64: In
 vmalloc_fault(), use CR3 instead of current->active_mm

On Tue, Jul 12, 2016 at 10:51 AM, Dave Hansen <dave.hansen@...el.com> wrote:
> On 07/11/2016 01:53 PM, Andy Lutomirski wrote:
>> If we get a vmalloc fault while current->active_mm->pgd doesn't
>> match CR3, we'll crash without this change.  I've seen this failure
>> mode on heavily instrumented kernels with virtually mapped stacks.
>
> When does this happen, btw?  Crossing page boundaries on the stack
> between the time we swap mm's and the time we switch stacks?

This can happen for any vmalloc fault between the mm swap and writing
to current or current->active_mm.  I hit it when playing with KASAN
during the first clone.  (KASAN has other issues, but this was one of
them AFAICT.)

--Andy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ