diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index b24373f..a562e7f 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -298,16 +298,16 @@ This is where the real detection lives. Check for mitigations at each layer: ``` Guard with `if [ -n "$g_kernel_err" ]; then` first - the kernel image may be unavailable. - - **Kernel config** (`$g_kernel_config`): Look for the `CONFIG_*` option that enables the mitigation. + - **Kernel config** (`$opt_config`): Look for the `CONFIG_*` option that enables the mitigation. ```sh - if [ -n "$g_kernel_config" ] && grep -q '^CONFIG_MITIGATION_NAME=y' "$g_kernel_config"; then + if [ -n "$opt_config" ] && grep -q '^CONFIG_MITIGATION_NAME=y' "$opt_config"; then kernel_mitigated="found mitigation config option enabled" fi ``` - - **System.map** (`$g_kernel_map`): Look for function names directly linked to the mitigation. + - **System.map** (`$opt_map`): Look for function names directly linked to the mitigation. ```sh - if [ -n "$g_kernel_map" ] && grep -q 'mitigation_function_name' "$g_kernel_map"; then + if [ -n "$opt_map" ] && grep -q 'mitigation_function_name' "$opt_map"; then kernel_mitigated="found mitigation function in System.map" fi ``` diff --git a/src/vulns/CVE-2024-36350.sh b/src/vulns/CVE-2024-36350.sh index 7b44446..7a24f09 100644 --- a/src/vulns/CVE-2024-36350.sh +++ b/src/vulns/CVE-2024-36350.sh @@ -82,8 +82,8 @@ check_CVE_2024_36350_linux() { kernel_tsa="CONFIG_MITIGATION_TSA=y found in kernel config" fi fi - if [ -z "$kernel_tsa" ] && [ -n "$g_kernel_map" ]; then - if grep -q 'tsa_select_mitigation' "$g_kernel_map"; then + if [ -z "$kernel_tsa" ] && [ -n "$opt_map" ]; then + if grep -q 'tsa_select_mitigation' "$opt_map"; then kernel_tsa="found tsa_select_mitigation in System.map" fi fi diff --git a/src/vulns/CVE-2024-36357.sh b/src/vulns/CVE-2024-36357.sh index 8fee465..a5cc825 100644 --- a/src/vulns/CVE-2024-36357.sh +++ b/src/vulns/CVE-2024-36357.sh @@ -82,8 +82,8 @@ check_CVE_2024_36357_linux() { kernel_tsa="CONFIG_MITIGATION_TSA=y found in kernel config" fi fi - if [ -z "$kernel_tsa" ] && [ -n "$g_kernel_map" ]; then - if grep -q 'tsa_select_mitigation' "$g_kernel_map"; then + if [ -z "$kernel_tsa" ] && [ -n "$opt_map" ]; then + if grep -q 'tsa_select_mitigation' "$opt_map"; then kernel_tsa="found tsa_select_mitigation in System.map" fi fi