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:	Sun, 29 Mar 2015 14:13:47 +0200
From:	Borislav Petkov <bp@...en8.de>
To:	Ingo Molnar <mingo@...nel.org>
Cc:	Denys Vlasenko <dvlasenk@...hat.com>,
	Andy Lutomirski <luto@...capital.net>,
	"H. Peter Anvin" <hpa@...or.com>,
	Brad Spengler <spender@...ecurity.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Andrew Lutomirski <luto@...nel.org>,
	"linux-tip-commits@...r.kernel.org" 
	<linux-tip-commits@...r.kernel.org>
Subject: Re: [PATCH] x86/asm/entry: Remove user_mode_ignore_vm86()

On Sun, Mar 29, 2015 at 11:02:34AM +0200, Ingo Molnar wrote:
> So how about doing the patch below?
> 
> Thanks,
> 
> 	Ingo
> 
> ===================================>
> From 6677d6f073cfda7f1036eb06d13faaad5c6742cc Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@...nel.org>
> Date: Sun, 29 Mar 2015 09:10:08 +0200
> Subject: [PATCH] x86/asm/entry: Remove user_mode_ignore_vm86()
> 
> user_mode_ignore_vm86() can be used instead of user_mode(), in
> places where we have already done a v8086_mode() security
> check of ptregs.
> 
> But doing this check in the wrong place would be a bug that could
> result in security problems, and also the naming still isn't very clear.
> 
> Furthermore, it only affects 32-bit kernels, while most development
> happens on 64-bit kernels.
> 
> If we replace them with user_mode() checks then the cost is only a
> very minor increase in various slowpaths:
> 
>    text             data   bss     dec              hex    filename
>    10573391         703562 1753042 13029995         c6d26b vmlinux.o.before
>    10573423         703562 1753042 13030027         c6d28b vmlinux.o.after
> 
> So lets get rid of this distinction once and for all.
> 
> Cc: Andy Lutomirski <luto@...capital.net>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: Denys Vlasenko <dvlasenk@...hat.com>
> Cc: H. Peter Anvin <hpa@...or.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>
> Cc: Oleg Nesterov <oleg@...hat.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Signed-off-by: Ingo Molnar <mingo@...nel.org>
> ---
>  arch/x86/include/asm/ptrace.h    | 17 -----------------
>  arch/x86/kernel/cpu/perf_event.c |  2 +-
>  arch/x86/kernel/traps.c          |  6 +++---
>  3 files changed, 4 insertions(+), 21 deletions(-)

I had some doubts about people using user_mode_ignore_vm86() in the
wrong way and thus introducing sec. bugs.

Since this is only on the slow path, simplifying the code makes sense to
me.

Acked-by: Borislav Petkov <bp@...e.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