speed47 / spectre-meltdown-checker

Reptar, Downfall, Zenbleed, ZombieLoad, RIDL, Fallout, Foreshadow, Spectre, Meltdown vulnerability/mitigation checker for Linux & BSD
3.88k stars 476 forks source link

is it a false positive? #172

Closed slayerlab closed 6 years ago

slayerlab commented 6 years ago

The "spectre-meltdown-chacker" shows that is not vulnerable:

# sudo apt update -qq
All packages are up to date.
# sudo apt upgrade -qq
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
# sudo bash spectre-meltdown-checker/spectre-meltdown-checker.sh 
Spectre and Meltdown mitigation detection tool v0.36+

Checking for vulnerabilities on current system
Kernel is Linux 4.13.0-37-generic #42-Ubuntu SMP Wed Mar 7 14:13:23 UTC 2018 x86_64
CPU is Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz

Hardware check
* Hardware support (CPU microcode) for mitigation techniques
  * Indirect Branch Restricted Speculation (IBRS)
    * SPEC_CTRL MSR is available:  YES 
    * CPU indicates IBRS capability:  YES  (SPEC_CTRL feature bit)
  * Indirect Branch Prediction Barrier (IBPB)
    * PRED_CMD MSR is available:  YES 
    * CPU indicates IBPB capability:  YES  (SPEC_CTRL feature bit)
  * Single Thread Indirect Branch Predictors (STIBP)
    * SPEC_CTRL MSR is available:  YES 
    * CPU indicates STIBP capability:  YES 
  * Enhanced IBRS (IBRS_ALL)
    * CPU indicates ARCH_CAPABILITIES MSR availability:  NO 
    * ARCH_CAPABILITIES MSR advertises IBRS_ALL capability:  NO 
  * CPU explicitly indicates not being vulnerable to Meltdown (RDCL_NO):  NO 
  * CPU microcode is known to cause stability problems:  NO  (model 42 stepping 7 ucode 0x2d)
* CPU vulnerability to the three speculative execution attack variants
  * Vulnerable to Variant 1:  YES 
  * Vulnerable to Variant 2:  YES 
  * Vulnerable to Variant 3:  YES 

CVE-2017-5753 [bounds check bypass] aka 'Spectre Variant 1'
* Mitigated according to the /sys interface:  YES  (kernel confirms that the mitigation is active)
* Kernel has array_index_mask_nospec (x86):  NO 
* Kernel has the Red Hat/Ubuntu patch:  YES 
* Kernel has mask_nospec64 (arm):  NO 
> STATUS:  NOT VULNERABLE  (Mitigation: OSB (observable speculation barrier, Intel v6))

CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
* Mitigated according to the /sys interface:  YES  (kernel confirms that the mitigation is active)
* Mitigation 1
  * Kernel is compiled with IBRS/IBPB support:  YES 
  * Currently enabled features
    * IBRS enabled for Kernel space:  NO 
    * IBRS enabled for User space:  NO 
    * IBPB enabled:  YES 
* Mitigation 2
  * Kernel has branch predictor hardening (arm):  NO 
  * Kernel compiled with retpoline option:  YES 
  * Kernel compiled with a retpoline-aware compiler:  YES  (kernel reports full retpoline compilation)
> STATUS:  NOT VULNERABLE  (Mitigation: Full generic retpoline, IBPB (Intel v4))

CVE-2017-5754 [rogue data cache load] aka 'Meltdown' aka 'Variant 3'
* Mitigated according to the /sys interface:  YES  (kernel confirms that the mitigation is active)
* Kernel supports Page Table Isolation (PTI):  YES  (found 'CONFIG_PAGE_TABLE_ISOLATION=y')
* PTI enabled and active:  YES 
* Running as a Xen PV DomU:  NO 
> STATUS:  NOT VULNERABLE  (Mitigation: PTI)

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

Although, if I run the SpectrePoC the vulnerability is successfully exploited:

