operating-systems.html: add a warning for Linux/CPU vulns #1231

Merged
Mikaela merged 14 commits from cpu-vulns into master 2019-08-31 17:05:37 +00:00
Showing only changes of commit e7c1dde9d3 - Show all commits

View File

@ -39,7 +39,34 @@ tor="http://sejnfjrq6szgca7v.onion"
<ul>
Mikaela commented 2019-08-30 10:35:05 +00:00 (Migrated from github.com)
Review
<p>When running a enough recent kernel, you can check the CPU vulnerabilities it detects by <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code>. By using <code>tail -n +1</code> instead of <code>cat</code>, the file names are also visible.</p>

Should there be a comma here?

```suggestion <p>When running a enough recent kernel, you can check the CPU vulnerabilities it detects by <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code>. By using <code>tail -n +1</code> instead of <code>cat</code>, the file names are also visible.</p> ``` Should there be a comma here?
Mikaela commented 2019-08-30 10:36:37 +00:00 (Migrated from github.com)
Review

I wonder what is the official spelling of UEFI/BIOS?

I think UEFI has deprecated/replaced BIOS entirely, but everyone calls it as BIOS due to legacy reasons and I think my grub says "Enter setup" and the thing calls itself as UEFI BIOS on my laptop.

I wonder what is the official spelling of UEFI/BIOS? I think UEFI has deprecated/replaced BIOS entirely, but everyone calls it as BIOS due to legacy reasons and I think my grub says "Enter setup" and the thing calls itself as UEFI BIOS on my laptop.
Mikaela commented 2019-08-30 10:37:30 +00:00 (Migrated from github.com)
Review
  <li><code>sudo grub-mkconfig -o /boot/grub/grub.cfg</code> to generate a new grub config file including this new kernel boot flag</li>

or kernel/boot or is it fine?

```suggestion <li><code>sudo grub-mkconfig -o /boot/grub/grub.cfg</code> to generate a new grub config file including this new kernel boot flag</li> ``` or kernel/boot or is it fine?
Mikaela commented 2019-08-30 10:38:22 +00:00 (Migrated from github.com)
Review

this must be a typo or losing a train of thought and without noticing it continuing with another train of thought

this must be a typo or losing a train of thought and without noticing it continuing with another train of thought
Mikaela commented 2019-08-30 10:40:34 +00:00 (Migrated from github.com)
Review

I am not entirely sure if a comma belongs here

I am not entirely sure if a comma belongs here
nitrohorse commented 2019-08-31 01:28:20 +00:00 (Migrated from github.com)
Review

I think technically no, but reads more naturally 😄

I think technically no, but reads more naturally :smile:
nitrohorse commented 2019-08-31 01:29:13 +00:00 (Migrated from github.com)
Review

I've seen it with a forward slash but I don't think it's "official" spelling.

I've seen it with a forward slash but I don't think it's "official" spelling.
nitrohorse commented 2019-08-31 01:30:15 +00:00 (Migrated from github.com)
Review

kernel boot flag sounds fine to me 😄

kernel boot flag sounds fine to me :smile:
nitrohorse commented 2019-08-31 01:31:16 +00:00 (Migrated from github.com)
Review

How about adding quotes:

...now says "SMT disabled."

How about adding quotes: > ...now says "SMT disabled."
Mikaela commented 2019-08-31 08:11:18 +00:00 (Migrated from github.com)
Review
https://en.wikipedia.org/wiki/UEFI isn't too helpful
<li><a href="#win10"><i class="fas fa-link"></i> Don't use Windows 10 - It's a privacy nightmare</a></li>
<li>Linux users check for CPU vulnerabilities, <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code>. Vulnerable SMT can be disabled either in the UEFI BIOS or in kernel level by <code>sudo mkdir /etc/default/grub.d/ && echo GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT mds=full,nosmt" | sudo tee /etc/default/grub.d/mds.conf && sudo update-grub</code></li>
<li>Disable multithreading to mitigate <a href="https://mdsattacks.com/">RIDL and Fallout: MDS attacks on mdsattacks.com</a>. See also the next topic</li>
</ul>
<h4 id=linuxcpuvulns>Remember to check CPU vulnerability mitigations on Linux</h4>
<p><em>This also affects Windows 10, but it doesn't expose this information or mitigation instructions as easily.</em></p>
<p>When running a enough recent kernel, you can check the CPU vulnerabilities it detects by <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code>. By using <code>tail -n +1</code> instead of <code>cat</code> the file names are also visible.</p>
<p>In case you have a Intel CPU, you will likely see that <a href="https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html">MDS - Microarchitectural Data Sampling</a> is only partially mitigated ("SMT vulnerable"), unless you have disabled it in UEFI BIOS as the full mitigation disables <a href="https://en.wikipedia.org/wiki/Simultaneous_multithreading">Simultaneous multithreading</a> which may be the cause of the highest performance impact.</p>
<p>The following steps can be took to enable the full mitigation assuming your system/distribution uses grub and supports <code>/etc/default/grub.d/</code>:</p>
<ol>
<li><code>sudo mkdir /etc/default/grub.d/</code> to create a directory for additional grub configuration
<li><code>echo GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT mds=full,nosmt" | sudo tee /etc/default/grub.d/mds.conf</code> to create a new grub config file source with the echoed content</li>
<li><code>sudo update-grub</code> to generate a new config file including these kernel flags
Mikaela commented 2019-08-30 10:37:50 +00:00 (Migrated from github.com)
Review

I think it's more universal than systemctl reboot

I think it's more universal than `systemctl reboot`
<li><code>sudo reboot</code> to reboot
<li>afterward the reboot check <code>tail -n +1 /sys/devices/system/cpu/vulnerabilities/*</code> again to see that MDS now says SMT disabled.
</ol>
<h5>Further reading</h5>
<ul>
<li><a href="https://cpu.fail/">CPU.fail</a></li>
<li><a href="https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html">MDS - Microarchitectural Data Sampling on The Linux kernel user's and administrator's guide</a></li>
<li><a href="https://mdsattacks.com/">RIDL and Fallout: MDS attacks on mdsattacks.com</a></li>
Mikaela commented 2019-08-31 16:24:01 +00:00 (Migrated from github.com)
Review

I changed the earlier link 4697bf6d6c.

I changed the earlier link https://github.com/privacytoolsIO/privacytools.io/pull/1231/commits/4697bf6d6c04cb128c5d28adfc90f4c88f373113.
<li><a href="https://en.wikipedia.org/wiki/Simultaneous_multithreading">Simultaneous multithreading on Wikipedia</a></li>
</ul>
<h3>Worth Mentioning</h3>