]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/fsgsbase/64: Fully initialize FS and GS state in start_thread_common
authorAndy Lutomirski <luto@kernel.org>
Tue, 1 Aug 2017 14:11:34 +0000 (07:11 -0700)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 20 Sep 2017 12:24:56 +0000 (07:24 -0500)
commit24dedc489928a09725840b07b82868ec7c5ec7dc
tree7a88e18a538ca7dca29dc4bf7506c745cc076116
parent2cf3068e692915fedd28394f340ccc0ced611b99
x86/fsgsbase/64: Fully initialize FS and GS state in start_thread_common

BugLink: http://bugs.launchpad.net/bugs/1718412
commit 767d035d838f4fd6b5a5bbd7a3f6d293b7f65a49 upstream.

execve used to leak FSBASE and GSBASE on AMD CPUs.  Fix it.

The security impact of this bug is small but not quite zero -- it
could weaken ASLR when a privileged task execs a less privileged
program, but only if program changed bitness across the exec, or the
child binary was highly unusual or actively malicious.  A child
program that was compromised after the exec would not have access to
the leaked base.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bpetkov@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Chang Seok <chang.seok.bae@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/kernel/process_64.c