summaryrefslogtreecommitdiff
path: root/fuzz/fuzz_config.h
diff options
context:
space:
mode:
authorHoward Yang <hcyang@google.com>2021-09-16 16:06:45 +0800
committerCommit Bot <commit-bot@chromium.org>2021-10-07 07:38:13 +0000
commit3cac98670745fc5ca82a058fab512567f8444759 (patch)
treeabd10abc470a197e3c81c9971b9277965fc9b140 /fuzz/fuzz_config.h
parentaf9fd4fba4285b0bd73b96ff6c58e7fcc950c441 (diff)
downloadchrome-ec-stabilize-14268.67.B-cr50_stab.tar.gz
Currently there's only one fuzzer for Pinweaver and one for host commands in cr50. Add a fuzzer for the u2f commands (generate, sign, attest) used in the WebAuthn flow to ensure its security. Most regions of the concerning functions are covered except for pure error code returns and unreachable regions (currently auth secret is not used in sign and attest command yet). Rename old cr50_fuzz namings to pinweaver_fuzz, since they only cover Pinweaver commands. BUG=b:172367435 TEST=make buildall -j TEST=make host-u2f_fuzz && \ ./build/host/u2f_fuzz/u2f_fuzz.exe -timeout=10 \ -ignore_ooms=false -ignore_timeouts=false -fork=71; \ llvm-profdata merge -sparse default.profraw -o default.profdata; \ llvm-cov show ./build/host/u2f_fuzz/u2f_fuzz.exe \ -object ./build/host/u2f_fuzz/RO/board/cr50/dcrypto/u2f.o \ --instr-profile default.profdata \ board/cr50/dcrypto/u2f.c common/u2f.c > report Cq-Depend: chromium:3162473 Change-Id: I02b820cf03f7b46ccad7c3bc7b82e73ff45217c6 Signed-off-by: Howard Yang <hcyang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3162469 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Reviewed-by: Leo Lai <cylai@google.com>
Diffstat (limited to 'fuzz/fuzz_config.h')
-rw-r--r--fuzz/fuzz_config.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/fuzz/fuzz_config.h b/fuzz/fuzz_config.h
index 781921870a..bb10294c3c 100644
--- a/fuzz/fuzz_config.h
+++ b/fuzz/fuzz_config.h
@@ -12,7 +12,7 @@
/* Disable hibernate: We never want to exit while fuzzing. */
#undef CONFIG_HIBERNATE
-#ifdef TEST_CR50_FUZZ
+#ifdef TEST_PINWEAVER_FUZZ
#define CONFIG_DCRYPTO
#define CONFIG_PINWEAVER
#define CONFIG_UPTO_SHA512
@@ -80,7 +80,7 @@ enum nvmem_users {
/******************************************************************************/
#define CONFIG_SW_CRC
-#endif /* TEST_CR50_FUZZ */
+#endif /* TEST_PINWEAVER_FUZZ */
#ifdef TEST_HOST_COMMAND_FUZZ
#undef CONFIG_HOSTCMD_DEBUG_MODE
@@ -102,11 +102,11 @@ enum nvmem_users {
#endif /* TEST_HOST_COMMAND_FUZZ */
-#ifdef TEST_CR50_U2F_FUZZ
+#ifdef TEST_U2F_FUZZ
#define CONFIG_DCRYPTO
#define CONFIG_U2F
#define CC_EXTENSION CC_COMMAND
-#endif /* TEST_CR50_U2F_FUZZ */
+#endif /* TEST_U2F_FUZZ */
#endif /* TEST_FUZZ */
#endif /* __FUZZ_FUZZ_CONFIG_H */