mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-09-13 06:13:26 +02:00
Compare commits
88
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ce3775287 | ||
|
|
476ebe59fc | ||
|
|
7847c95208 | ||
|
|
738a4f55f8 | ||
|
|
03cde37e67 | ||
|
|
ad2b7edeca | ||
|
|
fa6f0b14e9 | ||
|
|
17056d8f08 | ||
|
|
e844f9cff3 | ||
|
|
5262efbf55 | ||
|
|
440424f524 | ||
|
|
b7b0efa773 | ||
|
|
cf156a2ee5 | ||
|
|
4eb0d04808 | ||
|
|
50845adbfb | ||
|
|
7eaa794980 | ||
|
|
7e5eee74ac | ||
|
|
9bef6ec533 | ||
|
|
f587d9355e | ||
|
|
83be8fd544 | ||
|
|
9383287fc6 | ||
|
|
a2823830a6 | ||
|
|
6212de226a | ||
|
|
f8873048fc | ||
|
|
463e33d61c | ||
|
|
4d1af90420 | ||
|
|
e8a3c7d7f5 | ||
|
|
8ae598802c | ||
|
|
48a4c0e49c | ||
|
|
1557bbee42 | ||
|
|
4530f39fae | ||
|
|
d247733496 | ||
|
|
fc66ee567a | ||
|
|
072b98cefd | ||
|
|
bceb62f982 | ||
|
|
aacdd35c57 | ||
|
|
c0a389b086 | ||
|
|
726f9e54f5 | ||
|
|
11210ab772 | ||
|
|
624aef4a46 | ||
|
|
b6a7ee2345 | ||
|
|
5698711b3d | ||
|
|
e0f9aeab81 | ||
|
|
2f550ba8cd | ||
|
|
3f60773ec4 | ||
|
|
acaf3b684f | ||
|
|
0ec51090ae | ||
|
|
e9cb988409 | ||
|
|
c147f3f7d4 | ||
|
|
065f19e313 | ||
|
|
1214e63687 | ||
|
|
67be7eb116 | ||
|
|
b4db134e49 | ||
|
|
d7cd9e8b6b | ||
|
|
a4c3900ef0 | ||
|
|
1d00acbc9a | ||
|
|
90a8a3057c | ||
|
|
40b7ae9098 | ||
|
|
27ac93dd39 | ||
|
|
dab7bebd3c | ||
|
|
8f76537159 | ||
|
|
fd7083cb08 | ||
|
|
8ef4c71d36 | ||
|
|
240d6db210 | ||
|
|
fbfdb89e7a | ||
|
|
5c571bacc6 | ||
|
|
6f8112c700 | ||
|
|
f46c743cad | ||
|
|
33bdd0688d | ||
|
|
7f87ade3fe | ||
|
|
e2d4d14e14 | ||
|
|
ddf2f2c723 | ||
|
|
fe376887ab | ||
|
|
7b41bcca2b | ||
|
|
151dd12e3e | ||
|
|
15ea90f312 | ||
|
|
5fd6a20ebb | ||
|
|
e7df6a3e30 | ||
|
|
ba24551c56 | ||
|
|
7c2699c01a | ||
|
|
6663b6422e | ||
|
|
fe55c70658 | ||
|
|
d0822e1f9d | ||
|
|
10e5b5749e | ||
|
|
4f7f83a40e | ||
|
|
4bbbd71564 | ||
|
|
c174a8b754 | ||
|
|
0f36203b5f |
+47
-101
@@ -13,7 +13,7 @@
|
||||
#
|
||||
# Stephane Lesimple
|
||||
#
|
||||
VERSION='26.36.0808753'
|
||||
VERSION='26.36.0608872'
|
||||
|
||||
# --- Common paths and basedirs ---
|
||||
readonly VULN_SYSFS_BASE="/sys/devices/system/cpu/vulnerabilities"
|
||||
@@ -381,7 +381,6 @@ fi
|
||||
readonly INTEL_FAM6_ARROWLAKE_U=$((0xB5))
|
||||
readonly INTEL_FAM6_LUNARLAKE_M=$((0xBD)) # /* Lion Cove / Skymont */
|
||||
readonly INTEL_FAM6_PANTHERLAKE_L=$((0xCC)) # /* Cougar Cove / Darkmont */
|
||||
readonly INTEL_FAM6_PANTHERLAKE_R=$((0xE5)) # /* Cougar Cove / Darkmont */
|
||||
readonly INTEL_FAM6_WILDCATLAKE_L=$((0xD5))
|
||||
readonly INTEL_FAM18_NOVALAKE=$((0x01)) # /* Coyote Cove / Arctic Wolf */
|
||||
readonly INTEL_FAM18_NOVALAKE_L=$((0x03)) # /* Coyote Cove / Arctic Wolf */
|
||||
@@ -1219,7 +1218,6 @@ is_cpu_affected() {
|
||||
06-c5-02/82,0000011b
|
||||
06-c6-02/82,0000011b
|
||||
06-bd-01/80,00000125
|
||||
06-55-07/bf,05003901
|
||||
06-55-0b/bf,07002b01
|
||||
06-8f-07/87,2b000661
|
||||
06-8f-08/87,2b000661
|
||||
@@ -1382,9 +1380,9 @@ is_cpu_affected() {
|
||||
if [ -n "$cpupart" ] && [ -n "$cpuarch" ]; then
|
||||
# Cortex-R7 and Cortex-R8 are real-time and only used in medical devices or such
|
||||
# I can't find their CPU part number, but it's probably not that useful anyway
|
||||
# model R7 R8 A8 A9 A12 A15 A17 A57 A72 A73 A75 A76 A77 Neoverse-N1 Neoverse-V1 Neoverse-N1 Neoverse-V2 Neoverse-V3 Neoverse-V3AE
|
||||
# part ? ? c08 c09 c0d c0f c0e d07 d08 d09 d0a d0b d0d d0c d40 d49 d4f d84 d83
|
||||
# arch 7? 7? 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 8 8
|
||||
# model R7 R8 A8 A9 A12 A15 A17 A57 A72 A73 A75 A76 A77 Neoverse-N1 Neoverse-V1 Neoverse-N1 Neoverse-V2
|
||||
# part ? ? c08 c09 c0d c0f c0e d07 d08 d09 d0a d0b d0d d0c d40 d49 d4f
|
||||
# arch 7? 7? 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8
|
||||
#
|
||||
# Whitelist identified non-affected processors, use vulnerability information from
|
||||
# https://developer.arm.com/support/arm-security-updates/speculative-processor-vulnerability
|
||||
@@ -1435,13 +1433,13 @@ is_cpu_affected() {
|
||||
_infer_immune variant3a
|
||||
_set_vuln variant4
|
||||
pr_debug "checking cpu$i: armv8 A76/A77/NeoverseN1 non affected to variant 2, 3 & 3a"
|
||||
elif [ "$cpuarch" = 8 ] && echo "$cpupart" | grep -q -w -e 0xd40 -e 0xd49 -e 0xd4f -e 0xd84 -e 0xd83; then
|
||||
elif [ "$cpuarch" = 8 ] && echo "$cpupart" | grep -q -w -e 0xd40 -e 0xd49 -e 0xd4f; then
|
||||
_set_vuln variant1
|
||||
_infer_immune variant2
|
||||
_infer_immune variant3
|
||||
_infer_immune variant3a
|
||||
_infer_immune variant4
|
||||
pr_debug "checking cpu$i: armv8 NeoverseN2/V1/V2/V3/V3AE non affected to variant 2, 3, 3a & 4"
|
||||
pr_debug "checking cpu$i: armv8 NeoverseN2/V1/V2 non affected to variant 2, 3, 3a & 4"
|
||||
elif [ "$cpuarch" -le 7 ] || { [ "$cpuarch" = 8 ] && [ $((cpupart)) -lt $((0xd07)) ]; }; then
|
||||
_infer_immune variant1
|
||||
_infer_immune variant2
|
||||
@@ -1502,14 +1500,14 @@ is_cpu_affected() {
|
||||
# - arm64 (CVE-2020-13844): Cortex-A32/A34/A35/A53/A57/A72/A73 confirmed affected,
|
||||
# and broadly all speculative Armv8-A cores. No kernel mitigation merged.
|
||||
# Part numbers: A32=0xd01 A34=0xd02 A53=0xd03 A35=0xd04 A57=0xd07 A72=0xd08 A73=0xd09
|
||||
# Plus later speculative cores: A75=0xd0a A76=0xd0b A77=0xd0d N1=0xd0c V1=0xd40 N2=0xd49 V2=0xd4f V3=0xd84 V3AE=0xd83
|
||||
# Plus later speculative cores: A75=0xd0a A76=0xd0b A77=0xd0d N1=0xd0c V1=0xd40 N2=0xd49 V2=0xd4f
|
||||
if is_intel || is_amd; then
|
||||
_infer_vuln sls
|
||||
elif [ "$cpu_vendor" = ARM ]; then
|
||||
for cpupart in $cpu_part_list; do
|
||||
if echo "$cpupart" | grep -q -w -e 0xd01 -e 0xd02 -e 0xd03 -e 0xd04 \
|
||||
-e 0xd07 -e 0xd08 -e 0xd09 -e 0xd0a -e 0xd0b -e 0xd0c -e 0xd0d \
|
||||
-e 0xd40 -e 0xd49 -e 0xd4f -e 0xd84 -e 0xd83; then
|
||||
-e 0xd40 -e 0xd49 -e 0xd4f; then
|
||||
_set_vuln sls
|
||||
fi
|
||||
done
|
||||
@@ -3559,12 +3557,6 @@ is_coreos() {
|
||||
return 1
|
||||
}
|
||||
|
||||
# Check whether /proc/cpuinfo has $1 in the flags line
|
||||
# Returns: 0 if flag found, 1 otherwise
|
||||
cpuinfo_has_flag() {
|
||||
grep -Eq '^flags\b.+\b'"$1"'\b' "$g_procfs/cpuinfo" 2>/dev/null
|
||||
}
|
||||
|
||||
# >>>>>> libs/340_cpu_msr.sh <<<<<<
|
||||
|
||||
# vim: set ts=4 sw=4 sts=4 et:
|
||||
@@ -3943,8 +3935,8 @@ parse_cpu_details() {
|
||||
cap_avx2=0
|
||||
cap_avx512=0
|
||||
if [ -e "$g_procfs/cpuinfo" ]; then
|
||||
if cpuinfo_has_flag avx2; then cap_avx2=1; fi
|
||||
if cpuinfo_has_flag avx512; then cap_avx512=1; fi
|
||||
if grep -qw avx2 "$g_procfs/cpuinfo" 2>/dev/null; then cap_avx2=1; fi
|
||||
if grep -qw avx512 "$g_procfs/cpuinfo" 2>/dev/null; then cap_avx512=1; fi
|
||||
cpu_vendor=$(grep '^vendor_id' "$g_procfs/cpuinfo" | awk '{print $3}' | head -n1)
|
||||
cpu_friendly_name=$(grep '^model name' "$g_procfs/cpuinfo" | cut -d: -f2- | head -n1 | sed -e 's/^ *//')
|
||||
# ARM-style cpuinfo: parse per-core implementer/part/arch/variant/revision lists
|
||||
@@ -4186,18 +4178,8 @@ is_arm_cpu() {
|
||||
# Check whether SMT (HyperThreading) is enabled on the system
|
||||
# Returns: 0 if SMT enabled, 1 otherwise
|
||||
is_cpu_smt_enabled() {
|
||||
local siblings cpucores smt_active
|
||||
# Most reliable: /sys/devices/system/cpu/smt/active mirrors the kernel's
|
||||
# sched_smt_active() (1=SMT active, 0=not), which is exactly what the kernel
|
||||
# itself uses to derive the "SMT (disabled|vulnerable)" vulnerability strings.
|
||||
if [ -r /sys/devices/system/cpu/smt/active ]; then
|
||||
smt_active=$(cat /sys/devices/system/cpu/smt/active 2>/dev/null)
|
||||
case "$smt_active" in
|
||||
1) return 0 ;;
|
||||
0) return 1 ;;
|
||||
esac
|
||||
fi
|
||||
# Fallback: SMT / HyperThreading is enabled if siblings != cpucores
|
||||
local siblings cpucores
|
||||
# SMT / HyperThreading is enabled if siblings != cpucores
|
||||
if [ -e "$g_procfs/cpuinfo" ]; then
|
||||
siblings=$(awk '/^siblings/ {print $3;exit}' "$g_procfs/cpuinfo")
|
||||
cpucores=$(awk '/^cpu cores/ {print $4;exit}' "$g_procfs/cpuinfo")
|
||||
@@ -4649,14 +4631,7 @@ is_running_as_guest() {
|
||||
if [ "${g_is_guest_vm_cached:-0}" != 1 ]; then
|
||||
g_is_guest_vm=0
|
||||
g_is_guest_vm_reason=''
|
||||
# A Xen dom0 runs on top of the hypervisor and therefore also has the
|
||||
# 'hypervisor' CPUID flag set, but it's the privileged control domain:
|
||||
# it has direct hardware access and a truthful view of the host CPU
|
||||
# topology, so it must not be classified as a guest (#343). Check it
|
||||
# before the cpuinfo probe below, which would otherwise match.
|
||||
if is_xen_dom0; then
|
||||
g_is_guest_vm=0
|
||||
elif [ -e "$g_procfs/cpuinfo" ] && grep -qw 'hypervisor' "$g_procfs/cpuinfo" 2>/dev/null; then
|
||||
if [ -e "$g_procfs/cpuinfo" ] && grep -qw 'hypervisor' "$g_procfs/cpuinfo" 2>/dev/null; then
|
||||
g_is_guest_vm=1
|
||||
g_is_guest_vm_reason="'hypervisor' flag in $g_procfs/cpuinfo"
|
||||
fi
|
||||
@@ -5289,7 +5264,7 @@ check_cpu() {
|
||||
fi
|
||||
if [ -z "$cap_ibrs" ] && [ $ret = $READ_CPUID_RET_ERR ] && has_runtime; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
if cpuinfo_has_flag ibrs; then
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw ibrs; then
|
||||
cap_ibrs='IBRS (cpuinfo)'
|
||||
cap_spec_ctrl=1
|
||||
pstatus green YES "ibrs flag in $g_procfs/cpuinfo"
|
||||
@@ -5364,7 +5339,7 @@ check_cpu() {
|
||||
if [ $ret = $READ_CPUID_RET_OK ]; then
|
||||
cap_ibpb='IBPB_SUPPORT'
|
||||
pstatus green YES "IBPB_SUPPORT feature bit"
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && cpuinfo_has_flag ibpb; then
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && grep ^flags "$g_procfs/cpuinfo" | grep -qw ibpb; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
cap_ibpb='IBPB (cpuinfo)'
|
||||
pstatus green YES "ibpb flag in $g_procfs/cpuinfo"
|
||||
@@ -5437,7 +5412,7 @@ check_cpu() {
|
||||
fi
|
||||
if [ -z "$cap_stibp" ] && [ $ret = $READ_CPUID_RET_ERR ] && has_runtime; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
if cpuinfo_has_flag stibp; then
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw stibp; then
|
||||
cap_stibp='STIBP (cpuinfo)'
|
||||
pstatus green YES "stibp flag in $g_procfs/cpuinfo"
|
||||
ret=$READ_CPUID_RET_OK
|
||||
@@ -5509,9 +5484,9 @@ check_cpu() {
|
||||
|
||||
if [ -z "$cap_ssbd" ] && [ "$ret24" = $READ_CPUID_RET_ERR ] && [ "$ret25" = $READ_CPUID_RET_ERR ] && has_runtime; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
if cpuinfo_has_flag ssbd; then
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw ssbd; then
|
||||
cap_ssbd='SSBD (cpuinfo)'
|
||||
elif cpuinfo_has_flag virt_ssbd; then
|
||||
elif grep ^flags "$g_procfs/cpuinfo" | grep -qw virt_ssbd; then
|
||||
cap_ssbd='SSBD in VIRT_SPEC_CTRL (cpuinfo)'
|
||||
fi
|
||||
fi
|
||||
@@ -5571,7 +5546,7 @@ check_cpu() {
|
||||
if [ $ret = $READ_CPUID_RET_OK ]; then
|
||||
pstatus green YES "L1D flush feature bit"
|
||||
cap_l1df=1
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && cpuinfo_has_flag flush_l1d; then
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && grep ^flags "$g_procfs/cpuinfo" | grep -qw flush_l1d; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
pstatus green YES "flush_l1d flag in $g_procfs/cpuinfo"
|
||||
cap_l1df=1
|
||||
@@ -5591,7 +5566,7 @@ check_cpu() {
|
||||
if [ $ret = $READ_CPUID_RET_OK ]; then
|
||||
cap_md_clear=1
|
||||
pstatus green YES "MD_CLEAR feature bit"
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && cpuinfo_has_flag md_clear; then
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && grep ^flags "$g_procfs/cpuinfo" | grep -qw md_clear; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
cap_md_clear=1
|
||||
pstatus green YES "md_clear flag in $g_procfs/cpuinfo"
|
||||
@@ -5661,7 +5636,7 @@ check_cpu() {
|
||||
if [ $ret = $READ_CPUID_RET_OK ]; then
|
||||
pstatus green YES
|
||||
cap_arch_capabilities=1
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && cpuinfo_has_flag arch_capabilities; then
|
||||
elif [ $ret = $READ_CPUID_RET_ERR ] && has_runtime && grep ^flags "$g_procfs/cpuinfo" | grep -qw arch_capabilities; then
|
||||
# CPUID device unavailable (e.g. in a VM): fall back to /proc/cpuinfo
|
||||
pstatus green YES "arch_capabilities flag in $g_procfs/cpuinfo"
|
||||
cap_arch_capabilities=1
|
||||
@@ -6540,7 +6515,7 @@ check_mds_linux() {
|
||||
if is_x86_kernel; then
|
||||
pr_info_nol "* Kernel supports using MD_CLEAR mitigation: "
|
||||
kernel_md_clear_can_tell=1
|
||||
if [ "$g_mode" = live ] && cpuinfo_has_flag md_clear; then
|
||||
if [ "$g_mode" = live ] && grep ^flags "$g_procfs/cpuinfo" | grep -qw md_clear; then
|
||||
kernel_md_clear="md_clear found in $g_procfs/cpuinfo"
|
||||
pstatus green YES "$kernel_md_clear"
|
||||
fi
|
||||
@@ -6577,21 +6552,11 @@ check_mds_linux() {
|
||||
mds_smt_mitigated=1
|
||||
pstatus green YES
|
||||
elif echo "$ret_sys_interface_check_fullmsg" | grep -q 'SMT Host state unknown'; then
|
||||
# The kernel appends "SMT Host state unknown" whenever the
|
||||
# HYPERVISOR CPUID bit is set. That's true both inside a guest
|
||||
# AND on a Xen dom0 (#343). In a guest we genuinely can't see
|
||||
# the host's SMT scheduling; on dom0/bare metal the local SMT
|
||||
# state is authoritative, so trust it there.
|
||||
if is_running_as_guest; then
|
||||
# The kernel appends "SMT Host state unknown" when running under
|
||||
# a hypervisor (X86_FEATURE_HYPERVISOR): the host controls SMT
|
||||
# scheduling, so it can't be determined from inside the guest (#343).
|
||||
mds_smt_mitigated=2
|
||||
pstatus yellow UNKNOWN "running in a VM guest, the hypervisor host controls SMT"
|
||||
elif is_cpu_smt_enabled; then
|
||||
mds_smt_mitigated=0
|
||||
pstatus yellow NO
|
||||
else
|
||||
mds_smt_mitigated=1
|
||||
pstatus green YES
|
||||
fi
|
||||
else
|
||||
mds_smt_mitigated=0
|
||||
pstatus yellow NO
|
||||
@@ -6905,21 +6870,11 @@ check_mmio_linux() {
|
||||
mmio_smt_mitigated=1
|
||||
pstatus green YES
|
||||
elif echo "$ret_sys_interface_check_fullmsg" | grep -q 'SMT Host state unknown'; then
|
||||
# The kernel appends "SMT Host state unknown" whenever the
|
||||
# HYPERVISOR CPUID bit is set. That's true both inside a guest
|
||||
# AND on a Xen dom0 (#343). In a guest we genuinely can't see
|
||||
# the host's SMT scheduling; on dom0/bare metal the local SMT
|
||||
# state is authoritative, so trust it there.
|
||||
if is_running_as_guest; then
|
||||
# The kernel appends "SMT Host state unknown" when running under
|
||||
# a hypervisor (X86_FEATURE_HYPERVISOR): the host controls SMT
|
||||
# scheduling, so it can't be determined from inside the guest (#343).
|
||||
mmio_smt_mitigated=2
|
||||
pstatus yellow UNKNOWN "running in a VM guest, the hypervisor host controls SMT"
|
||||
elif is_cpu_smt_enabled; then
|
||||
mmio_smt_mitigated=0
|
||||
pstatus yellow NO
|
||||
else
|
||||
mmio_smt_mitigated=1
|
||||
pstatus green YES
|
||||
fi
|
||||
else
|
||||
mmio_smt_mitigated=0
|
||||
pstatus yellow NO
|
||||
@@ -7880,7 +7835,7 @@ check_CVE_2017_5715_linux() {
|
||||
# which in that case means ibrs is supported *and* enabled for kernel & user
|
||||
# as per the ibrs patch series v3
|
||||
if [ -z "$g_ibrs_supported" ]; then
|
||||
if cpuinfo_has_flag spec_ctrl_ibrs; then
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw spec_ctrl_ibrs; then
|
||||
pr_debug "ibrs: found spec_ctrl_ibrs flag in $g_procfs/cpuinfo"
|
||||
g_ibrs_supported="spec_ctrl_ibrs flag in $g_procfs/cpuinfo"
|
||||
# enabled=2 -> kernel & user
|
||||
@@ -9136,7 +9091,7 @@ check_CVE_2017_5753_bsd() {
|
||||
pti_performance_check() {
|
||||
local ret pcid invpcid
|
||||
pr_info_nol " * Reduced performance impact of PTI: "
|
||||
if cpuinfo_has_flag pcid; then
|
||||
if [ -e "$g_procfs/cpuinfo" ] && grep ^flags "$g_procfs/cpuinfo" | grep -qw pcid; then
|
||||
pcid=1
|
||||
else
|
||||
read_cpuid 0x1 0x0 "$ECX" 17 1 1
|
||||
@@ -9146,7 +9101,7 @@ pti_performance_check() {
|
||||
fi
|
||||
fi
|
||||
|
||||
if cpuinfo_has_flag invpcid; then
|
||||
if [ -e "$g_procfs/cpuinfo" ] && grep ^flags "$g_procfs/cpuinfo" | grep -qw invpcid; then
|
||||
invpcid=1
|
||||
else
|
||||
read_cpuid 0x7 0x0 "$EBX" 10 1 1
|
||||
@@ -9235,11 +9190,11 @@ check_CVE_2017_5754_linux() {
|
||||
dmesg_grep="$dmesg_grep|x86/pti: Unmapping kernel while in userspace"
|
||||
# aarch64
|
||||
dmesg_grep="$dmesg_grep|CPU features: detected( feature)?: Kernel page table isolation \(KPTI\)"
|
||||
if cpuinfo_has_flag pti; then
|
||||
if grep ^flags "$g_procfs/cpuinfo" | grep -qw pti; then
|
||||
# vanilla PTI patch sets the 'pti' flag in cpuinfo
|
||||
pr_debug "kpti_enabled: found 'pti' flag in $g_procfs/cpuinfo"
|
||||
kpti_enabled=1
|
||||
elif cpuinfo_has_flag kaiser; then
|
||||
elif grep ^flags "$g_procfs/cpuinfo" | grep -qw kaiser; then
|
||||
# kernel line 4.9 sets the 'kaiser' flag in cpuinfo
|
||||
pr_debug "kpti_enabled: found 'kaiser' flag in $g_procfs/cpuinfo"
|
||||
kpti_enabled=1
|
||||
@@ -10074,7 +10029,7 @@ check_CVE_2018_3646_linux() {
|
||||
|
||||
pr_info "* Mitigation 2"
|
||||
pr_info_nol " * L1D flush is supported by kernel: "
|
||||
if [ "$g_mode" = live ] && cpuinfo_has_flag flush_l1d; then
|
||||
if [ "$g_mode" = live ] && grep -qw flush_l1d "$g_procfs/cpuinfo"; then
|
||||
l1d_kernel="found flush_l1d in $g_procfs/cpuinfo"
|
||||
fi
|
||||
if [ -z "$l1d_kernel" ]; then
|
||||
@@ -10147,7 +10102,7 @@ check_CVE_2018_3646_linux() {
|
||||
|
||||
pr_info_nol " * Hardware-backed L1D flush supported: "
|
||||
if [ "$g_mode" = live ]; then
|
||||
if cpuinfo_has_flag flush_l1d || [ -n "$l1d_xen_hardware" ]; then
|
||||
if grep -qw flush_l1d "$g_procfs/cpuinfo" || [ -n "$l1d_xen_hardware" ]; then
|
||||
pstatus green YES "performance impact of the mitigation will be greatly reduced"
|
||||
else
|
||||
pstatus blue NO "flush will be done in software, this is slower"
|
||||
@@ -10359,18 +10314,10 @@ check_CVE_2019_11135_linux() {
|
||||
elif echo "$ret_sys_interface_check_fullmsg" | grep -qF 'SMT vulnerable'; then
|
||||
pvulnstatus "$cve" VULN "SMT (HyperThreading) must be disabled for full mitigation"
|
||||
elif echo "$ret_sys_interface_check_fullmsg" | grep -qF 'SMT Host state unknown'; then
|
||||
# "SMT Host state unknown" is emitted whenever the HYPERVISOR
|
||||
# CPUID bit is set -- true both inside a guest AND on a Xen dom0
|
||||
# (#343). In a guest we can't see the host's SMT scheduling; on
|
||||
# dom0/bare metal the local SMT state is authoritative, so trust
|
||||
# it there.
|
||||
if is_running_as_guest; then
|
||||
# The kernel appends "SMT Host state unknown" when running under a
|
||||
# hypervisor (X86_FEATURE_HYPERVISOR): the host controls SMT
|
||||
# scheduling, so it can't be determined from inside the guest (#343).
|
||||
pvulnstatus "$cve" UNK "TAA is mitigated and TSX is disabled, but SMT (Hyper-Threading) cross-thread protection can't be verified from inside a VM guest: it depends on the hypervisor host's SMT/core-scheduling configuration"
|
||||
elif is_cpu_smt_enabled; then
|
||||
pvulnstatus "$cve" VULN "SMT (HyperThreading) must be disabled for full mitigation"
|
||||
else
|
||||
pvulnstatus "$cve" "$status" "$msg"
|
||||
fi
|
||||
else
|
||||
pvulnstatus "$cve" "$status" "$msg"
|
||||
fi
|
||||
@@ -13386,7 +13333,7 @@ exit 0 # ok
|
||||
# with X being either I for Intel, or A for AMD
|
||||
# When the date is unknown it defaults to 20000101
|
||||
|
||||
# %%% MCEDB v351+i20260512+16e5
|
||||
# %%% MCEDB v350+i20260512+1cce
|
||||
# I,0x00000611,0xFF,0x00000B27,19961218
|
||||
# I,0x00000612,0xFF,0x000000C6,19961210
|
||||
# I,0x00000616,0xFF,0x000000C6,19961210
|
||||
@@ -13835,11 +13782,10 @@ exit 0 # ok
|
||||
# I,0x000C06C3,0x90,0x0000011B,20260324
|
||||
# I,0x000C06F1,0x87,0x210002E0,20251217
|
||||
# I,0x000C06F2,0x87,0x210002E0,20251217
|
||||
# I,0x000D0650,0xFF,0x00000009,20260309
|
||||
# I,0x000D0651,0xFF,0x00000009,20260309
|
||||
# I,0x000D0650,0xFF,0x00000008,20260208
|
||||
# I,0x000D0651,0xFF,0x00000008,20260208
|
||||
# I,0x000D0670,0xFF,0x00000137,20260218
|
||||
# I,0x000D06D0,0xFF,0x80000370,20250917
|
||||
# I,0x000D06D1,0xFF,0x01000120,20260325
|
||||
# I,0x00FF0671,0xFF,0x0000010E,20220907
|
||||
# I,0x00FF0672,0xFF,0x0000000D,20210816
|
||||
# I,0x00FF0675,0xFF,0x0000000D,20210816
|
||||
@@ -13941,8 +13887,8 @@ exit 0 # ok
|
||||
# A,0x008A0F00,0xFF,0x08A0000B,20241125
|
||||
# A,0x00A00F00,0xFF,0x0A000033,20200413
|
||||
# A,0x00A00F10,0xFF,0x0A00107A,20240226
|
||||
# A,0x00A00F11,0xFF,0x0A0011DF,20260312
|
||||
# A,0x00A00F12,0xFF,0x0A00124B,20260305
|
||||
# A,0x00A00F11,0xFF,0x0A0011DE,20250418
|
||||
# A,0x00A00F12,0xFF,0x0A001247,20250327
|
||||
# A,0x00A00F80,0xFF,0x0A008005,20230707
|
||||
# A,0x00A00F82,0xFF,0x0A00820F,20241111
|
||||
# A,0x00A10F00,0xFF,0x0A10004B,20220309
|
||||
@@ -13988,8 +13934,8 @@ exit 0 # ok
|
||||
# A,0x00B10F10,0xFF,0x0B101059,20251105
|
||||
# A,0x00B20F40,0xFF,0x0B204037,20251019
|
||||
# A,0x00B40F00,0xFF,0x0B400034,20240318
|
||||
# A,0x00B40F40,0xFF,0x0B404038,20260408
|
||||
# A,0x00B40F41,0xFF,0x0B40410B,20260408
|
||||
# A,0x00B60F00,0xFF,0x0B60003C,20260401
|
||||
# A,0x00B60F80,0xFF,0x0B60803C,20260401
|
||||
# A,0x00B40F40,0xFF,0x0B404035,20251020
|
||||
# A,0x00B40F41,0xFF,0x0B404108,20251020
|
||||
# A,0x00B60F00,0xFF,0x0B600037,20251019
|
||||
# A,0x00B60F80,0xFF,0x0B608038,20251019
|
||||
# A,0x00B70F00,0xFF,0x0B700037,20251019
|
||||
|
||||
Reference in New Issue
Block a user