Releases: mit-pdos/ward
Releases · mit-pdos/ward
MCE bug v2
This triggers the same machine check exception and host kernel panic as https://github.com/fintelia/sv6/releases/tag/hce-bug-1, but is slightly easier to run:
$ qemu-system-x86_64 -nographic -enable-kvm -cpu qemu64,+fsgsbase -kernel kernel.elf
HCE bug
Files needed to replicate hardware check exception. Run with
$ qemu-system-x86_64 -kernel kernel.elf -cpu qemu64,+fsgsbase -serial mon:stdio -nographic -device sga -device ahci,id=ahci0 -drive if=none,file=fs.img,format=raw,id=drive-sata0-0-0 -device ide-drive,bus=ahci0.0,drive=drive-sata0-0-0,id=sata0-0-0 -enable-kvm
Running on a 4th Generation Lenovo X1 Carbon Laptop (with a i7-6600U) the following errors are recorded in the system log:
Oct 24 10:01:18 jonathan-ThinkPad-X1-Carbon kernel: L1TF CPU bug present and SMT on, data leak possible. See CVE-2018-3646 and https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/l1tf.html for details. Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: Machine check events logged Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: CPU 0: Machine Check: 0 Bank 0: d0000080000f0005 Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: TSC 313991fc664 Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: PROCESSOR 0:406e3 TIME 1571925683 SOCKET 0 APIC 0 microcode cc Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: Machine check events logged Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: CPU 2: Machine Check: 0 Bank 0: d0000080000f0005 Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: TSC 313991fc65c Oct 24 10:01:23 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: PROCESSOR 0:406e3 TIME 1571925683 SOCKET 0 APIC 1 microcode cc Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: CPU 1: Machine Check: 0 Bank 0: 90000040000f0005 Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: TSC 3152d018f14 Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: PROCESSOR 0:406e3 TIME 1571925685 SOCKET 0 APIC 2 microcode cc Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: CPU 3: Machine Check: 0 Bank 0: 90000040000f0005 Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: TSC 3152d018ce6 Oct 24 10:01:25 jonathan-ThinkPad-X1-Carbon kernel: mce: [Hardware Error]: PROCESSOR 0:406e3 TIME 1571925685 SOCKET 0 APIC 3 microcode cc
And afterwards there is a kernel panic that is printed to the screen but doesn't seem to be recorded anywhere:
Kernel panic - not syncing: Timeout: Not all CPUs entered broadcast exception handler
Shutting down cpus with NMI
Kernel Offset: 0x2bc00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
Rebooting in 30 seconds...
system info
jonathan:~$ uname -a
Linux jonathan-ThinkPad-X1-Carbon 5.3.7-arch1-1-ARCH #1 SMP PREEMPT Fri Oct 18 00:17:03 UTC 2019 x86_64 GNU/Linux
jonathan:~$ qemu-system-x86_64 --version
QEMU emulator version 4.1.0
Copyright (c) 2003-2019 Fabrice Bellard and the QEMU Project developers