Test your system for Spectre and Meltdown vulnerabilities

Following the outbreak of three processor vulnerabilities, known as Spectre and Meltdown; I have already patched my systems and whilst doing so, came across this useful script written by Speed47.

This script checks your system for the three vulnerabilities. I found it useful to check my systems were secure after applying kernel updates.

To run the script, use these commands below:

  1. Firstly download:
    wget https://raw.githubusercontent.com/speed47/spectre-meltdown-checker/master/spectre-meltdown-checker.sh
  2. Then run the script as sudo:
    sudo sh spectre-meltdown-checker.sh

 

This is a quick summary of the vulnerabilities and their CVE numbers:

CVE-2017-5753 bounds check bypass (Spectre Variant 1)

  • Impact: Kernel & all software
  • Mitigation: recompile software and kernel with a modified compiler that introduces the LFENCE opcode at the proper positions in the resulting code
  • Performance impact of the mitigation: negligible

CVE-2017-5715 branch target injection (Spectre Variant 2)

  • Impact: Kernel
  • Mitigation 1: new opcode via microcode update that should be used by up to date compilers to protect the BTB (by flushing indirect branch predictors)
  • Mitigation 2: introducing “retpoline” into compilers, and recompile software/OS with it
  • Performance impact of the mitigation: high for mitigation 1, medium for mitigation 2, depending on your CPU

CVE-2017-5754 rogue data cache load (Meltdown)

  • Impact: Kernel
  • Mitigation: updated kernel (with PTI/KPTI patches), updating the kernel is enough
  • Performance impact of the mitigation: low to medium

 

Disclaimer: Be careful when running script like these. Please check the script’s source code before running.

There are no comments, be the first. Use the form below to add your comment

Post a Comment