Spectre Meltdown
From Whonix
systemcheck might have referred you to this page.
Note:
- systemcheck is a diagnostic tool which automates showing the diagnostic output of other diagnostic tools.
- Whonix ™ is not the cause of the issue. Don't kill the messenger.
- Spectre/Meltdown is a security vulnerability caused by flaws in processors.
- This page explains the state of affairs on how to protect form this security vulnerability.
Platform Specific[edit]
Qubes[edit]
After getting all dom0 host upgrades [archive] and reboot this should be ok.
Launch a dom0
terminal.
Click the Qubes App Launcher (blue/grey "Q")
→ Open the Terminal Emulator (Xfce Terminal)
Upgrade Qubes dom0
. This step is mandatory. [1]
sudo qubes-dom0-update
Reboot.
reboot
VirtualBox[edit]
There is no solution for VirtualBox yet. The bug has been reported to the VirtualBox developers. See this [archive] and this [archive] ticket. [2] The Whonix ™ developers depend on the VirtualBox developers for fixing this VirtualBox issue. Nevertheless:
- Apply Processor Microcode Updates on your host operating system.
- Consider the following experimental instructions.
Testers only! For more information please press on expand on the right.
These experimental [archive] Spectre/Meltdown defenses are related to issues outlined in Firmware Security and Updates. Due to the huge performance penalty and unclear security benefits of applying these changes, it may not be worth the effort. The reason is VirtualBox is still likely vulnerable, even after:
- A host microcode upgrade.
- A host kernel upgrade.
- A VM kernel upgrade.
- A "not vulnerable" result from spectre-meltdown-checker run on the host.
- Installation of the latest VirtualBox version. [3]
- All Spectre/Meltdown-related VirtualBox settings are tuned for better security as documented below.
To learn more, see: VirtualBox 5.2.18 vulnerable to spectre/meltdown despite microcode being installed [archive] and the associated VirtualBox forum discussion [archive]. [4] Users must patiently wait for VirtualBox developers to fix this bug.
On the host. [5] [6] [7] [8] [9] [10] [11]
VBoxManage modifyvm "Whonix-Gateway" --ibpb-on-vm-entry on VBoxManage modifyvm "Whonix-Gateway" --ibpb-on-vm-exit on VBoxManage modifyvm "Whonix-Gateway" --l1d-flush-on-vm-entry on VBoxManage modifyvm "Whonix-Gateway" --l1d-flush-on-sched on VBoxManage modifyvm "Whonix-Gateway" --spec-ctrl on VBoxManage modifyvm "Whonix-Gateway" --nestedpaging off VBoxManage modifyvm "Whonix-Gateway" --mds-clear-on-vm-entry on VBoxManage modifyvm "Whonix-Gateway" --mds-clear-on-sched on
VBoxManage modifyvm "Whonix-Workstation" --ibpb-on-vm-entry on VBoxManage modifyvm "Whonix-Workstation" --ibpb-on-vm-exit on VBoxManage modifyvm "Whonix-Workstation" --l1d-flush-on-vm-entry on VBoxManage modifyvm "Whonix-Workstation" --l1d-flush-on-sched on VBoxManage modifyvm "Whonix-Workstation" --spec-ctrl on VBoxManage modifyvm "Whonix-Workstation" --nestedpaging off VBoxManage modifyvm "Whonix-Workstation" --mds-clear-on-vm-entry on VBoxManage modifyvm "Whonix-Workstation" --mds-clear-on-sched on
These steps must be repeated for every Whonix ™ or non-Whonix VirtualBox VM, including multiple and custom VMs.
The above instructions only apply to the default VM names Whonix-Gateway ™ and Whonix-Workstation ™. Therefore, if Multiple Whonix-Workstation ™ and/or Multiple Whonix-Gateway ™ are configured, then repeat these instructions using the relevant name/s.
- Check back later for updated instructions. Stay Tuned.
KVM[edit]
Apply #Processor Microcode Updates on your host operating system. The updated mitigative host CPU instructions are passed through by default. No further action is needed.
Processor Microcode Updates[edit]
One recent example of a firmware vulnerability is the processor microcode update for modern chips to address speculative [archive] execution flaws [archive]. The Debian package [archive] is non-free software, therefore only available in the Debian nonfree repository, meaning it is not installed by default in all Whonix ™ variants. [12] [13] Whonix ™ recommends to avoid nonfree software but in this case idealism would result in insecurity.
It is unnecessary to apply these updates in standard Non-Qubes-Whonix ™ and Qubes-Whonix ™ guest VMs, as they do not have the ability to alter the microcode. However, processor microcode updates should always be applied on the host operating system (for processors by Intel or AMD) [14] and baremetal configurations like Physical Isolation. [15]
Microcode Package Check[edit]
In the following checks, the package is not installed if there is no output.
To check whether the microcode package is installed.
Debian based[edit]
On the host. Run.
dpkg -l | grep microcode
Qubes[edit]
In dom0. Run.
dnf list | grep microcode
The Qubes check should confirm the microcode_ctl.x86_64
package is already installed. [16]
Install Microcode Package[edit]
Intel[edit]
Install intel-microcode
.
1. Update the package lists.
sudo apt update
2. Upgrade the system.
sudo apt full-upgrade
3. Install the intel-microcode
package.
Using apt
command line parameter --no-install-recommends
is in most cases optional.
sudo apt install --no-install-recommends intel-microcode
4. Done.
The procedure of installing intel-microcode
is complete.
AMD[edit]
Install amd64-microcode
.
1. Update the package lists.
sudo apt update
2. Upgrade the system.
sudo apt full-upgrade
3. Install the amd64-microcode
package.
Using apt
command line parameter --no-install-recommends
is in most cases optional.
sudo apt install --no-install-recommends amd64-microcode
4. Done.
The procedure of installing amd64-microcode
is complete.
spectre-meltdown-checker[edit]
It is possible to check if the system is vulnerable to the Spectre [archive] and Meltdown [archive] attacks, which use flaws in modern chip design to bypass system protections.
Installation[edit]
Install spectre-meltdown-checker
.
1. Update the package lists.
sudo apt update
2. Upgrade the system.
sudo apt full-upgrade
3. Install the spectre-meltdown-checker
package.
Using apt
command line parameter --no-install-recommends
is in most cases optional.
sudo apt install --no-install-recommends spectre-meltdown-checker
4. Done.
The procedure of installing spectre-meltdown-checker
is complete.
Usage[edit]
sudo spectre-meltdown-checker --paranoid ; echo $?
Forum Discussion[edit]
See: https://forums.whonix.org/t/whonix-vulerable-due-to-missing-processor-microcode-packages/5739 [archive]
Leak Tests[edit]
Google's PoC is a Spectre V1 gadget that is a JS array speculatively accessed out of bounds. While the V1 gadget can be mitigated at the software level, Chrome's V8 team determined that other gadgets such as for Spectre Variant 4 to be "simply infeasible in software" for mitigating. The code caters to Intel Skylake CPUs and can potentially work on other architectures and browsers with minor modifications to the JavaScript. Google was successful in running this attack on Apple M1 ARM CPUs without any major changes. [17]
References[edit]
- ↑
This is required to make sure
- version file
/srv/formulas/base/virtual-machines-formula/qvm/whonix.jinja
contains the current version number of Whonix ™ is up to date, - a recent version of Qubes repository definition files,
- Qubes salt,
- qubes-core-admin-addon-whonix [archive],
- as well as qubes-mgmt-salt-dom0-virtual-machines [archive] are installed and up to date.
- version file
- ↑ https://security.stackexchange.com/questions/211265/virtualbox-spectre-v4 [archive]
- ↑
VirtualBox version
5.2.18
or above is required since only that version comes with Spectre/Meltdown defenses. See https://forums.whonix.org/t/whonix-vulerable-due-to-missing-processor-microcode-packages/5739/22 [archive]. - ↑ Also see the following Whonix ™ forum discussion: Whonix ™ vulerable due to missing processor microcode packages? spectre / meltdown / retpoline / L1 Terminal Fault (L1TF) [archive]
- ↑
--ibpb-on-vm-[enter|exit] on|off: Enables flushing of the indirect branch prediction buffers on every VM enter or exit respectively. This could be enabled by users overly worried about possible spectre attacks by the VM. Please note that these options may have sever impact on performance.
https://www.virtualbox.org/manual/ch08.html [archive]There is a mistake in the VirtualBox manual stating
enter
which does not work. It is actuallyentry
. - ↑
https://www.virtualbox.org/manual/ch08.html [archive]
--l1d-flush-on-vm-enter on|off: Enables flushing of the level 1 data cache on VM enter. See Section 13.4.1, “CVE-2018-3646”.
- ↑
--l1d-flush-on-sched on|off: Enables flushing of the level 1 data cache on scheduling EMT for guest execution. See Section 13.4.1, “CVE-2018-3646 [archive]”.
https://www.virtualbox.org/manual/ch08.html [archive] - ↑
https://www.virtualbox.org/manual/ch13.html#sec-rec-cve-2018-3646 [archive]
For users not concerned by this security issue, the default mitigation can be disabled using
VBoxManage modifyvm name --l1d-flush-on-sched off
Since we want to enable the security feature we set
--l1d-flush-on-sched on
. - ↑
--spec-ctrl on|off: This setting enables/disables exposing speculation control interfaces to the guest, provided they are available on the host. Depending on the host CPU and workload, enabling speculation control may significantly reduce performance.
https://www.virtualbox.org/manual/ch08.html [archive] - ↑
According to this VirtualBox ticket [archive]
--spec-ctrl
should be set toon
. - ↑
--nestedpaging on|off: If hardware virtualization is enabled, this additional setting enables or disables the use of the nested paging feature in the processor of your host system; see Section 10.7, “Nested paging and VPIDs” and Section 13.4.1, “CVE-2018-3646”.
- ↑ Relevant Debian packages for processor microcode: Intel [archive] and amd64 [archive].
- ↑ Installing these updates by default would require the Debian nonfree repository, and logically also make Whonix ™ images nonfree.
- ↑ ARM is less affected than Intel architecture.
- ↑ See: https://forums.whonix.org/t/whonix-vulerable-due-to-missing-processor-microcode-packages/5739 [archive]
- ↑ This package is installed by default in Qubes to automatically protect users against hardware threats.
- ↑ https://www.phoronix.com/scan.php?page=news_item&px=Google-Leaky.Page-Spectre [archive]
Whonix ™ is Supported by Evolution Host DDoS Protected VPS. Stay private and get your VPS with Bitcoin or Monero.
100px | |
Fosshost | About Advertisements |
Search engines: YaCy | Qwant | ecosia | MetaGer | peekier | Whonix ™ Wiki
Are you proficient with iptables? Want to contribute? Check out possible improvements to iptables. Please come and introduce yourself in the development forum.
Priority Support | Investors | Professional Support
Whonix ™ | © ENCRYPTED SUPPORT LP | Freedom Software / Open Source (Why?)
The personal opinions of moderators or contributors to the Whonix ™ project do not represent the project as a whole.