$ SpectrePoC/spectre.out
Version: commit 874a03775dc68433e0c2b43e3c3f6e97652fa86a
Using a cache hit threshold of 80.
Build: RDTSCP_SUPPORTED MFENCE_SUPPORTED CLFLUSH_SUPPORTED 
Reading 40 bytes:
Reading at malicious_x = 0xffffffffffdfef18... Success: 0x54=’T’ score=9 (second best: 0x05=’?’ score=2)
Reading at malicious_x = 0xffffffffffdfef19... Success: 0x68=’h’ score=2 
Reading at malicious_x = 0xffffffffffdfef1a... Success: 0x65=’e’ score=2 
Reading at malicious_x = 0xffffffffffdfef1b... Success: 0x20=’ ’ score=2 
Reading at malicious_x = 0xffffffffffdfef1c... Success: 0x4D=’M’ score=63 (second best: 0x00=’?’ score=26)
Reading at malicious_x = 0xffffffffffdfef1d... Success: 0x61=’a’ score=2 
Reading at malicious_x = 0xffffffffffdfef1e... Success: 0x67=’g’ score=13 (second best: 0x00=’?’ score=3)
Reading at malicious_x = 0xffffffffffdfef1f... Success: 0x69=’i’ score=2 
Reading at malicious_x = 0xffffffffffdfef20... Success: 0x63=’c’ score=17 (second best: 0x00=’?’ score=1)
Reading at malicious_x = 0xffffffffffdfef21... Success: 0x20=’ ’ score=2 
Reading at malicious_x = 0xffffffffffdfef22... Success: 0x57=’W’ score=2 
Reading at malicious_x = 0xffffffffffdfef23... Unclear: 0x6F=’o’ score=103 (second best: 0x00=’?’ score=54)
Reading at malicious_x = 0xffffffffffdfef24... Success: 0x72=’r’ score=2 
Reading at malicious_x = 0xffffffffffdfef25... Success: 0x64=’d’ score=83 (second best: 0x00=’?’ score=32)
Reading at malicious_x = 0xffffffffffdfef26... Success: 0x73=’s’ score=2 
Reading at malicious_x = 0xffffffffffdfef27... Success: 0x20=’ ’ score=207 (second best: 0x00=’?’ score=98)
Reading at malicious_x = 0xffffffffffdfef28... Success: 0x61=’a’ score=2 
Reading at malicious_x = 0xffffffffffdfef29... Success: 0x72=’r’ score=2 
Reading at malicious_x = 0xffffffffffdfef2a... Unclear: 0x65=’e’ score=55 (second best: 0x00=’?’ score=30)
Reading at malicious_x = 0xffffffffffdfef2b... Success: 0x20=’ ’ score=2 
Reading at malicious_x = 0xffffffffffdfef2c... Unclear: 0x53=’S’ score=69 (second best: 0x00=’?’ score=39)
Reading at malicious_x = 0xffffffffffdfef2d... Success: 0x71=’q’ score=2 
Reading at malicious_x = 0xffffffffffdfef2e... Unclear: 0x75=’u’ score=101 (second best: 0x00=’?’ score=55)
Reading at malicious_x = 0xffffffffffdfef2f... Success: 0x65=’e’ score=2 
Reading at malicious_x = 0xffffffffffdfef30... Unclear: 0x61=’a’ score=69 (second best: 0x00=’?’ score=39)
Reading at malicious_x = 0xffffffffffdfef31... Success: 0x6D=’m’ score=2 
Reading at malicious_x = 0xffffffffffdfef32... Success: 0x69=’i’ score=2 
Reading at malicious_x = 0xffffffffffdfef33... Success: 0x73=’s’ score=2 
Reading at malicious_x = 0xffffffffffdfef34... Success: 0x68=’h’ score=45 (second best: 0x00=’?’ score=19)
Reading at malicious_x = 0xffffffffffdfef35... Success: 0x20=’ ’ score=2 
Reading at malicious_x = 0xffffffffffdfef36... Success: 0x4F=’O’ score=145 (second best: 0x00=’?’ score=65)
Reading at malicious_x = 0xffffffffffdfef37... Success: 0x73=’s’ score=2 
Reading at malicious_x = 0xffffffffffdfef38... Success: 0x73=’s’ score=67 (second best: 0x00=’?’ score=24)
Reading at malicious_x = 0xffffffffffdfef39... Success: 0x69=’i’ score=2 
Reading at malicious_x = 0xffffffffffdfef3a... Success: 0x66=’f’ score=13 (second best: 0x00=’?’ score=3)
Reading at malicious_x = 0xffffffffffdfef3b... Success: 0x72=’r’ score=2 
Reading at malicious_x = 0xffffffffffdfef3c... Success: 0x61=’a’ score=191 (second best: 0x00=’?’ score=90)
Reading at malicious_x = 0xffffffffffdfef3d... Success: 0x67=’g’ score=2 
Reading at malicious_x = 0xffffffffffdfef3e... Success: 0x65=’e’ score=11 (second best: 0x00=’?’ score=4)
Reading at malicious_x = 0xffffffffffdfef3f... Success: 0x2E=’.’ score=2 
$ 
knweiss commented 6 years ago

Please take a look at #133.

slayerlab commented 6 years ago

Thanks, now I got it.