Apply minor improvements to methodology docs
[csit.git] / docs / report / introduction / test_environment_sut_meltspec_dnv.rst
1 Spectre and Meltdown Checks
2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
3
4 Following section displays the output of a running shell script to tell if
5 system is vulnerable against the several "speculative execution" CVEs that were
6 made public in 2018. Script is available on `Spectre & Meltdown Checker Github
7 <https://github.com/speed47/spectre-meltdown-checker>`_.
8
9 - CVE-2017-5753 [bounds check bypass] aka 'Spectre Variant 1'
10 - CVE-2017-5715 [branch target injection] aka 'Spectre Variant 2'
11 - CVE-2017-5754 [rogue data cache load] aka 'Meltdown' aka 'Variant 3'
12 - CVE-2018-3640 [rogue system register read] aka 'Variant 3a'
13 - CVE-2018-3639 [speculative store bypass] aka 'Variant 4'
14 - CVE-2018-3615 [L1 terminal fault] aka 'Foreshadow (SGX)'
15 - CVE-2018-3620 [L1 terminal fault] aka 'Foreshadow-NG (OS)'
16 - CVE-2018-3646 [L1 terminal fault] aka 'Foreshadow-NG (VMM)'
17
18 ::
19
20     $ sudo ./spectre-meltdown-checker.sh --no-color
21
22     Spectre and Meltdown mitigation detection tool v0.40
23
24     Checking for vulnerabilities on current system
25     Kernel is Linux 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64
26     CPU is Intel(R) Atom(TM) CPU C3858 @ 2.00GHz
27
28     Hardware check
29     * Hardware support (CPU microcode) for mitigation techniques
30       * Indirect Branch Restricted Speculation (IBRS)
31         * SPEC_CTRL MSR is available: YES
32         * CPU indicates IBRS capability: YES (SPEC_CTRL feature bit)
33       * Indirect Branch Prediction Barrier (IBPB)
34         * PRED_CMD MSR is available: YES
35         * CPU indicates IBPB capability: YES (SPEC_CTRL feature bit)
36       * Single Thread Indirect Branch Predictors (STIBP)
37         * SPEC_CTRL MSR is available: YES
38         * CPU indicates STIBP capability: YES (Intel STIBP feature bit)
39       * Speculative Store Bypass Disable (SSBD)
40         * CPU indicates SSBD capability: YES (Intel SSBD)
41       * L1 data cache invalidation
42         * FLUSH_CMD MSR is available: NO
43         * CPU indicates L1D flush capability: NO
44       * Enhanced IBRS (IBRS_ALL)
45         * CPU indicates ARCH_CAPABILITIES MSR availability: YES
46         * ARCH_CAPABILITIES MSR advertises IBRS_ALL capability: NO
47       * CPU explicitly indicates not being vulnerable to Meltdown (RDCL_NO): YES
48       * CPU explicitly indicates not being vulnerable to Variant 4 (SSB_NO): NO
49       * CPU/Hypervisor indicates L1D flushing is not necessary on this system: YES
50       * Hypervisor indicates host CPU might be vulnerable to RSB underflow (RSBA): NO
51       * CPU supports Software Guard Extensions (SGX): NO
52       * CPU microcode is known to cause stability problems: NO (model 0x5f family 0x6 stepping 0x1 ucode 0x24 cpuid 0x506f1)
53       * CPU microcode is the latest known available version: YES (latest version is 0x24 dated 2018/05/11 according to builtin MCExtractor DB v84 - 2018/09/27)
54     * CPU vulnerability to the speculative execution attack variants
55       * Vulnerable to CVE-2017-5753 (Spectre Variant 1, bounds check bypass): YES
56       * Vulnerable to CVE-2017-5715 (Spectre Variant 2, branch target injection): YES
57       * Vulnerable to CVE-2017-5754 (Variant 3, Meltdown, rogue data cache load): NO
58       * Vulnerable to CVE-2018-3640 (Variant 3a, rogue system register read): YES
59       * Vulnerable to CVE-2018-3639 (Variant 4, speculative store bypass): YES
60       * Vulnerable to CVE-2018-3615 (Foreshadow (SGX), L1 terminal fault): NO
61       * Vulnerable to CVE-2018-3620 (Foreshadow-NG (OS), L1 terminal fault): YES
62       * Vulnerable to CVE-2018-3646 (Foreshadow-NG (VMM), L1 terminal fault): YES
63
64     CVE-2017-5753 aka 'Spectre Variant 1, bounds check bypass'
65     * Mitigated according to the /sys interface: YES (Mitigation: __user pointer sanitization)
66     * Kernel has array_index_mask_nospec: YES (1 occurrence(s) found of x86 64 bits array_index_mask_nospec())
67     * Kernel has the Red Hat/Ubuntu patch: NO
68     * Kernel has mask_nospec64 (arm64): NO
69     > STATUS: NOT VULNERABLE (Mitigation: __user pointer sanitization)
70
71     CVE-2017-5715 aka 'Spectre Variant 2, branch target injection'
72     * Mitigated according to the /sys interface: YES (Mitigation: Full generic retpoline, IBPB, IBRS_FW)
73     * Mitigation 1
74       * Kernel is compiled with IBRS support: YES
75         * IBRS enabled and active: YES (for kernel and firmware code)
76       * Kernel is compiled with IBPB support: YES
77         * IBPB enabled and active: YES
78     * Mitigation 2
79       * Kernel has branch predictor hardening (arm): NO
80       * Kernel compiled with retpoline option: YES
81         * Kernel compiled with a retpoline-aware compiler: YES (kernel reports full retpoline compilation)
82     > STATUS: NOT VULNERABLE (Full retpoline + IBPB are mitigating the vulnerability)
83
84     CVE-2017-5754 aka 'Variant 3, Meltdown, rogue data cache load'
85     * Mitigated according to the /sys interface: YES (Not affected)
86     * Kernel supports Page Table Isolation (PTI): YES
87       * PTI enabled and active: NO
88       * Reduced performance impact of PTI: NO (PCID/INVPCID not supported, performance impact of PTI will be significant)
89     * Running as a Xen PV DomU: NO
90     > STATUS: NOT VULNERABLE (your CPU vendor reported your CPU model as not vulnerable)
91
92     CVE-2018-3640 aka 'Variant 3a, rogue system register read'
93     * CPU microcode mitigates the vulnerability: YES
94     > STATUS: NOT VULNERABLE (your CPU microcode mitigates the vulnerability)
95
96     CVE-2018-3639 aka 'Variant 4, speculative store bypass'
97     * Mitigated according to the /sys interface: YES (Mitigation: Speculative Store Bypass disabled via prctl and seccomp)
98     * Kernel supports speculation store bypass: YES (found in /proc/self/status)
99     > STATUS: NOT VULNERABLE (Mitigation: Speculative Store Bypass disabled via prctl and seccomp)
100
101     CVE-2018-3615 aka 'Foreshadow (SGX), L1 terminal fault'
102     * CPU microcode mitigates the vulnerability: N/A
103     > STATUS: NOT VULNERABLE (your CPU vendor reported your CPU model as not vulnerable)
104
105     CVE-2018-3620 aka 'Foreshadow-NG (OS), L1 terminal fault'
106     * Mitigated according to the /sys interface: YES (Not affected)
107     * Kernel supports PTE inversion: YES (found in kernel image)
108     * PTE inversion enabled and active: NO
109     > STATUS: NOT VULNERABLE (Not affected)
110
111     CVE-2018-3646 aka 'Foreshadow-NG (VMM), L1 terminal fault'
112     * Information from the /sys interface:
113     * This system is a host running an hypervisor: NO
114     * Mitigation 1 (KVM)
115       * EPT is disabled: NO
116     * Mitigation 2
117       * L1D flush is supported by kernel: YES (found flush_l1d in kernel image)
118       * L1D flush enabled: UNKNOWN (unrecognized mode)
119       * Hardware-backed L1D flush supported: NO (flush will be done in software, this is slower)
120       * Hyper-Threading (SMT) is enabled: NO
121     > STATUS: NOT VULNERABLE (this system is not running an hypervisor)
122
123     > SUMMARY: CVE-2017-5753:OK CVE-2017-5715:OK CVE-2017-5754:OK CVE-2018-3640:OK CVE-2018-3639:OK CVE-2018-3615:OK CVE-2018-3620:OK CVE-2018-3646:OK
124
125     Need more detailed information about mitigation options? Use --explain
126     A false sense of security is worse than no security at all, see --disclaimer