From bff38f1b267bb277b481ba0e98a8811cbd930b15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lesimple?= Date: Tue, 18 Sep 2018 22:06:01 +0200 Subject: [PATCH] BSD: add not-implemented-yet notice for Foreshadow-NG --- spectre-meltdown-checker.sh | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/spectre-meltdown-checker.sh b/spectre-meltdown-checker.sh index c9bbb91..3a39c86 100755 --- a/spectre-meltdown-checker.sh +++ b/spectre-meltdown-checker.sh @@ -3521,7 +3521,17 @@ check_CVE_2018_3620() { cve='CVE-2018-3620' _info "\033[1;34m$cve aka '$(cve2name "$cve")'\033[0m" + if [ "$os" = Linux ]; then + check_CVE_2018_3620_linux + elif echo "$os" | grep -q BSD; then + check_CVE_2018_3620_bsd + else + _warn "Unsupported OS ($os)" + fi +} +check_CVE_2018_3620_linux() +{ status=UNK sys_interface_available=0 msg='' @@ -3586,12 +3596,31 @@ check_CVE_2018_3620() fi } +check_CVE_2018_3620_bsd() +{ + if ! is_cpu_vulnerable "$cve"; then + pvulnstatus $cve OK "your CPU vendor reported your CPU model as not vulnerable" + else + pvulnstatus $cve UNK "check not implemented yet under BSD" + fi +} + # L1TF VMM check_CVE_2018_3646() { cve='CVE-2018-3646' _info "\033[1;34m$cve aka '$(cve2name "$cve")'\033[0m" + if [ "$os" = Linux ]; then + check_CVE_2018_3646_linux + elif echo "$os" | grep -q BSD; then + check_CVE_2018_3646_bsd + else + _warn "Unsupported OS ($os)" + fi +} +check_CVE_2018_3646_linux() +{ status=UNK sys_interface_available=0 msg='' @@ -3742,6 +3771,15 @@ check_CVE_2018_3646() fi } +check_CVE_2018_3646_bsd() +{ + if ! is_cpu_vulnerable "$cve"; then + pvulnstatus $cve OK "your CPU vendor reported your CPU model as not vulnerable" + else + pvulnstatus $cve UNK "check not implemented yet under BSD" + fi +} + if [ "$opt_no_hw" = 0 ] && [ -z "$opt_arch_prefix" ]; then check_cpu check_cpu_vulnerabilities