TranslateProject/sources/tech/20180201 How to Check Your Linux PC for Meltdown or Spectre Vulnerability.md

4.1 KiB
Raw Blame History

How to Check Your Linux PC for Meltdown or Spectre Vulnerability

One of the scariest realities of the Meltdown and Spectre vulnerabilities is just how widespread they are. Virtually every modern computer is affected in some way. The real question is how exactly are you affected? Every system is at a different state of vulnerability depending on which software has and hasnt been patched.

Since Meltdown and Spectre are both fairly new and things are moving quickly, its not all that easy to tell what you need to look out for or whats been fixed on your system. There are a couple of tools available that can help. Theyre not perfect, but they can help you figure out what you need to know.

Simple Test

One of the top Linux kernel developers provided a simple way of checking the status of your system in regards to the Meltdown and Spectre vulnerabilities. This one is the easiest, and is most concise, but it doesnt work on every system. Some distributions decided not to include support for this report. Even still, its worth a shot to check.

grep . /sys/devices/system/cpu/vulnerabilities/*

Kernel Vulnerability Check

You should see output similar to the image above. Chances are, youll see that at least one of the vulnerabilities remains unchecked on your system. This is especially true since Linux hasnt made any progress in mitigating Spectre v1 yet.

The Script

If the above method didnt work for you, or you want a more detailed report of your system, a developer has created a shell script that will check your system to see what exactly it is susceptible to and what has been done to mitigate Meltdown and Spectre.

In order to get the script, make sure you have Git installed on your system, and then clone the scripts repository into a directory that you dont mind running it out of.

cd ~/Downloads
git clone https://github.com/speed47/spectre-meltdown-checker.git

Its not a large repository, so it should only take a few seconds to clone. When its done, enter the newly created directory and run the provided script.

cd spectre-meltdown-checker
./spectre-meltdown-checker.sh

Youll see a bunch of junk spit out into the terminal. Dont worry, its not too hard to follow. First, the script checks your hardware, and then it runs through the three vulnerabilities: Spectre v1, Spectre v2, and Meltdown. Each gets its own section. In between, the script tells you plainly whether you are vulnerable to each of the three.

Meltdown Spectre Check Script Ubuntu

Each section provides you with a breakdown of potential mitigation and whether or not they have been applied. Heres where you need to exercise a bit of common sense. The determinations that it gives might seem like theyre in conflict. Do a bit of digging to see if the fixes that it says are applied actually do fully mitigate the problem or not.

What This Means

So, whats the takeaway? Most Linux systems have been patched against Meltdown. If you havent updated yet for that, you should. Spectre v1 is still a big problem, and not a lot of progress has been made there as of yet. Spectre v2 will depend a lot on your distribution and what patches its chosen to apply. Regardless of what either tool says, nothing is perfect. Do your research and stay on the lookout for information coming straight from the kernel and distribution developers.


via: https://www.maketecheasier.com/check-linux-meltdown-spectre-vulnerability/

作者:Nick Congleton 译者:译者ID 校对:校对者ID

本文由 LCTT 原创编译,Linux中国 荣誉推出