linux/arch/x86
Ashish Kalra d594aa0277 x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
The minimum size for a new stack (512 bytes) setup for arch/x86/boot components
when the bootloader does not setup/provide a stack for the early boot components
is not "enough".

The setup code executing as part of early kernel startup code, uses the stack
beyond 512 bytes and accidentally overwrites and corrupts part of the BSS
section. This is exposed mostly in the early video setup code, where
it was corrupting BSS variables like force_x, force_y, which in-turn affected
kernel parameters such as screen_info (screen_info.orig_video_cols) and
later caused an exception/panic in console_init().

Most recent boot loaders setup the stack for early boot components, so this
stack overwriting into BSS section issue has not been exposed.

Signed-off-by: Ashish Kalra <ashish@bluestacks.com>
Cc: <stable@vger.kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.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>
Link: http://lkml.kernel.org/r/20170419152015.10011-1-ashishkalra@Ashishs-MacBook-Pro.local
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-20 10:05:23 +02:00
..
boot x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup 2017-04-20 10:05:23 +02:00
configs x86: Enable KASLR by default 2017-04-18 11:48:13 +02:00
crypto crypto: sha512-mb - Protect sha512 mb ctx mgr access 2017-02-11 17:50:41 +08:00
entry Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-03-03 11:38:56 -08:00
events sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
hyperv drivers: hv: Turn off write permission on the hypercall page 2017-02-10 15:48:00 +01:00
ia32 sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
include Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch 2017-04-11 08:49:31 +02:00
kernel Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch 2017-04-11 08:49:31 +02:00
kvm Second batch of KVM changes for 4.11 merge window 2017-03-04 11:36:19 -08:00
lguest x86/boot/e820: Create coherent API function names for E820 range operations 2017-01-28 14:42:32 +01:00
lib Merge branch 'linus' into WIP.x86/boot, to fix up conflicts and to pick up updates 2017-03-01 09:02:26 +01:00
math-emu Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
mm Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch 2017-04-11 08:49:31 +02:00
net bpf: fix unlocking of jited image when module ronx not set 2017-02-21 13:30:14 -05:00
oprofile x86/oprofile/nmi: Convert to hotplug state machine 2016-11-22 23:34:43 +01:00
pci Merge branch 'linus' into WIP.x86/boot, to fix up conflicts and to pick up updates 2017-03-01 09:02:26 +01:00
platform Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch 2017-04-11 08:49:31 +02:00
power x86/boot/e820: Rename e820_table_saved to e820_table_firmware and improve the description 2017-01-28 14:42:27 +01:00
purgatory x86/kexec: add -fno-PIE 2016-11-09 22:28:09 +01:00
ras x86/ras/amd/inj: Change dependency 2017-01-24 09:14:55 +01:00
realmode x86/build: Don't use $(LINUXINCLUDE) twice 2016-11-28 07:49:17 +01:00
tools x86/tools: Fix gcc-7 warning in relocs.c 2016-12-19 11:50:24 +01:00
um sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
video
xen Merge branch 'WIP.x86/boot' into x86/boot, to pick up ready branch 2017-04-11 08:49:31 +02:00
.gitignore
Kbuild Drivers: hv vmbus: Move Hypercall page setup out of common code 2017-01-19 11:42:07 +01:00
Kconfig x86: Enable KASLR by default 2017-04-18 11:48:13 +02:00
Kconfig.cpu
Kconfig.debug mm: add arch-independent testcases for RODATA 2017-02-27 18:43:48 -08:00
Makefile lib/raid6: Add AVX512 optimized gen_syndrome functions 2016-09-21 09:09:44 -07:00
Makefile_32.cpu
Makefile.um