mirror of
https://github.com/speed47/spectre-meltdown-checker.git
synced 2026-04-11 11:13:21 +02:00
fix: remove useless checks under ARM for CVE-2023-28746
built from commit 48454a5344
dated 2026-04-10 19:50:15 +0200
by Stéphane Lesimple (speed47_github@speed47.net)
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#
|
#
|
||||||
# Stephane Lesimple
|
# Stephane Lesimple
|
||||||
#
|
#
|
||||||
VERSION='26.32.0410728'
|
VERSION='26.32.0410743'
|
||||||
|
|
||||||
# --- Common paths and basedirs ---
|
# --- Common paths and basedirs ---
|
||||||
readonly VULN_SYSFS_BASE="/sys/devices/system/cpu/vulnerabilities"
|
readonly VULN_SYSFS_BASE="/sys/devices/system/cpu/vulnerabilities"
|
||||||
@@ -11147,44 +11147,48 @@ check_CVE_2023_28746_linux() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$opt_sysfs_only" != 1 ]; then
|
if [ "$opt_sysfs_only" != 1 ]; then
|
||||||
pr_info_nol "* CPU microcode mitigates the vulnerability: "
|
if is_x86_cpu; then
|
||||||
if [ "$cap_rfds_clear" = 1 ]; then
|
pr_info_nol "* CPU microcode mitigates the vulnerability: "
|
||||||
pstatus green YES "RFDS_CLEAR capability indicated by microcode"
|
if [ "$cap_rfds_clear" = 1 ]; then
|
||||||
elif [ "$cap_rfds_clear" = 0 ]; then
|
pstatus green YES "RFDS_CLEAR capability indicated by microcode"
|
||||||
pstatus yellow NO
|
elif [ "$cap_rfds_clear" = 0 ]; then
|
||||||
else
|
pstatus yellow NO
|
||||||
pstatus yellow UNKNOWN "couldn't read MSR"
|
else
|
||||||
fi
|
pstatus yellow UNKNOWN "couldn't read MSR"
|
||||||
|
|
||||||
pr_info_nol "* Kernel supports RFDS mitigation (VERW on transitions): "
|
|
||||||
kernel_rfds=''
|
|
||||||
kernel_rfds_err=''
|
|
||||||
if [ -n "$g_kernel_err" ]; then
|
|
||||||
kernel_rfds_err="$g_kernel_err"
|
|
||||||
elif is_x86_kernel && grep -q 'Clear Register File' "$g_kernel"; then
|
|
||||||
kernel_rfds="found 'Clear Register File' string in kernel image"
|
|
||||||
elif is_x86_kernel && grep -q 'reg_file_data_sampling' "$g_kernel"; then
|
|
||||||
kernel_rfds="found reg_file_data_sampling in kernel image"
|
|
||||||
fi
|
|
||||||
if [ -z "$kernel_rfds" ] && is_x86_kernel && [ -r "$opt_config" ]; then
|
|
||||||
if grep -q '^CONFIG_MITIGATION_RFDS=y' "$opt_config"; then
|
|
||||||
kernel_rfds="RFDS mitigation config option found enabled in kernel config"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "$kernel_rfds" ] && is_x86_kernel && [ -n "$opt_map" ]; then
|
|
||||||
if grep -q 'rfds_select_mitigation' "$opt_map"; then
|
if is_x86_kernel; then
|
||||||
kernel_rfds="found rfds_select_mitigation in System.map"
|
pr_info_nol "* Kernel supports RFDS mitigation (VERW on transitions): "
|
||||||
|
kernel_rfds=''
|
||||||
|
kernel_rfds_err=''
|
||||||
|
if [ -n "$g_kernel_err" ]; then
|
||||||
|
kernel_rfds_err="$g_kernel_err"
|
||||||
|
elif grep -q 'Clear Register File' "$g_kernel"; then
|
||||||
|
kernel_rfds="found 'Clear Register File' string in kernel image"
|
||||||
|
elif grep -q 'reg_file_data_sampling' "$g_kernel"; then
|
||||||
|
kernel_rfds="found reg_file_data_sampling in kernel image"
|
||||||
|
fi
|
||||||
|
if [ -z "$kernel_rfds" ] && [ -r "$opt_config" ]; then
|
||||||
|
if grep -q '^CONFIG_MITIGATION_RFDS=y' "$opt_config"; then
|
||||||
|
kernel_rfds="RFDS mitigation config option found enabled in kernel config"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -z "$kernel_rfds" ] && [ -n "$opt_map" ]; then
|
||||||
|
if grep -q 'rfds_select_mitigation' "$opt_map"; then
|
||||||
|
kernel_rfds="found rfds_select_mitigation in System.map"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -n "$kernel_rfds" ]; then
|
||||||
|
pstatus green YES "$kernel_rfds"
|
||||||
|
elif [ -n "$kernel_rfds_err" ]; then
|
||||||
|
pstatus yellow UNKNOWN "$kernel_rfds_err"
|
||||||
|
else
|
||||||
|
pstatus yellow NO
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -n "$kernel_rfds" ]; then
|
|
||||||
pstatus green YES "$kernel_rfds"
|
|
||||||
elif [ -n "$kernel_rfds_err" ]; then
|
|
||||||
pstatus yellow UNKNOWN "$kernel_rfds_err"
|
|
||||||
else
|
|
||||||
pstatus yellow NO
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$g_mode" = live ] && [ "$sys_interface_available" = 1 ]; then
|
if is_x86_cpu && [ "$g_mode" = live ] && [ "$sys_interface_available" = 1 ]; then
|
||||||
pr_info_nol "* RFDS mitigation is enabled and active: "
|
pr_info_nol "* RFDS mitigation is enabled and active: "
|
||||||
if echo "$ret_sys_interface_check_fullmsg" | grep -qi '^Mitigation'; then
|
if echo "$ret_sys_interface_check_fullmsg" | grep -qi '^Mitigation'; then
|
||||||
rfds_mitigated=1
|
rfds_mitigated=1
|
||||||
|
|||||||
Reference in New Issue
Block a user