mirror of
https://github.com/speed47/spectre-meltdown-checker
synced 2025-01-10 13:08:14 +01:00
Compare commits
2 Commits
59ad312773
...
5ca7fe91ff
Author | SHA1 | Date | |
---|---|---|---|
|
5ca7fe91ff | ||
|
4ba68fba74 |
@ -1111,6 +1111,7 @@ try_decompress()
|
|||||||
_debug "try_decompress: magic for $3 found at offset $pos"
|
_debug "try_decompress: magic for $3 found at offset $pos"
|
||||||
if ! command -v "$3" >/dev/null 2>&1; then
|
if ! command -v "$3" >/dev/null 2>&1; then
|
||||||
kernel_err="missing '$3' tool, please install it, usually it's in the '$5' package"
|
kernel_err="missing '$3' tool, please install it, usually it's in the '$5' package"
|
||||||
|
_debug "try_decompress: $kernel_err"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
pos=${pos%%:*}
|
pos=${pos%%:*}
|
||||||
@ -1144,6 +1145,7 @@ extract_kernel()
|
|||||||
|
|
||||||
# Initial attempt for uncompressed images or objects:
|
# Initial attempt for uncompressed images or objects:
|
||||||
if check_kernel "$1"; then
|
if check_kernel "$1"; then
|
||||||
|
_debug "extract_kernel: found kernel is valid, no decompression needed"
|
||||||
cat "$1" > "$kerneltmp"
|
cat "$1" > "$kerneltmp"
|
||||||
kernel=$kerneltmp
|
kernel=$kerneltmp
|
||||||
return 0
|
return 0
|
||||||
@ -3973,7 +3975,8 @@ check_CVE_2018_3639_linux()
|
|||||||
|
|
||||||
if [ "$kernel_ssbd_enabled" = 1 ]; then
|
if [ "$kernel_ssbd_enabled" = 1 ]; then
|
||||||
_info_nol "* SSB mitigation currently active for selected processes: "
|
_info_nol "* SSB mitigation currently active for selected processes: "
|
||||||
mitigated_processes=$(grep -El 'Speculation.?Store.?Bypass:[[:space:]]+thread (force )?mitigated' /proc/*/status \
|
# silence grep's stderr here to avoid ENOENT errors from processes that have exited since the shell's expansion of the *
|
||||||
|
mitigated_processes=$(grep -El 'Speculation.?Store.?Bypass:[[:space:]]+thread (force )?mitigated' /proc/*/status 2>/dev/null \
|
||||||
| sed s/status/exe/ | xargs -r -n1 readlink -f | xargs -r -n1 basename | sort -u | tr "\n" " " | sed 's/ $//')
|
| sed s/status/exe/ | xargs -r -n1 readlink -f | xargs -r -n1 basename | sort -u | tr "\n" " " | sed 's/ $//')
|
||||||
if [ -n "$mitigated_processes" ]; then
|
if [ -n "$mitigated_processes" ]; then
|
||||||
pstatus green YES "$mitigated_processes"
|
pstatus green YES "$mitigated_processes"
|
||||||
@ -4130,6 +4133,10 @@ check_CVE_2018_3620_linux()
|
|||||||
if [ "$opt_sysfs_only" != 1 ]; then
|
if [ "$opt_sysfs_only" != 1 ]; then
|
||||||
_info_nol "* Kernel supports PTE inversion: "
|
_info_nol "* Kernel supports PTE inversion: "
|
||||||
if ! command -v "${opt_arch_prefix}strings" >/dev/null 2>&1; then
|
if ! command -v "${opt_arch_prefix}strings" >/dev/null 2>&1; then
|
||||||
|
pstatus yellow UNKNOWN "missing 'strings' tool, please install it"
|
||||||
|
pteinv_supported=-1
|
||||||
|
elif [ -n "$kernel_err" ]; then
|
||||||
|
pstatus yellow UNKNOWN "$kernel_err"
|
||||||
pteinv_supported=-1
|
pteinv_supported=-1
|
||||||
else
|
else
|
||||||
if "${opt_arch_prefix}strings" "$kernel" | grep -Fq 'PTE Inversion'; then
|
if "${opt_arch_prefix}strings" "$kernel" | grep -Fq 'PTE Inversion'; then
|
||||||
|
Loading…
Reference in New Issue
Block a user