Meltdown/Spectre vulnerability script

Photo by Armin Hanisch

Here is a script to check if your Linux server is vulnerable to this exploit:

https://thehacktoday.com/how-to-check-linux-for-meltdown-and-spectre-vulnerability/

My machine is AMD with all of the latest Ubuntu patches.  In this case “Intel Inside” is definitely not a good thing.

$ sudo sh spectre-meltdown-checker.sh
Spectre and Meltdown mitigation detection tool v0.24

Checking for vulnerabilities against live running kernel Linux 4.13.0-26-generic #29~16.04.2-Ubuntu SMP Tue Jan 9 22:00:44 UTC 2018 x86_64

CVE-2017-5753 [bounds check bypass] aka ‘Spectre Variant 1’
* Checking count of LFENCE opcodes in kernel: NO (only 42 opcodes found, should be >= 70)
> STATUS: VULNERABLE (heuristic to be improved when official patches become available)

CVE-2017-5715 [branch target injection] aka ‘Spectre Variant 2’
* Mitigation 1
* Hardware (CPU microcode) support for mitigation: NO
* Kernel support for IBRS: NO
* IBRS enabled for Kernel space: NO
* IBRS enabled for User space: NO
* Mitigation 2
* Kernel compiled with retpoline option: NO
* Kernel compiled with a retpoline-aware compiler: NO
> STATUS: NOT VULNERABLE (your CPU vendor reported your CPU model as not vulnerable)

CVE-2017-5754 [rogue data cache load] aka ‘Meltdown’ aka ‘Variant 3’
* Kernel supports Page Table Isolation (PTI): YES
* PTI enabled and active: NO
> STATUS: NOT VULNERABLE (your CPU vendor reported your CPU model as not vulnerable)

A false sense of security is worse than no security at all, see –disclaimer