diff options
author | Michael Boelen <michael.boelen@cisofy.com> | 2021-05-11 20:56:55 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-11 20:56:55 +0300 |
commit | efc71ae6bb2165cd56a089f3b2872b1846421325 (patch) | |
tree | 8e16e464d18f7d35508a66bf45a5b73474ca6c31 | |
parent | 4cfd59d60cd6f746a16ec3d6cb1e8f0c5b763508 (diff) | |
parent | 3d2f57fe1d3b0597d0c45a01d9f2c1f625e52c47 (diff) |
Merge pull request #1119 from NicolaiSoeborg/add-MOR-bit-check
Check MemoryOverwriteRequest Control
-rw-r--r-- | include/tests_crypto | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/tests_crypto b/include/tests_crypto index d41a55ce..227401c3 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -293,6 +293,32 @@ # ################################################################################# # + # Test : CRYP-8006 + # Description : Check that the MemoryOverwriteRequest-bit is set to protect against cold-boot attacks + Register --test-no CRYP-8006 --os Linux --weight L --network NO --root-only NO --category security --description "MemoryOverwriteRequest-bit set" + if [ ${SKIPTEST} -eq 0 ]; then + MOR_CONTROL="${ROOTDIR}sys/firmware/efi/efivars/MemoryOverwriteRequestControl-e20939be-32d4-41be-a150-897f85d49829" + LogText "Test: looking for ${MOR_CONTROL}" + if [ -f "${MOR_CONTROL}" ]; then + DATA=$(od -An --skip-bytes=4 "$MOR_CONTROL") + if [ "$DATA" = " 000001" ]; then + LogText "Result: MOR-bit set" + Display --indent 2 --text "MOR-bit set" --result "${STATUS_YES}" --color GREEN + elif [ "$DATA" = " 000000" ]; then + LogText "Result: MOR-bit not set!" + Display --indent 2 --text "MOR-bit set" --result "${STATUS_NO}" --color RED + else + LogText "Result: MOR-bit unknown. Found: $DATA" + Display --indent 2 --text "MOR-bit set" --result "${STATUS_UNKNOWN}" --color YELLOW + fi + else + LogText "Result: could not find ${MOR_CONTROL}" + Display --indent 2 --text "- MOR variable not found" --result "${STATUS_WEAK}" --color WHITE + fi + fi +# +################################################################################# +# Report "rng_found=${RNG_FOUND}" # ################################################################################# |