aboutsummaryrefslogtreecommitdiff
path: root/contrib/libfido2/fuzz
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libfido2/fuzz')
-rw-r--r--contrib/libfido2/fuzz/CMakeLists.txt13
-rw-r--r--contrib/libfido2/fuzz/Dockerfile2
-rw-r--r--contrib/libfido2/fuzz/Makefile6
-rw-r--r--contrib/libfido2/fuzz/export.gnu6
-rw-r--r--contrib/libfido2/fuzz/functions.txt1096
-rw-r--r--contrib/libfido2/fuzz/fuzz_attobj.c333
-rw-r--r--contrib/libfido2/fuzz/fuzz_cred.c13
-rw-r--r--contrib/libfido2/fuzz/libfuzzer.c1
-rw-r--r--contrib/libfido2/fuzz/mutator_aux.c6
-rw-r--r--contrib/libfido2/fuzz/report.tgzbin361946 -> 372600 bytes
-rw-r--r--contrib/libfido2/fuzz/summary.txt94
11 files changed, 974 insertions, 596 deletions
diff --git a/contrib/libfido2/fuzz/CMakeLists.txt b/contrib/libfido2/fuzz/CMakeLists.txt
index cc30baae88f2..0bf4bfbf05a5 100644
--- a/contrib/libfido2/fuzz/CMakeLists.txt
+++ b/contrib/libfido2/fuzz/CMakeLists.txt
@@ -1,4 +1,4 @@
-# Copyright (c) 2019-2023 Yubico AB. All rights reserved.
+# Copyright (c) 2019-2024 Yubico AB. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause
@@ -18,6 +18,10 @@ set(FUZZ_LINKER_LANGUAGE "C" CACHE STRING "Linker language for fuzz harnesses")
mark_as_advanced(FUZZ_LINKER_LANGUAGE)
enable_language(${FUZZ_LINKER_LANGUAGE})
+if(NOT FUZZ_LDFLAGS)
+ message(FATAL_ERROR "Please define FUZZ_LDFLAGS")
+endif()
+
# fuzz_cred
add_executable(fuzz_cred fuzz_cred.c ${COMMON_SOURCES} ${COMPAT_SOURCES})
set_target_properties(fuzz_cred PROPERTIES
@@ -80,3 +84,10 @@ set_target_properties(fuzz_pcsc PROPERTIES
LINK_FLAGS ${FUZZ_LDFLAGS}
LINKER_LANGUAGE ${FUZZ_LINKER_LANGUAGE})
target_link_libraries(fuzz_pcsc fido2_shared)
+
+# fuzz_attobj
+add_executable(fuzz_attobj fuzz_attobj.c ${COMMON_SOURCES} ${COMPAT_SOURCES})
+set_target_properties(fuzz_attobj PROPERTIES
+ LINK_FLAGS ${FUZZ_LDFLAGS}
+ LINKER_LANGUAGE ${FUZZ_LINKER_LANGUAGE})
+target_link_libraries(fuzz_attobj fido2_shared)
diff --git a/contrib/libfido2/fuzz/Dockerfile b/contrib/libfido2/fuzz/Dockerfile
index 7b26e6ec3b19..1ab14c33da75 100644
--- a/contrib/libfido2/fuzz/Dockerfile
+++ b/contrib/libfido2/fuzz/Dockerfile
@@ -10,7 +10,7 @@ RUN apk -q update
RUN apk add build-base clang clang-analyzer cmake compiler-rt coreutils
RUN apk add eudev-dev git linux-headers llvm openssl-dev pcsc-lite-dev
RUN apk add sudo tar zlib-dev
-RUN git clone --branch v0.10.2 --depth=1 https://github.com/PJK/libcbor
+RUN git clone --branch v0.12.0 --depth=1 https://github.com/PJK/libcbor
RUN git clone --depth=1 https://github.com/yubico/libfido2
WORKDIR /libfido2
RUN ./fuzz/build-coverage /libcbor /libfido2
diff --git a/contrib/libfido2/fuzz/Makefile b/contrib/libfido2/fuzz/Makefile
index 55a506bc8312..a7ac24c0da58 100644
--- a/contrib/libfido2/fuzz/Makefile
+++ b/contrib/libfido2/fuzz/Makefile
@@ -3,12 +3,12 @@
# license that can be found in the LICENSE file.
# SPDX-License-Identifier: BSD-2-Clause
-IMAGE := libfido2-coverage:1.14.0
+IMAGE := libfido2-coverage:1.16.0
RUNNER := libfido2-runner
PROFDATA := llvm-profdata
COV := llvm-cov
-TARGETS := fuzz_assert fuzz_bio fuzz_cred fuzz_credman fuzz_hid \
- fuzz_largeblob fuzz_netlink fuzz_mgmt fuzz_pcsc
+TARGETS := fuzz_assert fuzz_attobj fuzz_bio fuzz_cred fuzz_credman \
+ fuzz_hid fuzz_largeblob fuzz_netlink fuzz_mgmt fuzz_pcsc
CORPORA := $(foreach f,${TARGETS},${f}/corpus)
MINIFY := $(foreach f,${TARGETS},/minify/${f}/corpus)
REMOTE := gs://libfido2-corpus.clusterfuzz-external.appspot.com
diff --git a/contrib/libfido2/fuzz/export.gnu b/contrib/libfido2/fuzz/export.gnu
index bc25dd66cba7..62dfda926944 100644
--- a/contrib/libfido2/fuzz/export.gnu
+++ b/contrib/libfido2/fuzz/export.gnu
@@ -127,6 +127,7 @@
fido_cred_clientdata_hash_len;
fido_cred_clientdata_hash_ptr;
fido_cred_display_name;
+ fido_cred_entattest;
fido_cred_exclude;
fido_cred_flags;
fido_cred_largeblob_key_len;
@@ -166,11 +167,13 @@
fido_cred_rp_id;
fido_cred_rp_name;
fido_cred_set_attstmt;
+ fido_cred_set_attobj;
fido_cred_set_authdata;
fido_cred_set_authdata_raw;
fido_cred_set_blob;
fido_cred_set_clientdata;
fido_cred_set_clientdata_hash;
+ fido_cred_set_entattest;
fido_cred_set_extensions;
fido_cred_set_fmt;
fido_cred_set_id;
@@ -193,6 +196,9 @@
fido_cred_verify;
fido_cred_verify_self;
fido_cred_x5c_len;
+ fido_cred_x5c_list_count;
+ fido_cred_x5c_list_len;
+ fido_cred_x5c_list_ptr;
fido_cred_x5c_ptr;
fido_dev_build;
fido_dev_cancel;
diff --git a/contrib/libfido2/fuzz/functions.txt b/contrib/libfido2/fuzz/functions.txt
index 4ad5a0c83f5c..5dab11c62d50 100644
--- a/contrib/libfido2/fuzz/functions.txt
+++ b/contrib/libfido2/fuzz/functions.txt
@@ -1,31 +1,31 @@
File '/libfido2/src/aes256.c':
Name Regions Miss Cover Lines Miss Cover
---------------------------------------------------------------------------------------------------------
+------------------------------------------------------------------------------
aes256_cbc_enc 4 0 100.00% 4 0 100.00%
aes256_cbc_dec 4 0 100.00% 4 0 100.00%
aes256_gcm_enc 1 0 100.00% 3 0 100.00%
aes256_gcm_dec 1 0 100.00% 3 0 100.00%
-aes256.c:aes256_cbc_fips 26 1 96.15% 42 4 90.48%
-aes256.c:aes256_cbc 29 1 96.55% 36 3 91.67%
+aes256.c:aes256_cbc_fips 29 1 96.55% 42 4 90.48%
+aes256.c:aes256_cbc 37 1 97.30% 36 3 91.67%
aes256.c:aes256_cbc_proto1 1 0 100.00% 5 0 100.00%
-aes256.c:aes256_gcm 52 1 98.08% 60 4 93.33%
---------------------------------------------------------------------------------------------------------
-TOTAL 118 3 97.46% 157 11 92.99%
+aes256.c:aes256_gcm 73 3 95.89% 64 10 84.38%
+------------------------------------------------------------------------------
+TOTAL 150 5 96.67% 161 17 89.44%
File '/libfido2/src/assert.c':
Name Regions Miss Cover Lines Miss Cover
------------------------------------------------------------------------------------------------------------------
-fido_dev_get_assert 40 0 100.00% 35 0 100.00%
+---------------------------------------------------------------------------------------
+fido_dev_get_assert 50 0 100.00% 35 0 100.00%
fido_check_flags 13 0 100.00% 15 0 100.00%
-fido_get_signed_hash 20 1 95.00% 34 3 91.18%
-fido_assert_verify 50 4 92.00% 70 7 90.00%
+fido_get_signed_hash 27 1 96.30% 34 3 91.18%
+fido_assert_verify 59 4 93.22% 70 7 90.00%
fido_assert_set_clientdata 12 12 0.00% 11 11 0.00%
fido_assert_set_clientdata_hash 8 0 100.00% 6 0 100.00%
fido_assert_set_hmac_salt 10 0 100.00% 6 0 100.00%
fido_assert_set_hmac_secret 12 12 0.00% 7 7 0.00%
-fido_assert_set_rp 12 0 100.00% 11 0 100.00%
+fido_assert_set_rp 16 0 100.00% 11 0 100.00%
fido_assert_set_winhello_appid 2 2 0.00% 5 5 0.00%
-fido_assert_allow_cred 13 2 84.62% 22 3 86.36%
+fido_assert_allow_cred 16 2 87.50% 22 3 86.36%
fido_assert_empty_allow_list 2 0 100.00% 5 0 100.00%
fido_assert_set_extensions 14 0 100.00% 10 0 100.00%
fido_assert_set_options 8 8 0.00% 5 5 0.00%
@@ -34,71 +34,71 @@ fido_assert_set_uv 2 0 100.00% 4 0
fido_assert_clientdata_hash_ptr 1 0 100.00% 3 0 100.00%
fido_assert_clientdata_hash_len 1 0 100.00% 3 0 100.00%
fido_assert_new 1 0 100.00% 3 0 100.00%
-fido_assert_reset_tx 1 0 100.00% 13 0 100.00%
-fido_assert_reset_rx 4 0 100.00% 20 0 100.00%
-fido_assert_free 6 0 100.00% 9 0 100.00%
+fido_assert_reset_tx 3 0 100.00% 12 0 100.00%
+fido_assert_reset_rx 5 0 100.00% 19 0 100.00%
+fido_assert_free 10 0 100.00% 8 0 100.00%
fido_assert_count 1 0 100.00% 3 0 100.00%
fido_assert_rp_id 1 0 100.00% 3 0 100.00%
fido_assert_flags 4 0 100.00% 5 0 100.00%
fido_assert_sigcount 4 0 100.00% 5 0 100.00%
-fido_assert_authdata_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_authdata_ptr 5 0 100.00% 5 0 100.00%
fido_assert_authdata_len 4 0 100.00% 5 0 100.00%
-fido_assert_authdata_raw_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_authdata_raw_ptr 5 0 100.00% 5 0 100.00%
fido_assert_authdata_raw_len 4 0 100.00% 5 0 100.00%
-fido_assert_sig_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_sig_ptr 5 0 100.00% 5 0 100.00%
fido_assert_sig_len 4 0 100.00% 5 0 100.00%
-fido_assert_id_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_id_ptr 5 0 100.00% 5 0 100.00%
fido_assert_id_len 4 0 100.00% 5 0 100.00%
-fido_assert_user_id_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_user_id_ptr 5 0 100.00% 5 0 100.00%
fido_assert_user_id_len 4 0 100.00% 5 0 100.00%
-fido_assert_user_icon 4 0 100.00% 5 0 100.00%
-fido_assert_user_name 4 0 100.00% 5 0 100.00%
-fido_assert_user_display_name 4 0 100.00% 5 0 100.00%
-fido_assert_hmac_secret_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_user_icon 5 0 100.00% 5 0 100.00%
+fido_assert_user_name 5 0 100.00% 5 0 100.00%
+fido_assert_user_display_name 5 0 100.00% 5 0 100.00%
+fido_assert_hmac_secret_ptr 5 0 100.00% 5 0 100.00%
fido_assert_hmac_secret_len 4 0 100.00% 5 0 100.00%
-fido_assert_largeblob_key_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_largeblob_key_ptr 5 0 100.00% 5 0 100.00%
fido_assert_largeblob_key_len 4 0 100.00% 5 0 100.00%
-fido_assert_blob_ptr 4 0 100.00% 5 0 100.00%
+fido_assert_blob_ptr 5 0 100.00% 5 0 100.00%
fido_assert_blob_len 4 0 100.00% 5 0 100.00%
-fido_assert_set_authdata 28 0 100.00% 33 0 100.00%
-fido_assert_set_authdata_raw 28 0 100.00% 32 0 100.00%
-fido_assert_set_sig 14 0 100.00% 7 0 100.00%
-fido_assert_set_count 10 0 100.00% 17 0 100.00%
+fido_assert_set_authdata 34 0 100.00% 33 0 100.00%
+fido_assert_set_authdata_raw 34 0 100.00% 32 0 100.00%
+fido_assert_set_sig 16 0 100.00% 7 0 100.00%
+fido_assert_set_count 12 0 100.00% 17 0 100.00%
assert.c:fido_dev_get_assert_wait 21 0 100.00% 14 0 100.00%
-assert.c:fido_dev_get_assert_tx 56 2 96.43% 62 5 91.94%
-assert.c:fido_dev_get_assert_rx 27 0 100.00% 36 0 100.00%
-assert.c:adjust_assert_count 24 0 100.00% 26 0 100.00%
-assert.c:parse_assert_reply 15 0 100.00% 28 0 100.00%
+assert.c:fido_dev_get_assert_tx 67 2 97.01% 62 5 91.94%
+assert.c:fido_dev_get_assert_rx 29 0 100.00% 36 0 100.00%
+assert.c:adjust_assert_count 28 0 100.00% 26 0 100.00%
+assert.c:parse_assert_reply 17 0 100.00% 28 0 100.00%
assert.c:fido_get_next_assert_tx 8 0 100.00% 8 0 100.00%
-assert.c:fido_get_next_assert_rx 23 2 91.30% 29 5 82.76%
-assert.c:decrypt_hmac_secrets 9 0 100.00% 15 0 100.00%
-assert.c:get_es256_hash 16 0 100.00% 17 0 100.00%
-assert.c:get_es384_hash 16 0 100.00% 17 0 100.00%
-assert.c:get_eddsa_hash 6 0 100.00% 9 0 100.00%
+assert.c:fido_get_next_assert_rx 24 2 91.67% 29 5 82.76%
+assert.c:decrypt_hmac_secrets 10 0 100.00% 15 0 100.00%
+assert.c:get_es256_hash 26 0 100.00% 17 0 100.00%
+assert.c:get_es384_hash 26 0 100.00% 17 0 100.00%
+assert.c:get_eddsa_hash 8 0 100.00% 9 0 100.00%
assert.c:check_extensions 5 0 100.00% 9 0 100.00%
assert.c:fido_assert_reset_extattr 1 0 100.00% 5 0 100.00%
assert.c:fido_assert_clean_authdata 1 0 100.00% 6 0 100.00%
------------------------------------------------------------------------------------------------------------------
-TOTAL 628 45 92.83% 782 51 93.48%
+---------------------------------------------------------------------------------------
+TOTAL 738 45 93.90% 779 51 93.45%
File '/libfido2/src/authkey.c':
Name Regions Miss Cover Lines Miss Cover
------------------------------------------------------------------------------------------------------------------
+---------------------------------------------------------------------------------------
fido_dev_authkey 1 0 100.00% 3 0 100.00%
authkey.c:fido_dev_authkey_wait 10 0 100.00% 7 0 100.00%
-authkey.c:fido_dev_authkey_tx 19 0 100.00% 25 0 100.00%
-authkey.c:fido_dev_authkey_rx 14 0 100.00% 21 0 100.00%
-authkey.c:parse_authkey 8 0 100.00% 10 0 100.00%
------------------------------------------------------------------------------------------------------------------
-TOTAL 52 0 100.00% 66 0 100.00%
+authkey.c:fido_dev_authkey_tx 22 0 100.00% 25 0 100.00%
+authkey.c:fido_dev_authkey_rx 15 0 100.00% 21 0 100.00%
+authkey.c:parse_authkey 10 0 100.00% 10 0 100.00%
+---------------------------------------------------------------------------------------
+TOTAL 58 0 100.00% 66 0 100.00%
File '/libfido2/src/bio.c':
Name Regions Miss Cover Lines Miss Cover
------------------------------------------------------------------------------------------------------------------
-fido_bio_dev_get_template_array 5 2 60.00% 6 1 83.33%
-fido_bio_dev_set_template_name 7 0 100.00% 6 0 100.00%
-fido_bio_dev_enroll_begin 25 2 92.00% 31 1 96.77%
-fido_bio_dev_enroll_continue 5 2 60.00% 6 1 83.33%
+---------------------------------------------------------------------------------------
+fido_bio_dev_get_template_array 6 2 66.67% 6 1 83.33%
+fido_bio_dev_set_template_name 10 0 100.00% 6 0 100.00%
+fido_bio_dev_enroll_begin 34 2 94.12% 31 1 96.77%
+fido_bio_dev_enroll_continue 6 2 66.67% 6 1 83.33%
fido_bio_dev_enroll_cancel 1 1 0.00% 4 4 0.00%
fido_bio_dev_enroll_remove 1 0 100.00% 4 0 100.00%
fido_bio_dev_get_info 1 0 100.00% 4 0 100.00%
@@ -108,189 +108,195 @@ fido_bio_template_id_len 1 0 100.00% 3 0
fido_bio_template_array_count 1 0 100.00% 3 0 100.00%
fido_bio_template_array_new 1 0 100.00% 3 0 100.00%
fido_bio_template_new 1 0 100.00% 3 0 100.00%
-fido_bio_template_array_free 6 0 100.00% 8 0 100.00%
-fido_bio_template_free 6 0 100.00% 8 0 100.00%
-fido_bio_template_set_name 8 0 100.00% 7 0 100.00%
+fido_bio_template_array_free 10 0 100.00% 7 0 100.00%
+fido_bio_template_free 10 0 100.00% 7 0 100.00%
+fido_bio_template_set_name 10 0 100.00% 7 0 100.00%
fido_bio_template_set_id 8 0 100.00% 6 0 100.00%
-fido_bio_template 4 0 100.00% 5 0 100.00%
+fido_bio_template 5 0 100.00% 5 0 100.00%
fido_bio_enroll_new 1 0 100.00% 3 0 100.00%
fido_bio_info_new 1 0 100.00% 3 0 100.00%
fido_bio_info_type 1 0 100.00% 3 0 100.00%
fido_bio_info_max_samples 1 0 100.00% 3 0 100.00%
-fido_bio_enroll_free 6 0 100.00% 8 0 100.00%
-fido_bio_info_free 6 0 100.00% 7 0 100.00%
+fido_bio_enroll_free 10 0 100.00% 7 0 100.00%
+fido_bio_info_free 10 0 100.00% 6 0 100.00%
fido_bio_enroll_remaining_samples 1 0 100.00% 3 0 100.00%
fido_bio_enroll_last_status 1 0 100.00% 3 0 100.00%
-bio.c:bio_get_template_array_wait 11 0 100.00% 7 0 100.00%
-bio.c:bio_tx 43 0 100.00% 55 0 100.00%
-bio.c:bio_prepare_hmac 18 0 100.00% 29 0 100.00%
-bio.c:bio_rx_template_array 19 0 100.00% 24 0 100.00%
-bio.c:bio_parse_template_array 26 1 96.15% 27 4 85.19%
-bio.c:decode_template_array 12 1 91.67% 18 3 83.33%
-bio.c:decode_template 9 0 100.00% 15 0 100.00%
-bio.c:bio_set_template_name_wait 19 0 100.00% 20 0 100.00%
-bio.c:bio_enroll_begin_wait 17 0 100.00% 19 0 100.00%
-bio.c:bio_rx_enroll_begin 23 0 100.00% 31 0 100.00%
-bio.c:bio_parse_enroll_status 20 0 100.00% 28 0 100.00%
-bio.c:bio_parse_template_id 8 0 100.00% 10 0 100.00%
-bio.c:bio_enroll_continue_wait 19 0 100.00% 20 0 100.00%
-bio.c:bio_rx_enroll_continue 19 0 100.00% 25 0 100.00%
-bio.c:bio_enroll_cancel_wait 11 11 0.00% 10 10 0.00%
-bio.c:bio_enroll_remove_wait 17 0 100.00% 19 0 100.00%
-bio.c:bio_get_info_wait 11 0 100.00% 10 0 100.00%
-bio.c:bio_rx_info 19 0 100.00% 24 0 100.00%
+bio.c:bio_get_template_array_wait 13 0 100.00% 7 0 100.00%
+bio.c:bio_tx 51 0 100.00% 55 0 100.00%
+bio.c:bio_get_cmd 8 0 100.00% 5 0 100.00%
+bio.c:bio_prepare_hmac 26 0 100.00% 29 0 100.00%
+bio.c:bio_rx_template_array 20 0 100.00% 24 0 100.00%
+bio.c:bio_parse_template_array 34 1 97.06% 27 4 85.19%
+bio.c:decode_template_array 15 1 93.33% 18 3 83.33%
+bio.c:decode_template 11 0 100.00% 15 0 100.00%
+bio.c:bio_set_template_name_wait 23 0 100.00% 20 0 100.00%
+bio.c:bio_enroll_begin_wait 19 0 100.00% 19 0 100.00%
+bio.c:bio_rx_enroll_begin 24 0 100.00% 31 0 100.00%
+bio.c:bio_parse_enroll_status 24 0 100.00% 28 0 100.00%
+bio.c:bio_parse_template_id 10 0 100.00% 10 0 100.00%
+bio.c:bio_enroll_continue_wait 23 0 100.00% 20 0 100.00%
+bio.c:bio_rx_enroll_continue 20 0 100.00% 25 0 100.00%
+bio.c:bio_enroll_cancel_wait 14 14 0.00% 10 10 0.00%
+bio.c:bio_enroll_remove_wait 19 0 100.00% 19 0 100.00%
+bio.c:bio_get_info_wait 14 0 100.00% 10 0 100.00%
+bio.c:bio_rx_info 20 0 100.00% 24 0 100.00%
bio.c:bio_reset_info 1 0 100.00% 4 0 100.00%
-bio.c:bio_parse_info 20 0 100.00% 28 0 100.00%
-bio.c:bio_reset_template_array 4 0 100.00% 7 0 100.00%
-bio.c:bio_reset_template 1 0 100.00% 5 0 100.00%
+bio.c:bio_parse_info 24 0 100.00% 28 0 100.00%
+bio.c:bio_reset_template_array 5 0 100.00% 6 0 100.00%
+bio.c:bio_reset_template 2 0 100.00% 4 0 100.00%
bio.c:bio_reset_enroll 3 0 100.00% 6 0 100.00%
------------------------------------------------------------------------------------------------------------------
-TOTAL 451 20 95.57% 587 24 95.91%
+---------------------------------------------------------------------------------------
+TOTAL 557 23 95.87% 586 24 95.90%
File '/libfido2/src/blob.c':
Name Regions Miss Cover Lines Miss Cover
------------------------------------------------------------------------------------------------------------------
+---------------------------------------------------------------------------------------
fido_blob_new 1 0 100.00% 3 0 100.00%
fido_blob_reset 1 0 100.00% 4 0 100.00%
-fido_blob_set 9 0 100.00% 15 0 100.00%
-fido_blob_append 12 1 91.67% 20 3 85.00%
-fido_blob_free 6 0 100.00% 8 0 100.00%
-fido_free_blob_array 7 0 100.00% 12 0 100.00%
-fido_blob_encode 6 0 100.00% 5 0 100.00%
+fido_blob_set 12 0 100.00% 15 0 100.00%
+fido_blob_append 17 1 94.12% 20 3 85.00%
+fido_blob_free 10 0 100.00% 7 0 100.00%
+fido_free_blob_array 10 0 100.00% 11 0 100.00%
+fido_blob_encode 10 0 100.00% 5 0 100.00%
fido_blob_decode 1 0 100.00% 3 0 100.00%
-fido_blob_is_empty 3 0 100.00% 3 0 100.00%
-fido_blob_serialise 7 1 85.71% 10 1 90.00%
------------------------------------------------------------------------------------------------------------------
-TOTAL 53 2 96.23% 83 4 95.18%
+fido_blob_is_empty 5 0 100.00% 3 0 100.00%
+fido_blob_serialise 8 1 87.50% 10 1 90.00%
+---------------------------------------------------------------------------------------
+TOTAL 75 2 97.33% 81 4 95.06%
File '/libfido2/src/buf.c':
Name Regions Miss Cover Lines Miss Cover
------------------------------------------------------------------------------------------------------------------
+---------------------------------------------------------------------------------------
fido_buf_read 4 0 100.00% 8 0 100.00%
-fido_buf_write 4 1 75.00% 8 1 87.50%
------------------------------------------------------------------------------------------------------------------
-TOTAL 8 1 87.50% 16 1 93.75%
+fido_buf_write 4 0 100.00% 8 0 100.00%
+---------------------------------------------------------------------------------------
+TOTAL 8 0 100.00% 16 0 100.00%
File '/libfido2/src/cbor.c':
Name Regions Miss Cover Lines Miss Cover
-------------------------------------------------------------------------------------------------------------------
-cbor_map_iter 20 1 95.00% 26 4 84.62%
-cbor_array_iter 12 0 100.00% 16 0 100.00%
-cbor_parse_reply 27 0 100.00% 36 0 100.00%
-cbor_vector_free 6 0 100.00% 5 0 100.00%
-cbor_bytestring_copy 14 0 100.00% 18 0 100.00%
-cbor_string_copy 14 0 100.00% 18 0 100.00%
-cbor_add_bytestring 14 0 100.00% 21 0 100.00%
-cbor_add_string 14 0 100.00% 21 0 100.00%
-cbor_add_bool 14 0 100.00% 21 0 100.00%
-cbor_flatten_vector 14 1 92.86% 16 1 93.75%
-cbor_build_frame 15 0 100.00% 25 0 100.00%
-cbor_encode_rp_entity 13 0 100.00% 11 0 100.00%
-cbor_encode_user_entity 21 0 100.00% 15 0 100.00%
-cbor_encode_pubkey_param 36 0 100.00% 39 0 100.00%
-cbor_encode_pubkey 10 0 100.00% 11 0 100.00%
-cbor_encode_pubkey_list 18 0 100.00% 19 0 100.00%
-cbor_encode_str_array 18 0 100.00% 19 0 100.00%
-cbor_encode_cred_ext 55 0 100.00% 50 0 100.00%
-cbor_encode_cred_opt 13 0 100.00% 11 0 100.00%
-cbor_encode_assert_opt 13 0 100.00% 11 0 100.00%
-cbor_encode_pin_auth 21 1 95.24% 22 3 86.36%
-cbor_encode_pin_opt 4 0 100.00% 8 0 100.00%
-cbor_encode_change_pin_auth 32 1 96.88% 36 3 91.67%
-cbor_encode_assert_ext 33 0 100.00% 32 0 100.00%
-cbor_decode_fmt 13 0 100.00% 15 0 100.00%
+----------------------------------------------------------------------------------------
+cbor_map_iter 24 1 95.83% 26 4 84.62%
+cbor_array_iter 15 0 100.00% 16 0 100.00%
+cbor_parse_reply 33 0 100.00% 36 0 100.00%
+cbor_vector_free 7 0 100.00% 5 0 100.00%
+cbor_bytestring_copy 20 0 100.00% 18 0 100.00%
+cbor_string_copy 23 0 100.00% 18 0 100.00%
+cbor_add_bytestring 17 0 100.00% 21 0 100.00%
+cbor_add_string 17 0 100.00% 21 0 100.00%
+cbor_add_bool 17 0 100.00% 21 0 100.00%
+cbor_flatten_vector 19 2 89.47% 16 1 93.75%
+cbor_build_frame 22 0 100.00% 25 0 100.00%
+cbor_encode_rp_entity 17 0 100.00% 11 0 100.00%
+cbor_encode_user_entity 25 0 100.00% 15 0 100.00%
+cbor_encode_pubkey_param 55 0 100.00% 39 0 100.00%
+cbor_encode_pubkey 14 0 100.00% 11 0 100.00%
+cbor_encode_pubkey_list 27 0 100.00% 18 0 100.00%
+cbor_encode_str_array 27 0 100.00% 18 0 100.00%
+cbor_encode_cred_ext 65 0 100.00% 50 0 100.00%
+cbor_encode_cred_opt 17 0 100.00% 11 0 100.00%
+cbor_encode_assert_opt 17 0 100.00% 11 0 100.00%
+cbor_encode_pin_auth 29 2 93.10% 22 3 86.36%
+cbor_encode_pin_opt 5 0 100.00% 8 0 100.00%
+cbor_encode_change_pin_auth 42 1 97.62% 36 3 91.67%
+cbor_encode_assert_ext 39 0 100.00% 32 0 100.00%
+cbor_decode_fmt 14 0 100.00% 15 0 100.00%
cbor_decode_pubkey 26 1 96.15% 36 2 94.44%
-cbor_decode_cred_authdata 31 1 96.77% 35 3 91.43%
-cbor_decode_assert_authdata 21 1 95.24% 32 3 90.62%
-cbor_decode_attstmt 13 0 100.00% 16 0 100.00%
-cbor_decode_uint64 4 0 100.00% 8 0 100.00%
-cbor_decode_cred_id 8 0 100.00% 9 0 100.00%
-cbor_decode_user 8 0 100.00% 9 0 100.00%
-cbor_decode_rp_entity 8 0 100.00% 9 0 100.00%
-cbor_decode_bool 10 0 100.00% 11 0 100.00%
-cbor_build_uint 10 1 90.00% 9 1 88.89%
-cbor_array_append 17 0 100.00% 21 0 100.00%
-cbor_array_drop 18 0 100.00% 17 0 100.00%
+cbor_decode_attobj 12 0 100.00% 9 0 100.00%
+cbor_decode_cred_authdata 40 1 97.50% 35 3 91.43%
+cbor_decode_assert_authdata 28 1 96.43% 32 3 90.62%
+cbor_decode_attstmt 19 0 100.00% 16 0 100.00%
+cbor_decode_uint64 5 0 100.00% 8 0 100.00%
+cbor_decode_cred_id 12 0 100.00% 9 0 100.00%
+cbor_decode_user 12 0 100.00% 9 0 100.00%
+cbor_decode_rp_entity 12 0 100.00% 9 0 100.00%
+cbor_decode_bool 14 0 100.00% 11 0 100.00%
+cbor_build_uint 13 1 92.31% 9 1 88.89%
+cbor_array_append 24 0 100.00% 21 0 100.00%
+cbor_array_drop 21 0 100.00% 17 0 100.00%
cbor.c:ctap_check_cbor 28 0 100.00% 26 0 100.00%
cbor.c:check_key_type 8 0 100.00% 7 0 100.00%
-cbor.c:cbor_add_arg 13 0 100.00% 21 0 100.00%
-cbor.c:cbor_add_uint8 14 0 100.00% 21 0 100.00%
-cbor.c:cbor_encode_largeblob_key_ext 6 0 100.00% 6 0 100.00%
-cbor.c:cbor_encode_hmac_secret_param 59 4 93.22% 66 8 87.88%
-cbor.c:get_cose_alg 46 0 100.00% 45 0 100.00%
-cbor.c:find_cose_alg 35 0 100.00% 33 0 100.00%
-cbor.c:decode_attcred 25 0 100.00% 44 0 100.00%
-cbor.c:decode_cred_extensions 14 0 100.00% 24 0 100.00%
-cbor.c:decode_cred_extension 41 0 100.00% 45 0 100.00%
-cbor.c:decode_assert_extensions 14 0 100.00% 23 0 100.00%
-cbor.c:decode_assert_extension 19 0 100.00% 27 0 100.00%
-cbor.c:decode_attstmt_entry 56 0 100.00% 51 0 100.00%
-cbor.c:decode_x5c 4 0 100.00% 6 0 100.00%
-cbor.c:decode_cred_id_entry 10 0 100.00% 19 0 100.00%
-cbor.c:decode_user_entry 25 0 100.00% 35 0 100.00%
-cbor.c:decode_rp_entity_entry 15 0 100.00% 25 0 100.00%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 1070 12 98.88% 1258 28 97.77%
+cbor.c:cbor_add_arg 15 0 100.00% 21 0 100.00%
+cbor.c:cbor_add_uint8 17 0 100.00% 21 0 100.00%
+cbor.c:cbor_encode_largeblob_key_ext 8 0 100.00% 6 0 100.00%
+cbor.c:cbor_encode_hmac_secret_param 81 4 95.06% 66 8 87.88%
+cbor.c:get_cose_alg 50 0 100.00% 45 0 100.00%
+cbor.c:find_cose_alg 51 0 100.00% 33 0 100.00%
+cbor.c:decode_attobj 24 0 100.00% 37 0 100.00%
+cbor.c:decode_attcred 30 0 100.00% 44 0 100.00%
+cbor.c:decode_cred_extensions 21 0 100.00% 24 0 100.00%
+cbor.c:decode_cred_extension 48 0 100.00% 45 0 100.00%
+cbor.c:decode_assert_extensions 21 0 100.00% 23 0 100.00%
+cbor.c:decode_assert_extension 20 0 100.00% 27 0 100.00%
+cbor.c:decode_attstmt_entry 56 0 100.00% 49 0 100.00%
+cbor.c:decode_x5c_array 12 1 91.67% 12 3 75.00%
+cbor.c:decode_x5c 14 1 92.86% 22 3 86.36%
+cbor.c:decode_cred_id_entry 11 0 100.00% 19 0 100.00%
+cbor.c:decode_user_entry 26 0 100.00% 35 0 100.00%
+cbor.c:decode_rp_entity_entry 16 0 100.00% 25 0 100.00%
+----------------------------------------------------------------------------------------
+TOTAL 1402 16 98.86% 1328 34 97.44%
File '/libfido2/src/compress.c':
Name Regions Miss Cover Lines Miss Cover
-------------------------------------------------------------------------------------------------------------------
+----------------------------------------------------------------------------------------
fido_compress 1 0 100.00% 3 0 100.00%
fido_uncompress 6 0 100.00% 5 0 100.00%
-compress.c:rfc1951_deflate 33 4 87.88% 47 6 87.23%
-compress.c:rfc1950_inflate 27 2 92.59% 22 4 81.82%
-compress.c:rfc1951_inflate 38 8 78.95% 45 14 68.89%
-------------------------------------------------------------------------------------------------------------------
-TOTAL 105 14 86.67% 122 24 80.33%
+compress.c:rfc1951_deflate 42 4 90.48% 47 6 87.23%
+compress.c:rfc1950_inflate 42 2 95.24% 22 4 81.82%
+compress.c:rfc1951_inflate 49 8 83.67% 45 14 68.89%
+----------------------------------------------------------------------------------------
+TOTAL 140 14 90.00% 122 24 80.33%
File '/libfido2/src/config.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_dev_enable_entattest 1 0 100.00% 4 0 100.00%
fido_dev_toggle_always_uv 1 0 100.00% 4 0 100.00%
-fido_dev_set_pin_minlen 1 0 100.00% 4 0 100.00%
-fido_dev_force_pin_change 1 0 100.00% 4 0 100.00%
-fido_dev_set_pin_minlen_rpid 6 0 100.00% 15 0 100.00%
-config.c:config_enable_entattest_wait 6 0 100.00% 7 0 100.00%
-config.c:config_tx 39 0 100.00% 49 0 100.00%
-config.c:config_prepare_hmac 10 0 100.00% 21 0 100.00%
-config.c:config_toggle_always_uv_wait 6 0 100.00% 7 0 100.00%
+fido_dev_set_pin_minlen 3 0 100.00% 4 0 100.00%
+fido_dev_force_pin_change 3 0 100.00% 4 0 100.00%
+fido_dev_set_pin_minlen_rpid 7 0 100.00% 15 0 100.00%
+config.c:config_enable_entattest_wait 7 0 100.00% 7 0 100.00%
+config.c:config_tx 46 0 100.00% 49 0 100.00%
+config.c:config_prepare_hmac 12 0 100.00% 21 0 100.00%
+config.c:config_toggle_always_uv_wait 7 0 100.00% 7 0 100.00%
config.c:config_pin_minlen 5 0 100.00% 7 0 100.00%
-config.c:config_pin_minlen_tx 36 0 100.00% 32 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 112 0 100.00% 154 0 100.00%
+config.c:config_pin_minlen_tx 45 0 100.00% 32 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 137 0 100.00% 154 0 100.00%
File '/libfido2/src/cred.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_dev_make_cred 12 0 100.00% 10 0 100.00%
-fido_check_rp_id 4 0 100.00% 11 0 100.00%
-fido_cred_verify 59 2 96.61% 75 4 94.67%
-fido_cred_verify_self 60 4 93.33% 87 7 91.95%
+-----------------------------------------------------------------------------------------
+fido_dev_make_cred 15 0 100.00% 10 0 100.00%
+fido_check_rp_id 5 0 100.00% 10 0 100.00%
+fido_cred_verify 72 0 100.00% 75 0 100.00%
+fido_cred_verify_self 73 4 94.52% 87 7 91.95%
fido_cred_new 1 0 100.00% 3 0 100.00%
-fido_cred_reset_tx 1 0 100.00% 18 0 100.00%
-fido_cred_reset_rx 1 0 100.00% 7 0 100.00%
-fido_cred_free 6 0 100.00% 9 0 100.00%
-fido_cred_set_authdata 23 0 100.00% 28 0 100.00%
-fido_cred_set_authdata_raw 25 0 100.00% 29 0 100.00%
+fido_cred_reset_tx 1 0 100.00% 19 0 100.00%
+fido_cred_reset_rx 2 0 100.00% 4 0 100.00%
+fido_cred_free 10 0 100.00% 8 0 100.00%
+fido_cred_set_authdata 28 0 100.00% 28 0 100.00%
+fido_cred_set_authdata_raw 30 0 100.00% 29 0 100.00%
fido_cred_set_id 6 0 100.00% 5 0 100.00%
-fido_cred_set_x509 6 0 100.00% 5 0 100.00%
+fido_cred_set_x509 18 2 88.89% 21 3 85.71%
fido_cred_set_sig 6 0 100.00% 5 0 100.00%
-fido_cred_set_attstmt 20 0 100.00% 23 0 100.00%
-fido_cred_exclude 14 2 85.71% 19 3 84.21%
+fido_cred_set_attstmt 25 0 100.00% 23 0 100.00%
+fido_cred_set_attobj 22 0 100.00% 21 0 100.00%
+fido_cred_exclude 17 2 88.24% 19 3 84.21%
fido_cred_empty_exclude_list 2 0 100.00% 5 0 100.00%
fido_cred_set_clientdata 12 12 0.00% 11 11 0.00%
fido_cred_set_clientdata_hash 8 0 100.00% 6 0 100.00%
-fido_cred_set_rp 18 0 100.00% 22 0 100.00%
-fido_cred_set_user 32 0 100.00% 41 0 100.00%
+fido_cred_set_rp 30 0 100.00% 22 0 100.00%
+fido_cred_set_user 55 0 100.00% 41 0 100.00%
fido_cred_set_extensions 16 0 100.00% 10 0 100.00%
fido_cred_set_options 8 8 0.00% 5 5 0.00%
fido_cred_set_rk 2 0 100.00% 4 0 100.00%
fido_cred_set_uv 2 0 100.00% 4 0 100.00%
+fido_cred_set_entattest 13 0 100.00% 7 0 100.00%
fido_cred_set_prot 21 0 100.00% 14 0 100.00%
fido_cred_set_pin_minlen 7 0 100.00% 8 0 100.00%
-fido_cred_set_blob 13 0 100.00% 8 0 100.00%
-fido_cred_set_fmt 20 4 80.00% 12 2 83.33%
+fido_cred_set_blob 15 0 100.00% 8 0 100.00%
+fido_cred_set_fmt 23 4 82.61% 12 2 83.33%
fido_cred_set_type 23 2 91.30% 9 1 88.89%
fido_cred_type 1 0 100.00% 3 0 100.00%
fido_cred_flags 1 0 100.00% 3 0 100.00%
@@ -299,6 +305,9 @@ fido_cred_clientdata_hash_ptr 1 0 100.00% 3
fido_cred_clientdata_hash_len 1 0 100.00% 3 0 100.00%
fido_cred_x5c_ptr 1 0 100.00% 3 0 100.00%
fido_cred_x5c_len 1 0 100.00% 3 0 100.00%
+fido_cred_x5c_list_count 1 0 100.00% 3 0 100.00%
+fido_cred_x5c_list_ptr 5 0 100.00% 5 0 100.00%
+fido_cred_x5c_list_len 4 0 100.00% 5 0 100.00%
fido_cred_sig_ptr 1 0 100.00% 3 0 100.00%
fido_cred_sig_len 1 0 100.00% 3 0 100.00%
fido_cred_authdata_ptr 1 0 100.00% 3 0 100.00%
@@ -307,7 +316,7 @@ fido_cred_authdata_raw_ptr 1 0 100.00% 3
fido_cred_authdata_raw_len 1 0 100.00% 3 0 100.00%
fido_cred_attstmt_ptr 1 0 100.00% 3 0 100.00%
fido_cred_attstmt_len 1 0 100.00% 3 0 100.00%
-fido_cred_pubkey_ptr 11 0 100.00% 21 0 100.00%
+fido_cred_pubkey_ptr 12 0 100.00% 21 0 100.00%
fido_cred_pubkey_len 11 0 100.00% 21 0 100.00%
fido_cred_id_ptr 1 0 100.00% 3 0 100.00%
fido_cred_id_len 1 0 100.00% 3 0 100.00%
@@ -324,80 +333,83 @@ fido_cred_user_id_ptr 1 0 100.00% 3
fido_cred_user_id_len 1 0 100.00% 3 0 100.00%
fido_cred_largeblob_key_ptr 1 0 100.00% 3 0 100.00%
fido_cred_largeblob_key_len 1 0 100.00% 3 0 100.00%
+fido_cred_entattest 1 0 100.00% 3 0 100.00%
cred.c:fido_dev_make_cred_wait 10 0 100.00% 7 0 100.00%
-cred.c:fido_dev_make_cred_tx 64 0 100.00% 70 0 100.00%
-cred.c:fido_dev_make_cred_rx 29 0 100.00% 32 0 100.00%
-cred.c:parse_makecred_reply 14 0 100.00% 27 0 100.00%
+cred.c:fido_dev_make_cred_tx 87 0 100.00% 77 0 100.00%
+cred.c:fido_dev_make_cred_rx 32 0 100.00% 32 0 100.00%
+cred.c:parse_makecred_reply 17 0 100.00% 29 0 100.00%
cred.c:check_extensions 2 0 100.00% 6 0 100.00%
-cred.c:get_signed_hash_u2f 27 0 100.00% 27 0 100.00%
-cred.c:verify_attstmt 25 2 92.00% 43 6 86.05%
+cred.c:get_signed_hash_u2f 38 0 100.00% 27 0 100.00%
+cred.c:verify_attstmt 38 3 92.11% 48 10 79.17%
+cred.c:fido_cred_clean_attobj 2 0 100.00% 5 0 100.00%
cred.c:fido_cred_clean_authdata 1 0 100.00% 8 0 100.00%
cred.c:fido_cred_clean_attstmt 1 0 100.00% 8 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 653 36 94.49% 853 39 95.43%
+-----------------------------------------------------------------------------------------
+TOTAL 860 37 95.70% 928 42 95.47%
File '/libfido2/src/credman.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_credman_get_dev_metadata 1 0 100.00% 4 0 100.00%
fido_credman_get_dev_rk 1 0 100.00% 4 0 100.00%
fido_credman_del_dev_rk 1 0 100.00% 4 0 100.00%
fido_credman_get_dev_rp 1 0 100.00% 4 0 100.00%
fido_credman_set_dev_rk 1 0 100.00% 4 0 100.00%
fido_credman_rk_new 1 0 100.00% 3 0 100.00%
-fido_credman_rk_free 6 1 83.33% 8 1 87.50%
+fido_credman_rk_free 10 1 90.00% 7 1 85.71%
fido_credman_rk_count 1 0 100.00% 3 0 100.00%
-fido_credman_rk 4 0 100.00% 5 0 100.00%
+fido_credman_rk 5 0 100.00% 5 0 100.00%
fido_credman_metadata_new 1 0 100.00% 3 0 100.00%
-fido_credman_metadata_free 6 1 83.33% 7 1 85.71%
+fido_credman_metadata_free 10 1 90.00% 6 1 83.33%
fido_credman_rk_existing 1 0 100.00% 3 0 100.00%
fido_credman_rk_remaining 1 0 100.00% 3 0 100.00%
fido_credman_rp_new 1 0 100.00% 3 0 100.00%
-fido_credman_rp_free 6 1 83.33% 8 1 87.50%
+fido_credman_rp_free 10 1 90.00% 7 1 85.71%
fido_credman_rp_count 1 0 100.00% 3 0 100.00%
-fido_credman_rp_id 4 0 100.00% 5 0 100.00%
-fido_credman_rp_name 4 0 100.00% 5 0 100.00%
+fido_credman_rp_id 5 0 100.00% 5 0 100.00%
+fido_credman_rp_name 5 0 100.00% 5 0 100.00%
fido_credman_rp_id_hash_len 4 0 100.00% 5 0 100.00%
-fido_credman_rp_id_hash_ptr 4 0 100.00% 5 0 100.00%
-credman.c:credman_get_metadata_wait 11 0 100.00% 8 0 100.00%
-credman.c:credman_tx 36 0 100.00% 50 0 100.00%
-credman.c:credman_prepare_hmac 31 1 96.77% 50 2 96.00%
-credman.c:credman_rx_metadata 19 0 100.00% 24 0 100.00%
-credman.c:credman_parse_metadata 9 0 100.00% 17 0 100.00%
-credman.c:credman_get_rk_wait 27 0 100.00% 23 0 100.00%
-credman.c:credman_rx_rk 27 0 100.00% 35 0 100.00%
-credman.c:credman_parse_rk_count 16 0 100.00% 20 0 100.00%
-credman.c:credman_grow_array 17 2 88.24% 21 5 76.19%
-credman.c:credman_parse_rk 23 0 100.00% 31 0 100.00%
-credman.c:credman_rx_next_rk 23 2 91.30% 29 5 82.76%
-credman.c:credman_del_rk_wait 16 0 100.00% 15 0 100.00%
-credman.c:credman_get_rp_wait 23 0 100.00% 15 0 100.00%
-credman.c:credman_rx_rp 27 0 100.00% 35 0 100.00%
-credman.c:credman_parse_rp_count 16 0 100.00% 20 0 100.00%
-credman.c:credman_parse_rp 9 0 100.00% 17 0 100.00%
-credman.c:credman_rx_next_rp 23 2 91.30% 29 5 82.76%
-credman.c:credman_set_dev_rk_wait 11 0 100.00% 8 0 100.00%
-credman.c:credman_reset_rk 4 0 100.00% 9 0 100.00%
-credman.c:credman_reset_rp 4 0 100.00% 12 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 422 10 97.63% 557 20 96.41%
+fido_credman_rp_id_hash_ptr 5 0 100.00% 5 0 100.00%
+credman.c:credman_get_metadata_wait 13 0 100.00% 8 0 100.00%
+credman.c:credman_tx 41 0 100.00% 50 0 100.00%
+credman.c:credman_get_cmd 7 0 100.00% 5 0 100.00%
+credman.c:credman_prepare_hmac 38 1 97.37% 50 2 96.00%
+credman.c:credman_rx_metadata 20 0 100.00% 24 0 100.00%
+credman.c:credman_parse_metadata 11 0 100.00% 17 0 100.00%
+credman.c:credman_get_rk_wait 30 0 100.00% 23 0 100.00%
+credman.c:credman_rx_rk 28 0 100.00% 35 0 100.00%
+credman.c:credman_parse_rk_count 20 0 100.00% 20 0 100.00%
+credman.c:credman_grow_array 19 2 89.47% 21 5 76.19%
+credman.c:credman_parse_rk 27 0 100.00% 31 0 100.00%
+credman.c:credman_rx_next_rk 24 2 91.67% 29 5 82.76%
+credman.c:credman_del_rk_wait 17 0 100.00% 15 0 100.00%
+credman.c:credman_get_rp_wait 28 0 100.00% 15 0 100.00%
+credman.c:credman_rx_rp 28 0 100.00% 35 0 100.00%
+credman.c:credman_parse_rp_count 20 0 100.00% 20 0 100.00%
+credman.c:credman_parse_rp 11 0 100.00% 17 0 100.00%
+credman.c:credman_rx_next_rp 24 2 91.67% 29 5 82.76%
+credman.c:credman_set_dev_rk_wait 12 0 100.00% 8 0 100.00%
+credman.c:credman_reset_rk 5 0 100.00% 8 0 100.00%
+credman.c:credman_reset_rp 7 0 100.00% 11 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 496 10 97.98% 557 20 96.41%
File '/libfido2/src/dev.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_dev_info_manifest 2 0 100.00% 11 0 100.00%
-fido_dev_open_with_info 5 5 0.00% 6 6 0.00%
+fido_dev_open_with_info 6 6 0.00% 6 6 0.00%
fido_dev_open 13 4 69.23% 16 6 62.50%
-fido_dev_close 9 2 77.78% 8 1 87.50%
-fido_dev_set_sigmask 18 18 0.00% 11 11 0.00%
-fido_dev_cancel 11 0 100.00% 8 0 100.00%
-fido_dev_set_io_functions 18 4 77.78% 14 6 57.14%
-fido_dev_set_transport_functions 6 2 66.67% 9 3 66.67%
+fido_dev_close 13 2 84.62% 8 1 87.50%
+fido_dev_set_sigmask 23 23 0.00% 11 11 0.00%
+fido_dev_cancel 13 0 100.00% 8 0 100.00%
+fido_dev_set_io_functions 29 4 86.21% 14 6 57.14%
+fido_dev_set_transport_functions 8 2 75.00% 9 3 66.67%
fido_dev_io_handle 1 1 0.00% 3 3 0.00%
-fido_init 8 1 87.50% 5 0 100.00%
-fido_dev_new 5 0 100.00% 14 0 100.00%
-fido_dev_new_with_info 10 10 0.00% 16 16 0.00%
-fido_dev_free 6 0 100.00% 8 0 100.00%
+fido_init 9 2 77.78% 5 0 100.00%
+fido_dev_new 7 0 100.00% 14 0 100.00%
+fido_dev_new_with_info 18 18 0.00% 16 16 0.00%
+fido_dev_free 10 0 100.00% 7 0 100.00%
fido_dev_protocol 1 0 100.00% 3 0 100.00%
fido_dev_major 1 0 100.00% 3 0 100.00%
fido_dev_minor 1 0 100.00% 3 0 100.00%
@@ -408,7 +420,7 @@ fido_dev_is_winhello 2 2 0.00% 3
fido_dev_supports_pin 3 0 100.00% 3 0 100.00%
fido_dev_has_pin 2 0 100.00% 3 0 100.00%
fido_dev_supports_cred_prot 2 0 100.00% 3 0 100.00%
-fido_dev_supports_credman 2 0 100.00% 3 0 100.00%
+fido_dev_supports_credman 3 0 100.00% 3 0 100.00%
fido_dev_supports_uv 3 0 100.00% 3 0 100.00%
fido_dev_has_uv 2 0 100.00% 3 0 100.00%
fido_dev_supports_permissions 2 0 100.00% 3 0 100.00%
@@ -419,112 +431,112 @@ fido_dev_maxmsgsize 1 0 100.00% 3
fido_dev_set_timeout 6 2 66.67% 6 1 83.33%
dev.c:run_manifest 10 0 100.00% 13 0 100.00%
dev.c:fido_dev_open_wait 10 0 100.00% 7 0 100.00%
-dev.c:fido_dev_open_tx 56 11 80.36% 56 20 64.29%
+dev.c:fido_dev_open_tx 62 11 82.26% 56 20 64.29%
dev.c:set_random_report_len 11 0 100.00% 6 0 100.00%
-dev.c:fido_dev_open_rx 36 1 97.22% 53 1 98.11%
+dev.c:fido_dev_open_rx 40 1 97.50% 53 1 98.11%
dev.c:fido_dev_set_flags 1 0 100.00% 5 0 100.00%
dev.c:fido_dev_set_extension_flags 7 0 100.00% 7 0 100.00%
-dev.c:fido_dev_set_option_flags 31 0 100.00% 20 0 100.00%
+dev.c:fido_dev_set_option_flags 42 0 100.00% 25 0 100.00%
dev.c:fido_dev_set_protocol_flags 11 0 100.00% 17 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 332 65 80.42% 378 80 78.84%
+-----------------------------------------------------------------------------------------
+TOTAL 394 80 79.70% 382 80 79.06%
File '/libfido2/src/ecdh.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_do_ecdh 29 0 100.00% 36 0 100.00%
-ecdh.c:do_ecdh 37 0 100.00% 44 0 100.00%
-ecdh.c:kdf 19 1 94.74% 28 2 92.86%
-ecdh.c:hkdf_sha256 32 1 96.88% 38 3 92.11%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 117 2 98.29% 146 5 96.58%
+-----------------------------------------------------------------------------------------
+fido_do_ecdh 38 0 100.00% 36 0 100.00%
+ecdh.c:do_ecdh 57 0 100.00% 44 0 100.00%
+ecdh.c:kdf 26 1 96.15% 28 2 92.86%
+ecdh.c:hkdf_sha256 48 1 97.92% 38 3 92.11%
+-----------------------------------------------------------------------------------------
+TOTAL 169 2 98.82% 146 5 96.58%
File '/libfido2/src/eddsa.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-eddsa_pk_decode 8 0 100.00% 9 0 100.00%
+-----------------------------------------------------------------------------------------
+eddsa_pk_decode 12 0 100.00% 9 0 100.00%
eddsa_pk_new 1 0 100.00% 3 0 100.00%
-eddsa_pk_free 6 0 100.00% 7 0 100.00%
-eddsa_pk_from_ptr 10 0 100.00% 12 0 100.00%
-eddsa_pk_to_EVP_PKEY 3 0 100.00% 7 0 100.00%
-eddsa_pk_from_EVP_PKEY 18 2 88.89% 12 1 91.67%
-eddsa_verify_sig 19 2 89.47% 30 6 80.00%
-eddsa_pk_verify_sig 7 1 85.71% 13 2 84.62%
-eddsa.c:decode_pubkey_point 8 0 100.00% 11 0 100.00%
-eddsa.c:decode_coord 8 0 100.00% 10 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 88 5 94.32% 114 9 92.11%
+eddsa_pk_free 10 0 100.00% 6 0 100.00%
+eddsa_pk_from_ptr 11 0 100.00% 12 0 100.00%
+eddsa_pk_to_EVP_PKEY 8 0 100.00% 7 0 100.00%
+eddsa_pk_from_EVP_PKEY 22 2 90.91% 12 1 91.67%
+eddsa_verify_sig 30 2 93.33% 30 6 80.00%
+eddsa_pk_verify_sig 9 1 88.89% 13 2 84.62%
+eddsa.c:decode_pubkey_point 10 0 100.00% 11 0 100.00%
+eddsa.c:decode_coord 12 0 100.00% 10 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 125 5 96.00% 113 9 92.04%
File '/libfido2/src/err.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_strerr 122 10 91.80% 126 10 92.06%
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
TOTAL 122 10 91.80% 126 10 92.06%
File '/libfido2/src/es256.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-es256_pk_decode 8 0 100.00% 9 0 100.00%
-es256_pk_encode 56 0 100.00% 48 0 100.00%
+-----------------------------------------------------------------------------------------
+es256_pk_decode 12 0 100.00% 9 0 100.00%
+es256_pk_encode 80 0 100.00% 48 0 100.00%
es256_sk_new 1 0 100.00% 3 0 100.00%
-es256_sk_free 6 0 100.00% 7 0 100.00%
+es256_sk_free 10 0 100.00% 6 0 100.00%
es256_pk_new 1 0 100.00% 3 0 100.00%
-es256_pk_free 6 0 100.00% 7 0 100.00%
-es256_pk_from_ptr 15 0 100.00% 17 0 100.00%
+es256_pk_free 10 0 100.00% 6 0 100.00%
+es256_pk_from_ptr 16 0 100.00% 17 0 100.00%
es256_pk_set_x 1 0 100.00% 4 0 100.00%
es256_pk_set_y 1 0 100.00% 4 0 100.00%
-es256_sk_create 39 0 100.00% 40 0 100.00%
-es256_pk_to_EVP_PKEY 42 0 100.00% 53 0 100.00%
-es256_pk_from_EC_KEY 42 2 95.24% 47 4 91.49%
-es256_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
-es256_sk_to_EVP_PKEY 28 0 100.00% 39 0 100.00%
-es256_derive_pk 25 0 100.00% 29 0 100.00%
-es256_verify_sig 12 2 83.33% 19 5 73.68%
-es256_pk_verify_sig 7 1 85.71% 13 2 84.62%
-es256.c:decode_pubkey_point 9 0 100.00% 13 0 100.00%
-es256.c:decode_coord 8 0 100.00% 10 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 315 5 98.41% 372 11 97.04%
+es256_sk_create 60 0 100.00% 40 0 100.00%
+es256_pk_to_EVP_PKEY 72 0 100.00% 53 0 100.00%
+es256_pk_from_EC_KEY 58 2 96.55% 47 4 91.49%
+es256_pk_from_EVP_PKEY 14 0 100.00% 7 0 100.00%
+es256_sk_to_EVP_PKEY 48 0 100.00% 39 0 100.00%
+es256_derive_pk 43 0 100.00% 29 0 100.00%
+es256_verify_sig 19 1 94.74% 19 2 89.47%
+es256_pk_verify_sig 9 1 88.89% 13 2 84.62%
+es256.c:decode_pubkey_point 11 0 100.00% 13 0 100.00%
+es256.c:decode_coord 12 0 100.00% 10 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 478 4 99.16% 370 8 97.84%
File '/libfido2/src/es384.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-es384_pk_decode 8 0 100.00% 9 0 100.00%
+-----------------------------------------------------------------------------------------
+es384_pk_decode 12 0 100.00% 9 0 100.00%
es384_pk_new 1 0 100.00% 3 0 100.00%
-es384_pk_free 6 0 100.00% 7 0 100.00%
-es384_pk_from_ptr 15 0 100.00% 17 0 100.00%
-es384_pk_to_EVP_PKEY 42 0 100.00% 53 0 100.00%
-es384_pk_from_EC_KEY 42 2 95.24% 47 4 91.49%
-es384_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
-es384_verify_sig 12 2 83.33% 19 5 73.68%
-es384_pk_verify_sig 7 1 85.71% 13 2 84.62%
-es384.c:decode_pubkey_point 9 0 100.00% 13 0 100.00%
-es384.c:decode_coord 8 0 100.00% 10 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 158 5 96.84% 198 11 94.44%
+es384_pk_free 10 0 100.00% 6 0 100.00%
+es384_pk_from_ptr 16 0 100.00% 17 0 100.00%
+es384_pk_to_EVP_PKEY 73 0 100.00% 53 0 100.00%
+es384_pk_from_EC_KEY 59 2 96.61% 47 4 91.49%
+es384_pk_from_EVP_PKEY 14 0 100.00% 7 0 100.00%
+es384_verify_sig 19 2 89.47% 19 5 73.68%
+es384_pk_verify_sig 9 1 88.89% 13 2 84.62%
+es384.c:decode_pubkey_point 11 0 100.00% 13 0 100.00%
+es384.c:decode_coord 12 0 100.00% 10 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 236 5 97.88% 197 11 94.42%
File '/libfido2/src/extern.h':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
File '/libfido2/src/fallthrough.h':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
File '/libfido2/src/fido.h':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
File '/libfido2/src/hid.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_hid_get_usage 13 0 100.00% 22 0 100.00%
fido_hid_get_report_len 19 0 100.00% 27 0 100.00%
fido_dev_info_new 1 0 100.00% 3 0 100.00%
-fido_dev_info_free 9 0 100.00% 9 0 100.00%
+fido_dev_info_free 13 0 100.00% 8 0 100.00%
fido_dev_info_ptr 1 0 100.00% 3 0 100.00%
-fido_dev_info_set 26 2 92.31% 30 3 90.00%
+fido_dev_info_set 41 2 95.12% 30 3 90.00%
fido_dev_info_path 1 0 100.00% 3 0 100.00%
fido_dev_info_vendor 1 0 100.00% 3 0 100.00%
fido_dev_info_product 1 0 100.00% 3 0 100.00%
@@ -533,45 +545,45 @@ fido_dev_info_product_string 1 0 100.00% 3
hid.c:get_key_len 6 0 100.00% 12 0 100.00%
hid.c:get_key_val 6 0 100.00% 18 0 100.00%
hid.c:fido_dev_info_reset 1 0 100.00% 6 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 87 2 97.70% 145 3 97.93%
+-----------------------------------------------------------------------------------------
+TOTAL 106 2 98.11% 144 3 97.92%
File '/libfido2/src/hid_linux.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_hid_manifest 35 4 88.57% 41 2 95.12%
-fido_hid_open 33 33 0.00% 51 51 0.00%
-fido_hid_close 3 3 0.00% 6 6 0.00%
+-----------------------------------------------------------------------------------------
+fido_hid_manifest 48 4 91.67% 41 2 95.12%
+fido_hid_open 52 52 0.00% 51 51 0.00%
+fido_hid_close 4 4 0.00% 6 6 0.00%
fido_hid_set_sigmask 2 2 0.00% 6 6 0.00%
-fido_hid_read 15 15 0.00% 21 21 0.00%
-fido_hid_write 12 12 0.00% 17 17 0.00%
+fido_hid_read 16 16 0.00% 21 21 0.00%
+fido_hid_write 13 13 0.00% 17 17 0.00%
fido_hid_report_in_len 1 1 0.00% 4 4 0.00%
fido_hid_report_out_len 1 1 0.00% 4 4 0.00%
-hid_linux.c:copy_info 34 0 100.00% 44 0 100.00%
-hid_linux.c:is_fido 15 1 93.33% 16 1 93.75%
-hid_linux.c:get_parent_attr 6 0 100.00% 9 0 100.00%
-hid_linux.c:parse_uevent 12 0 100.00% 24 0 100.00%
+hid_linux.c:copy_info 63 0 100.00% 53 0 100.00%
+hid_linux.c:is_fido 19 2 89.47% 16 1 93.75%
+hid_linux.c:get_parent_attr 10 0 100.00% 9 0 100.00%
+hid_linux.c:parse_uevent 36 0 100.00% 29 0 100.00%
hid_linux.c:get_usb_attr 1 0 100.00% 3 0 100.00%
-hid_linux.c:get_report_descriptor 14 1 92.86% 17 3 82.35%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 184 73 60.33% 263 115 56.27%
+hid_linux.c:get_report_descriptor 17 1 94.12% 17 3 82.35%
+-----------------------------------------------------------------------------------------
+TOTAL 283 96 66.08% 277 115 58.48%
File '/libfido2/src/hid_unix.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_hid_unix_open 18 11 38.89% 22 14 36.36%
-fido_hid_unix_wait 11 10 9.09% 21 12 42.86%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 29 21 27.59% 43 26 39.53%
+-----------------------------------------------------------------------------------------
+fido_hid_unix_open 31 20 35.48% 22 14 36.36%
+fido_hid_unix_wait 15 13 13.33% 21 12 42.86%
+-----------------------------------------------------------------------------------------
+TOTAL 46 33 28.26% 43 26 39.53%
File '/libfido2/src/info.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_dev_get_cbor_info_wait 10 0 100.00% 7 0 100.00%
fido_dev_get_cbor_info 1 0 100.00% 4 0 100.00%
-fido_cbor_info_new 4 0 100.00% 7 0 100.00%
+fido_cbor_info_new 6 0 100.00% 7 0 100.00%
fido_cbor_info_reset 1 0 100.00% 10 0 100.00%
-fido_cbor_info_free 6 0 100.00% 8 0 100.00%
+fido_cbor_info_free 10 0 100.00% 7 0 100.00%
fido_cbor_info_versions_ptr 1 0 100.00% 3 0 100.00%
fido_cbor_info_versions_len 1 0 100.00% 3 0 100.00%
fido_cbor_info_extensions_ptr 1 0 100.00% 3 0 100.00%
@@ -597,36 +609,36 @@ fido_cbor_info_rk_remaining 1 0 100.00% 3
fido_cbor_info_protocols_ptr 1 0 100.00% 3 0 100.00%
fido_cbor_info_protocols_len 1 0 100.00% 3 0 100.00%
fido_cbor_info_algorithm_count 1 0 100.00% 3 0 100.00%
-fido_cbor_info_algorithm_type 4 0 100.00% 5 0 100.00%
+fido_cbor_info_algorithm_type 5 0 100.00% 5 0 100.00%
fido_cbor_info_algorithm_cose 4 0 100.00% 5 0 100.00%
fido_cbor_info_new_pin_required 1 0 100.00% 3 0 100.00%
fido_cbor_info_certs_name_ptr 1 0 100.00% 3 0 100.00%
fido_cbor_info_certs_value_ptr 1 0 100.00% 3 0 100.00%
fido_cbor_info_certs_len 1 0 100.00% 3 0 100.00%
info.c:fido_dev_get_cbor_info_tx 8 0 100.00% 9 0 100.00%
-info.c:fido_dev_get_cbor_info_rx 14 0 100.00% 21 0 100.00%
-info.c:parse_reply_element 32 0 100.00% 59 0 100.00%
-info.c:decode_string_array 12 0 100.00% 17 0 100.00%
+info.c:fido_dev_get_cbor_info_rx 15 0 100.00% 21 0 100.00%
+info.c:parse_reply_element 35 0 100.00% 59 0 100.00%
+info.c:decode_string_array 17 0 100.00% 17 0 100.00%
info.c:decode_string 4 0 100.00% 10 0 100.00%
-info.c:decode_aaguid 8 0 100.00% 10 0 100.00%
-info.c:decode_options 11 0 100.00% 15 0 100.00%
-info.c:decode_option 7 0 100.00% 15 0 100.00%
-info.c:decode_protocols 12 0 100.00% 17 0 100.00%
-info.c:decode_protocol 6 0 100.00% 12 0 100.00%
-info.c:decode_algorithms 12 0 100.00% 17 0 100.00%
-info.c:decode_algorithm 9 0 100.00% 17 0 100.00%
-info.c:decode_algorithm_entry 20 0 100.00% 27 0 100.00%
-info.c:decode_certs 11 0 100.00% 15 0 100.00%
-info.c:decode_cert 7 0 100.00% 15 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 232 0 100.00% 409 0 100.00%
+info.c:decode_aaguid 12 0 100.00% 10 0 100.00%
+info.c:decode_options 19 0 100.00% 15 0 100.00%
+info.c:decode_option 8 0 100.00% 15 0 100.00%
+info.c:decode_protocols 17 0 100.00% 17 0 100.00%
+info.c:decode_protocol 8 0 100.00% 12 0 100.00%
+info.c:decode_algorithms 17 0 100.00% 17 0 100.00%
+info.c:decode_algorithm 12 0 100.00% 17 0 100.00%
+info.c:decode_algorithm_entry 25 0 100.00% 27 0 100.00%
+info.c:decode_certs 19 0 100.00% 15 0 100.00%
+info.c:decode_cert 8 0 100.00% 15 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 290 0 100.00% 408 0 100.00%
File '/libfido2/src/io.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_tx 14 0 100.00% 11 0 100.00%
-fido_rx 13 1 92.31% 14 3 78.57%
-fido_rx_cbor_status 16 0 100.00% 19 0 100.00%
+-----------------------------------------------------------------------------------------
+fido_tx 20 0 100.00% 11 0 100.00%
+fido_rx 19 1 94.74% 14 3 78.57%
+fido_rx_cbor_status 17 0 100.00% 19 0 100.00%
io.c:transport_tx 7 0 100.00% 10 0 100.00%
io.c:tx_empty 9 0 100.00% 14 0 100.00%
io.c:tx_pkt 7 0 100.00% 10 0 100.00%
@@ -637,318 +649,316 @@ io.c:transport_rx 7 0 100.00% 10
io.c:rx 40 2 95.00% 52 2 96.15%
io.c:rx_preamble 23 2 91.30% 22 5 77.27%
io.c:rx_frame 11 0 100.00% 11 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 193 7 96.37% 230 12 94.78%
+-----------------------------------------------------------------------------------------
+TOTAL 206 7 96.60% 230 12 94.78%
File '/libfido2/src/iso7816.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-iso7816_new 4 0 100.00% 16 0 100.00%
-iso7816_free 6 0 100.00% 7 0 100.00%
-iso7816_add 6 1 83.33% 8 1 87.50%
+-----------------------------------------------------------------------------------------
+iso7816_new 6 0 100.00% 16 0 100.00%
+iso7816_free 10 0 100.00% 6 0 100.00%
+iso7816_add 7 1 85.71% 8 1 87.50%
iso7816_ptr 1 0 100.00% 3 0 100.00%
-iso7816_len 1 0 100.00% 4 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 18 1 94.44% 38 1 97.37%
+iso7816_len 3 0 100.00% 3 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 27 1 96.30% 36 1 97.22%
File '/libfido2/src/largeblob.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_dev_largeblob_get 26 2 92.31% 38 4 89.47%
-fido_dev_largeblob_set 27 0 100.00% 36 0 100.00%
+-----------------------------------------------------------------------------------------
+fido_dev_largeblob_get 33 2 93.94% 38 4 89.47%
+fido_dev_largeblob_set 32 0 100.00% 36 0 100.00%
fido_dev_largeblob_remove 12 0 100.00% 18 0 100.00%
-fido_dev_largeblob_get_array 15 2 86.67% 27 4 85.19%
-fido_dev_largeblob_set_array 14 0 100.00% 19 0 100.00%
-largeblob.c:largeblob_get_array 32 0 100.00% 36 0 100.00%
-largeblob.c:get_chunklen 10 1 90.00% 9 1 88.89%
-largeblob.c:largeblob_get_tx 19 0 100.00% 24 0 100.00%
-largeblob.c:largeblob_get_rx 26 0 100.00% 30 0 100.00%
-largeblob.c:parse_largeblob_reply 8 0 100.00% 9 0 100.00%
+fido_dev_largeblob_get_array 20 2 90.00% 27 4 85.19%
+fido_dev_largeblob_set_array 18 0 100.00% 19 0 100.00%
+largeblob.c:largeblob_get_array 36 0 100.00% 36 0 100.00%
+largeblob.c:get_chunklen 14 3 78.57% 9 1 88.89%
+largeblob.c:largeblob_get_tx 22 0 100.00% 24 0 100.00%
+largeblob.c:largeblob_get_rx 29 0 100.00% 30 0 100.00%
+largeblob.c:parse_largeblob_reply 10 0 100.00% 9 0 100.00%
largeblob.c:largeblob_array_check 7 0 100.00% 16 0 100.00%
-largeblob.c:largeblob_array_digest 10 0 100.00% 9 0 100.00%
-largeblob.c:largeblob_array_load 14 2 85.71% 19 7 63.16%
-largeblob.c:largeblob_array_lookup 25 0 100.00% 33 0 100.00%
+largeblob.c:largeblob_array_digest 12 0 100.00% 9 0 100.00%
+largeblob.c:largeblob_array_load 18 4 77.78% 19 7 63.16%
+largeblob.c:largeblob_array_lookup 32 0 100.00% 33 0 100.00%
largeblob.c:largeblob_decode 16 2 87.50% 16 6 62.50%
-largeblob.c:largeblob_do_decode 27 3 88.89% 30 7 76.67%
-largeblob.c:largeblob_decrypt 15 0 100.00% 24 0 100.00%
-largeblob.c:largeblob_aad 1 0 100.00% 10 0 100.00%
+largeblob.c:largeblob_do_decode 31 3 90.32% 30 7 76.67%
+largeblob.c:largeblob_decrypt 20 0 100.00% 24 0 100.00%
+largeblob.c:largeblob_aad 2 0 100.00% 10 0 100.00%
largeblob.c:largeblob_reset 1 0 100.00% 5 0 100.00%
-largeblob.c:largeblob_encode 16 0 100.00% 21 0 100.00%
+largeblob.c:largeblob_encode 24 0 100.00% 21 0 100.00%
largeblob.c:largeblob_new 1 0 100.00% 3 0 100.00%
-largeblob.c:largeblob_seal 20 0 100.00% 32 0 100.00%
+largeblob.c:largeblob_seal 25 0 100.00% 32 0 100.00%
largeblob.c:largeblob_get_nonce 8 0 100.00% 16 0 100.00%
-largeblob.c:largeblob_free 6 0 100.00% 8 0 100.00%
-largeblob.c:largeblob_add 27 2 92.59% 35 3 91.43%
-largeblob.c:largeblob_drop 21 0 100.00% 27 0 100.00%
-largeblob.c:largeblob_set_array 54 2 96.30% 61 4 93.44%
-largeblob.c:largeblob_get_uv_token 19 0 100.00% 23 0 100.00%
-largeblob.c:largeblob_set_tx 35 0 100.00% 36 0 100.00%
-largeblob.c:prepare_hmac 13 2 84.62% 23 7 69.57%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 525 18 96.57% 693 43 93.80%
+largeblob.c:largeblob_free 10 0 100.00% 7 0 100.00%
+largeblob.c:largeblob_add 30 2 93.33% 35 3 91.43%
+largeblob.c:largeblob_drop 24 0 100.00% 27 0 100.00%
+largeblob.c:largeblob_set_array 59 2 96.61% 61 4 93.44%
+largeblob.c:largeblob_get_uv_token 23 0 100.00% 23 0 100.00%
+largeblob.c:largeblob_set_tx 47 0 100.00% 36 0 100.00%
+largeblob.c:prepare_hmac 17 2 88.24% 23 7 69.57%
+-----------------------------------------------------------------------------------------
+TOTAL 633 22 96.52% 692 43 93.79%
File '/libfido2/src/log.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
+-----------------------------------------------------------------------------------------
fido_log_init 1 0 100.00% 4 0 100.00%
-fido_log_debug 6 1 83.33% 8 1 87.50%
-fido_log_xxd 16 1 93.75% 24 1 95.83%
-fido_log_error 8 2 75.00% 11 2 81.82%
-fido_set_log_handler 3 0 100.00% 4 0 100.00%
-log.c:log_on_stderr 1 1 0.00% 3 3 0.00%
-log.c:do_log 4 0 100.00% 9 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 39 5 87.18% 63 7 88.89%
+fido_log_debug 10 1 90.00% 7 1 85.71%
+fido_log_xxd 19 1 94.74% 24 1 95.83%
+fido_log_error 11 2 81.82% 10 2 80.00%
+fido_set_log_handler 4 0 100.00% 4 0 100.00%
+log.c:log_on_stderr 2 2 0.00% 2 2 0.00%
+log.c:do_log 5 0 100.00% 9 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 52 6 88.46% 60 6 90.00%
File '/libfido2/src/netlink.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_nl_power_nfc 18 0 100.00% 24 0 100.00%
+-----------------------------------------------------------------------------------------
+fido_nl_power_nfc 24 0 100.00% 24 0 100.00%
fido_nl_get_nfc_target 17 0 100.00% 31 0 100.00%
-fido_nl_free 10 2 80.00% 9 2 77.78%
-fido_nl_new 16 1 93.75% 26 3 88.46%
+fido_nl_free 15 3 80.00% 8 2 75.00%
+fido_nl_new 27 2 92.59% 26 3 88.46%
set_netlink_io_functions 1 0 100.00% 4 0 100.00%
-netlink.c:nlmsg_new 8 0 100.00% 15 0 100.00%
-netlink.c:nlmsg_set_genl 1 0 100.00% 7 0 100.00%
-netlink.c:nlmsg_write 6 1 83.33% 7 1 85.71%
+netlink.c:nlmsg_new 19 0 100.00% 15 0 100.00%
+netlink.c:nlmsg_set_genl 2 0 100.00% 7 0 100.00%
+netlink.c:nlmsg_write 7 1 85.71% 7 1 85.71%
netlink.c:nlmsg_set_u32 1 0 100.00% 3 0 100.00%
-netlink.c:nlmsg_setattr 15 1 93.33% 17 0 100.00%
-netlink.c:nlmsg_tx 10 1 90.00% 13 3 76.92%
+netlink.c:nlmsg_setattr 20 1 95.00% 17 0 100.00%
+netlink.c:nlmsg_tx 11 1 90.91% 13 3 76.92%
netlink.c:nlmsg_ptr 1 0 100.00% 3 0 100.00%
netlink.c:nlmsg_len 1 0 100.00% 3 0 100.00%
-netlink.c:nlmsg_rx 11 2 81.82% 17 6 64.71%
-netlink.c:nl_parse_reply 20 0 100.00% 28 0 100.00%
-netlink.c:nlmsg_from_buf 15 0 100.00% 17 0 100.00%
+netlink.c:nlmsg_rx 16 2 87.50% 17 6 64.71%
+netlink.c:nl_parse_reply 24 0 100.00% 28 0 100.00%
+netlink.c:nlmsg_from_buf 23 0 100.00% 17 0 100.00%
netlink.c:nlmsg_type 1 0 100.00% 3 0 100.00%
-netlink.c:nlmsg_get_status 8 0 100.00% 8 0 100.00%
+netlink.c:nlmsg_get_status 9 0 100.00% 8 0 100.00%
netlink.c:nlmsg_read 6 0 100.00% 7 0 100.00%
netlink.c:nlmsg_get_genl 6 0 100.00% 7 0 100.00%
-netlink.c:nlmsg_iter 6 0 100.00% 13 0 100.00%
+netlink.c:nlmsg_iter 7 0 100.00% 13 0 100.00%
netlink.c:nlmsg_getattr 1 0 100.00% 3 0 100.00%
-netlink.c:nla_from_buf 17 0 100.00% 21 0 100.00%
-netlink.c:nl_nfc_poll 18 0 100.00% 25 0 100.00%
+netlink.c:nla_from_buf 27 0 100.00% 21 0 100.00%
+netlink.c:nl_nfc_poll 25 0 100.00% 25 0 100.00%
netlink.c:parse_nfc_event 10 0 100.00% 17 0 100.00%
netlink.c:nla_type 1 0 100.00% 3 0 100.00%
netlink.c:nla_get_u32 1 0 100.00% 3 0 100.00%
netlink.c:nla_read 6 0 100.00% 7 0 100.00%
-netlink.c:nl_dump_nfc_target 19 0 100.00% 31 0 100.00%
+netlink.c:nl_dump_nfc_target 24 0 100.00% 31 0 100.00%
netlink.c:parse_target 9 0 100.00% 13 0 100.00%
-netlink.c:nl_get_nfc_family 23 0 100.00% 33 0 100.00%
+netlink.c:nl_get_nfc_family 32 0 100.00% 33 0 100.00%
netlink.c:nlmsg_set_u16 1 0 100.00% 3 0 100.00%
netlink.c:nlmsg_set_str 1 0 100.00% 3 0 100.00%
netlink.c:parse_family 10 0 100.00% 17 0 100.00%
netlink.c:nla_get_u16 1 0 100.00% 3 0 100.00%
-netlink.c:nla_iter 6 0 100.00% 13 0 100.00%
+netlink.c:nla_iter 7 0 100.00% 13 0 100.00%
netlink.c:nla_getattr 1 0 100.00% 3 0 100.00%
netlink.c:parse_mcastgrps 1 0 100.00% 3 0 100.00%
-netlink.c:parse_mcastgrp 15 0 100.00% 24 0 100.00%
-netlink.c:nla_get_str 10 0 100.00% 11 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 329 8 97.57% 498 15 96.99%
+netlink.c:parse_mcastgrp 18 0 100.00% 24 0 100.00%
+netlink.c:nla_get_str 14 0 100.00% 11 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 428 10 97.66% 497 15 96.98%
File '/libfido2/src/nfc.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_nfc_tx 28 0 100.00% 43 0 100.00%
-fido_nfc_rx 8 0 100.00% 13 0 100.00%
-nfc_is_fido 13 1 92.31% 21 3 85.71%
+-----------------------------------------------------------------------------------------
+fido_nfc_tx 36 0 100.00% 43 0 100.00%
+fido_nfc_rx 9 0 100.00% 13 0 100.00%
+nfc_is_fido 17 1 94.12% 21 3 85.71%
fido_is_nfc 3 0 100.00% 3 0 100.00%
-fido_dev_set_nfc 4 1 75.00% 18 3 83.33%
+fido_dev_set_nfc 6 1 83.33% 18 3 83.33%
nfc.c:nfc_do_tx 20 0 100.00% 25 0 100.00%
nfc.c:tx_short_apdu 14 0 100.00% 32 0 100.00%
-nfc.c:rx_init 25 0 100.00% 27 0 100.00%
-nfc.c:rx_cbor 4 0 100.00% 6 0 100.00%
-nfc.c:rx_msg 18 2 88.89% 23 6 73.91%
-nfc.c:rx_apdu 14 1 92.86% 22 3 86.36%
-nfc.c:tx_get_response 4 0 100.00% 11 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 155 5 96.77% 244 15 93.85%
+nfc.c:rx_init 26 0 100.00% 27 0 100.00%
+nfc.c:rx_cbor 5 0 100.00% 6 0 100.00%
+nfc.c:rx_msg 19 1 94.74% 23 3 86.96%
+nfc.c:rx_apdu 14 0 100.00% 22 0 100.00%
+nfc.c:tx_get_response 7 0 100.00% 12 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 176 3 98.30% 245 9 96.33%
File '/libfido2/src/nfc_linux.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_nfc_manifest 35 7 80.00% 45 15 66.67%
-fido_nfc_open 20 3 85.00% 23 4 82.61%
+-----------------------------------------------------------------------------------------
+fido_nfc_manifest 48 7 85.42% 45 15 66.67%
+fido_nfc_open 23 2 91.30% 22 4 81.82%
fido_nfc_close 1 1 0.00% 4 4 0.00%
fido_nfc_set_sigmask 2 2 0.00% 6 6 0.00%
-fido_nfc_read 14 14 0.00% 30 30 0.00%
-fido_nfc_write 12 12 0.00% 18 18 0.00%
-nfc_linux.c:copy_info 39 22 43.59% 44 16 63.64%
+fido_nfc_read 15 15 0.00% 30 30 0.00%
+fido_nfc_write 14 14 0.00% 18 18 0.00%
+nfc_linux.c:copy_info 57 33 42.11% 44 16 63.64%
nfc_linux.c:get_usb_attr 1 1 0.00% 3 3 0.00%
-nfc_linux.c:get_parent_attr 6 6 0.00% 9 9 0.00%
-nfc_linux.c:sysnum_from_syspath 15 0 100.00% 17 0 100.00%
-nfc_linux.c:nfc_new 6 0 100.00% 11 0 100.00%
-nfc_linux.c:nfc_target_connect 9 9 0.00% 21 21 0.00%
-nfc_linux.c:nfc_free 12 0 100.00% 11 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 172 77 55.23% 242 126 47.93%
+nfc_linux.c:get_parent_attr 10 10 0.00% 9 9 0.00%
+nfc_linux.c:sysnum_from_syspath 26 0 100.00% 17 0 100.00%
+nfc_linux.c:nfc_new 10 0 100.00% 11 0 100.00%
+nfc_linux.c:nfc_target_connect 20 8 60.00% 21 9 57.14%
+nfc_linux.c:nfc_free 18 0 100.00% 10 0 100.00%
+-----------------------------------------------------------------------------------------
+TOTAL 245 93 62.04% 240 114 52.50%
File '/libfido2/src/pcsc.c':
Name Regions Miss Cover Lines Miss Cover
--------------------------------------------------------------------------------------------------------------------
-fido_pcsc_manifest 51 0 100.00% 55 0 100.00%
-fido_pcsc_open 32 0 100.00% 43 0 100.00%
+-----------------------------------------------------------------------------------------
+fido_pcsc_manifest 55 0 100.00% 55 0 100.00%
+fido_pcsc_open 38 0 100.00% 43 0 100.00%
fido_pcsc_close 6 0 100.00% 9 0 100.00%
fido_pcsc_read 8 0 100.00% 16 0 100.00%
-fido_pcsc_write 8 0 100.00% 22 0 100.00%
+fido_pcsc_write 10 0 100.00% 22 0 100.00%
fido_pcsc_tx 1 0 100.00% 3 0 100.00%
fido_pcsc_rx 1 0 100.00% 3 0 100.00%
fido_is_pcsc 3 0 100.00% 3 0 100.00%
-fido_dev_set_pcsc 4 1 75.00% 18 3 83.33%
-pcsc.c:list_readers 24 0 100.00% 24 0 100.00%
-pcsc.c:copy_info 30 0 100.00% 41 0 100.00%
-pcsc.c:get_reader 25 0 100.00% 28 0 100.00%
+fido_dev_set_pcsc 6 1 83.33% 18 3 83.33%
+pcsc.c:list_readers 27 0 100.00% 24 0 100.00%
+pcsc.c:copy_info 35 0 100.00% 41 0 100.00%
+pcsc.c:get_reader 28 0 100.00% 28 0 100.00%
pcsc.c:prepare_io_request 11 0 100.00% 17 0 100.00%
--------------------------------------------------------------------------------------------------------------------
-TOTAL 204 1 99.51% 282 3 98.94%
+-----------------------------------------------------------------------------------------
+TOTAL 229 1 99.56% 282 3 98.94%
File '/libfido2/src/pin.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_sha256 7 0 100.00% 10 0 100.00%
+-------------------------------------------------------------------------------------------
+fido_sha256 10 0 100.00% 10 0 100.00%
fido_dev_get_uv_token 1 0 100.00% 3 0 100.00%
fido_dev_set_pin 1 0 100.00% 4 0 100.00%
fido_dev_get_retry_count 1 0 100.00% 4 0 100.00%
fido_dev_get_uv_retry_count 1 0 100.00% 4 0 100.00%
-cbor_add_uv_params 17 0 100.00% 23 0 100.00%
-pin.c:uv_token_wait 14 2 85.71% 12 1 91.67%
-pin.c:ctap21_uv_token_tx 49 0 100.00% 53 0 100.00%
-pin.c:pin_sha256_enc 19 0 100.00% 24 0 100.00%
-pin.c:encode_uv_permission 20 1 95.00% 19 3 84.21%
-pin.c:ctap20_uv_token_tx 37 0 100.00% 45 0 100.00%
-pin.c:uv_token_rx 27 0 100.00% 34 0 100.00%
-pin.c:parse_uv_token 8 0 100.00% 10 0 100.00%
-pin.c:fido_dev_set_pin_wait 21 0 100.00% 24 0 100.00%
-pin.c:fido_dev_change_pin_tx 45 0 100.00% 56 0 100.00%
-pin.c:pin_pad64_enc 15 0 100.00% 21 0 100.00%
-pin.c:pad64 18 0 100.00% 20 0 100.00%
-pin.c:fido_dev_set_pin_tx 33 0 100.00% 41 0 100.00%
+cbor_add_uv_params 22 0 100.00% 23 0 100.00%
+pin.c:uv_token_wait 17 2 88.24% 12 1 91.67%
+pin.c:ctap21_uv_token_tx 69 0 100.00% 53 0 100.00%
+pin.c:pin_sha256_enc 23 0 100.00% 24 0 100.00%
+pin.c:encode_uv_permission 25 2 92.00% 20 2 90.00%
+pin.c:ctap20_uv_token_tx 49 0 100.00% 45 0 100.00%
+pin.c:uv_token_rx 31 0 100.00% 34 0 100.00%
+pin.c:parse_uv_token 10 0 100.00% 10 0 100.00%
+pin.c:fido_dev_set_pin_wait 22 0 100.00% 24 0 100.00%
+pin.c:fido_dev_change_pin_tx 63 0 100.00% 56 0 100.00%
+pin.c:pin_pad64_enc 17 0 100.00% 21 0 100.00%
+pin.c:pad64 20 0 100.00% 20 0 100.00%
+pin.c:fido_dev_set_pin_tx 45 0 100.00% 41 0 100.00%
pin.c:fido_dev_get_pin_retry_count_wait 10 0 100.00% 7 0 100.00%
-pin.c:fido_dev_get_retry_count_tx 19 0 100.00% 23 0 100.00%
-pin.c:fido_dev_get_pin_retry_count_rx 19 0 100.00% 24 0 100.00%
+pin.c:fido_dev_get_retry_count_tx 22 0 100.00% 23 0 100.00%
+pin.c:fido_dev_get_pin_retry_count_rx 20 0 100.00% 24 0 100.00%
pin.c:parse_pin_retry_count 1 0 100.00% 3 0 100.00%
-pin.c:parse_retry_count 13 0 100.00% 16 0 100.00%
+pin.c:parse_retry_count 16 0 100.00% 16 0 100.00%
pin.c:fido_dev_get_uv_retry_count_wait 10 0 100.00% 7 0 100.00%
-pin.c:fido_dev_get_uv_retry_count_rx 19 0 100.00% 24 0 100.00%
+pin.c:fido_dev_get_uv_retry_count_rx 20 0 100.00% 24 0 100.00%
pin.c:parse_uv_retry_count 1 0 100.00% 3 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 426 3 99.30% 514 4 99.22%
+-------------------------------------------------------------------------------------------
+TOTAL 527 4 99.24% 515 3 99.42%
File '/libfido2/src/random.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------
fido_get_random 6 0 100.00% 6 0 100.00%
----------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------
TOTAL 6 0 100.00% 6 0 100.00%
File '/libfido2/src/reset.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------
fido_dev_reset 1 0 100.00% 4 0 100.00%
reset.c:fido_dev_reset_wait 15 0 100.00% 11 0 100.00%
reset.c:fido_dev_reset_tx 8 0 100.00% 8 0 100.00%
----------------------------------------------------------------------------------------------------------------------
+-------------------------------------------------------------------------------------------
TOTAL 24 0 100.00% 23 0 100.00%
File '/libfido2/src/rs1.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-rs1_verify_sig 20 2 90.00% 30 6 80.00%
-rs1.c:rs1_get_EVP_MD 1 0 100.00% 3 0 100.00%
-rs1.c:rs1_free_EVP_MD 1 0 100.00% 3 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 22 2 90.91% 36 6 83.33%
+-------------------------------------------------------------------------------------------
+rs1_verify_sig 30 1 96.67% 29 3 89.66%
+rs1.c:rs1_get_EVP_MD 1 0 100.00% 6 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 31 1 96.77% 35 3 91.43%
File '/libfido2/src/rs256.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-rs256_pk_decode 8 0 100.00% 9 0 100.00%
+-------------------------------------------------------------------------------------------
+rs256_pk_decode 12 0 100.00% 9 0 100.00%
rs256_pk_new 1 0 100.00% 3 0 100.00%
-rs256_pk_free 6 0 100.00% 7 0 100.00%
-rs256_pk_from_ptr 10 0 100.00% 12 0 100.00%
-rs256_pk_to_EVP_PKEY 35 0 100.00% 43 0 100.00%
-rs256_pk_from_RSA 32 6 81.25% 26 9 65.38%
-rs256_pk_from_EVP_PKEY 8 0 100.00% 7 0 100.00%
-rs256_verify_sig 20 2 90.00% 30 5 83.33%
-rs256_pk_verify_sig 7 1 85.71% 13 2 84.62%
-rs256.c:decode_rsa_pubkey 9 0 100.00% 13 0 100.00%
-rs256.c:decode_bignum 8 0 100.00% 10 0 100.00%
-rs256.c:rs256_get_EVP_MD 1 0 100.00% 3 0 100.00%
-rs256.c:rs256_free_EVP_MD 1 0 100.00% 3 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 146 9 93.84% 179 16 91.06%
+rs256_pk_free 10 0 100.00% 6 0 100.00%
+rs256_pk_from_ptr 11 0 100.00% 12 0 100.00%
+rs256_pk_to_EVP_PKEY 61 0 100.00% 43 0 100.00%
+rs256_pk_from_RSA 40 6 85.00% 26 9 65.38%
+rs256_pk_from_EVP_PKEY 14 0 100.00% 7 0 100.00%
+rs256_verify_sig 30 1 96.67% 29 2 93.10%
+rs256_pk_verify_sig 9 1 88.89% 13 2 84.62%
+rs256.c:decode_rsa_pubkey 11 0 100.00% 13 0 100.00%
+rs256.c:decode_bignum 12 0 100.00% 10 0 100.00%
+rs256.c:rs256_get_EVP_MD 1 0 100.00% 6 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 212 8 96.23% 177 13 92.66%
File '/libfido2/src/time.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_time_now 4 0 100.00% 7 0 100.00%
-fido_time_delta 23 1 95.65% 23 0 100.00%
-time.c:timespec_to_ms 16 2 87.50% 13 2 84.62%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 43 3 93.02% 43 2 95.35%
+-------------------------------------------------------------------------------------------
+fido_time_now 6 0 100.00% 7 0 100.00%
+fido_time_delta 25 1 96.00% 23 0 100.00%
+time.c:timespec_to_ms 19 2 89.47% 13 2 84.62%
+-------------------------------------------------------------------------------------------
+TOTAL 50 3 94.00% 43 2 95.35%
File '/libfido2/src/touch.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_dev_get_touch_begin 50 0 100.00% 59 0 100.00%
-fido_dev_get_touch_status 17 0 100.00% 20 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 67 0 100.00% 79 0 100.00%
+-------------------------------------------------------------------------------------------
+fido_dev_get_touch_begin 64 0 100.00% 59 0 100.00%
+fido_dev_get_touch_status 18 0 100.00% 20 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 82 0 100.00% 79 0 100.00%
File '/libfido2/src/tpm.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_get_signed_hash_tpm 25 0 100.00% 39 0 100.00%
-tpm.c:check_es256_pubarea 19 0 100.00% 30 0 100.00%
-tpm.c:bswap_es256_pubarea 1 0 100.00% 12 0 100.00%
-tpm.c:check_rs256_pubarea 17 0 100.00% 28 0 100.00%
-tpm.c:bswap_rs256_pubarea 1 0 100.00% 10 0 100.00%
+-------------------------------------------------------------------------------------------
+fido_get_signed_hash_tpm 28 0 100.00% 39 0 100.00%
+tpm.c:check_es256_pubarea 20 0 100.00% 30 0 100.00%
+tpm.c:bswap_es256_pubarea 11 0 100.00% 11 0 100.00%
+tpm.c:check_rs256_pubarea 18 0 100.00% 28 0 100.00%
+tpm.c:bswap_rs256_pubarea 9 0 100.00% 9 0 100.00%
tpm.c:check_sha1_certinfo 15 0 100.00% 38 0 100.00%
-tpm.c:get_signed_sha1 17 0 100.00% 19 0 100.00%
-tpm.c:get_signed_name 7 0 100.00% 10 0 100.00%
-tpm.c:bswap_sha1_certinfo 1 0 100.00% 8 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 103 0 100.00% 194 0 100.00%
+tpm.c:get_signed_sha1 27 0 100.00% 19 0 100.00%
+tpm.c:get_signed_name 9 0 100.00% 10 0 100.00%
+tpm.c:bswap_sha1_certinfo 7 0 100.00% 7 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 144 0 100.00% 191 0 100.00%
File '/libfido2/src/types.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_str_array_free 4 0 100.00% 7 0 100.00%
-fido_opt_array_free 4 0 100.00% 9 0 100.00%
-fido_byte_array_free 1 0 100.00% 5 0 100.00%
-fido_algo_free 1 0 100.00% 5 0 100.00%
-fido_algo_array_free 4 0 100.00% 7 0 100.00%
-fido_cert_array_free 4 0 100.00% 9 0 100.00%
-fido_str_array_pack 11 0 100.00% 14 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 29 0 100.00% 56 0 100.00%
+-------------------------------------------------------------------------------------------
+fido_str_array_free 5 0 100.00% 6 0 100.00%
+fido_opt_array_free 6 0 100.00% 8 0 100.00%
+fido_byte_array_free 2 0 100.00% 4 0 100.00%
+fido_algo_free 2 0 100.00% 4 0 100.00%
+fido_algo_array_free 5 0 100.00% 6 0 100.00%
+fido_cert_array_free 6 0 100.00% 8 0 100.00%
+fido_str_array_pack 13 0 100.00% 14 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 39 0 100.00% 50 0 100.00%
File '/libfido2/src/u2f.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-u2f_register 76 0 100.00% 81 0 100.00%
-u2f_authenticate 33 0 100.00% 37 0 100.00%
-u2f_get_touch_begin 37 0 100.00% 45 0 100.00%
-u2f_get_touch_status 26 0 100.00% 36 0 100.00%
-u2f.c:key_lookup 51 0 100.00% 65 0 100.00%
-u2f.c:send_dummy_register 37 0 100.00% 45 0 100.00%
-u2f.c:delay_ms 13 1 92.31% 15 3 80.00%
-u2f.c:parse_register_reply 49 0 100.00% 62 0 100.00%
-u2f.c:x5c_get 21 1 95.24% 26 3 88.46%
-u2f.c:sig_get 6 0 100.00% 10 0 100.00%
-u2f.c:encode_cred_attstmt 45 0 100.00% 52 0 100.00%
-u2f.c:encode_cred_authdata 33 2 93.94% 61 6 90.16%
-u2f.c:cbor_blob_from_ec_point 22 0 100.00% 31 0 100.00%
+-------------------------------------------------------------------------------------------
+u2f_register 87 0 100.00% 81 0 100.00%
+u2f_authenticate 34 0 100.00% 37 0 100.00%
+u2f_get_touch_begin 44 0 100.00% 45 0 100.00%
+u2f_get_touch_status 27 0 100.00% 36 0 100.00%
+u2f.c:key_lookup 62 0 100.00% 66 0 100.00%
+u2f.c:send_dummy_register 43 0 100.00% 45 0 100.00%
+u2f.c:delay_ms 15 1 93.33% 15 3 80.00%
+u2f.c:parse_register_reply 52 0 100.00% 62 0 100.00%
+u2f.c:x5c_get 30 1 96.67% 26 3 88.46%
+u2f.c:sig_get 8 0 100.00% 10 0 100.00%
+u2f.c:encode_cred_attstmt 64 0 100.00% 52 0 100.00%
+u2f.c:encode_cred_authdata 38 2 94.74% 61 6 90.16%
+u2f.c:cbor_blob_from_ec_point 27 0 100.00% 31 0 100.00%
u2f.c:u2f_authenticate_single 32 0 100.00% 43 0 100.00%
-u2f.c:do_auth 56 0 100.00% 67 0 100.00%
+u2f.c:do_auth 67 0 100.00% 67 0 100.00%
u2f.c:parse_auth_reply 23 0 100.00% 23 0 100.00%
-u2f.c:authdata_fake 12 0 100.00% 27 0 100.00%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 572 4 99.30% 726 12 98.35%
+u2f.c:authdata_fake 16 0 100.00% 27 0 100.00%
+-------------------------------------------------------------------------------------------
+TOTAL 669 4 99.40% 727 12 98.35%
File '/libfido2/src/util.c':
Name Regions Miss Cover Lines Miss Cover
----------------------------------------------------------------------------------------------------------------------
-fido_to_uint64 14 1 92.86% 14 1 92.86%
----------------------------------------------------------------------------------------------------------------------
-TOTAL 14 1 92.86% 14 1 92.86%
+-------------------------------------------------------------------------------------------
+fido_to_uint64 21 1 95.24% 14 1 92.86%
+-------------------------------------------------------------------------------------------
+TOTAL 21 1 95.24% 14 1 92.86%
diff --git a/contrib/libfido2/fuzz/fuzz_attobj.c b/contrib/libfido2/fuzz/fuzz_attobj.c
new file mode 100644
index 000000000000..4fddc0f461a9
--- /dev/null
+++ b/contrib/libfido2/fuzz/fuzz_attobj.c
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2024 Yubico AB. All rights reserved.
+ * Use of this source code is governed by a BSD-style
+ * license that can be found in the LICENSE file.
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#include <assert.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "mutator_aux.h"
+#include "wiredata_fido2.h"
+#include "wiredata_u2f.h"
+#include "dummy.h"
+
+#include "../openbsd-compat/openbsd-compat.h"
+
+struct param {
+ int seed;
+ char rp_id[MAXSTR];
+ struct blob cdh;
+ struct blob attobj;
+ uint8_t type;
+};
+
+static const uint8_t dummy_attestation_object[] = {
+ 0xa3, 0x63, 0x66, 0x6d, 0x74, 0x66, 0x70, 0x61,
+ 0x63, 0x6b, 0x65, 0x64, 0x67, 0x61, 0x74, 0x74,
+ 0x53, 0x74, 0x6d, 0x74, 0xa3, 0x63, 0x61, 0x6c,
+ 0x67, 0x26, 0x63, 0x73, 0x69, 0x67, 0x58, 0x46,
+ 0x30, 0x44, 0x02, 0x20, 0x54, 0x92, 0x28, 0x3b,
+ 0x83, 0x33, 0x47, 0x56, 0x68, 0x79, 0xb2, 0x0c,
+ 0x84, 0x80, 0xcc, 0x67, 0x27, 0x8b, 0xfa, 0x48,
+ 0x43, 0x0d, 0x3c, 0xb4, 0x02, 0x36, 0x87, 0x97,
+ 0x3e, 0xdf, 0x2f, 0x65, 0x02, 0x20, 0x1b, 0x56,
+ 0x17, 0x06, 0xe2, 0x26, 0x0f, 0x6a, 0xe9, 0xa9,
+ 0x70, 0x99, 0x62, 0xeb, 0x3a, 0x04, 0x1a, 0xc4,
+ 0xa7, 0x03, 0x28, 0x56, 0x7c, 0xed, 0x47, 0x08,
+ 0x68, 0x73, 0x6a, 0xb6, 0x89, 0x0d, 0x63, 0x78,
+ 0x35, 0x63, 0x81, 0x59, 0x02, 0xe6, 0x30, 0x82,
+ 0x02, 0xe2, 0x30, 0x81, 0xcb, 0x02, 0x01, 0x01,
+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
+ 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x30,
+ 0x1d, 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55,
+ 0x04, 0x03, 0x13, 0x12, 0x59, 0x75, 0x62, 0x69,
+ 0x63, 0x6f, 0x20, 0x55, 0x32, 0x46, 0x20, 0x54,
+ 0x65, 0x73, 0x74, 0x20, 0x43, 0x41, 0x30, 0x1e,
+ 0x17, 0x0d, 0x31, 0x34, 0x30, 0x35, 0x31, 0x35,
+ 0x31, 0x32, 0x35, 0x38, 0x35, 0x34, 0x5a, 0x17,
+ 0x0d, 0x31, 0x34, 0x30, 0x36, 0x31, 0x34, 0x31,
+ 0x32, 0x35, 0x38, 0x35, 0x34, 0x5a, 0x30, 0x1d,
+ 0x31, 0x1b, 0x30, 0x19, 0x06, 0x03, 0x55, 0x04,
+ 0x03, 0x13, 0x12, 0x59, 0x75, 0x62, 0x69, 0x63,
+ 0x6f, 0x20, 0x55, 0x32, 0x46, 0x20, 0x54, 0x65,
+ 0x73, 0x74, 0x20, 0x45, 0x45, 0x30, 0x59, 0x30,
+ 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d,
+ 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce,
+ 0x3d, 0x03, 0x01, 0x07, 0x03, 0x42, 0x00, 0x04,
+ 0xdb, 0x0a, 0xdb, 0xf5, 0x21, 0xc7, 0x5c, 0xce,
+ 0x63, 0xdc, 0xa6, 0xe1, 0xe8, 0x25, 0x06, 0x0d,
+ 0x94, 0xe6, 0x27, 0x54, 0x19, 0x4f, 0x9d, 0x24,
+ 0xaf, 0x26, 0x1a, 0xbe, 0xad, 0x99, 0x44, 0x1f,
+ 0x95, 0xa3, 0x71, 0x91, 0x0a, 0x3a, 0x20, 0xe7,
+ 0x3e, 0x91, 0x5e, 0x13, 0xe8, 0xbe, 0x38, 0x05,
+ 0x7a, 0xd5, 0x7a, 0xa3, 0x7e, 0x76, 0x90, 0x8f,
+ 0xaf, 0xe2, 0x8a, 0x94, 0xb6, 0x30, 0xeb, 0x9d,
+ 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86,
+ 0xf7, 0x0d, 0x01, 0x01, 0x0b, 0x05, 0x00, 0x03,
+ 0x82, 0x02, 0x01, 0x00, 0x95, 0x40, 0x6b, 0x50,
+ 0x61, 0x7d, 0xad, 0x84, 0xa3, 0xb4, 0xeb, 0x88,
+ 0x0f, 0xe3, 0x30, 0x0f, 0x2d, 0xa2, 0x0a, 0x00,
+ 0xd9, 0x25, 0x04, 0xee, 0x72, 0xfa, 0x67, 0xdf,
+ 0x58, 0x51, 0x0f, 0x0b, 0x47, 0x02, 0x9c, 0x3e,
+ 0x41, 0x29, 0x4a, 0x93, 0xac, 0x29, 0x85, 0x89,
+ 0x2d, 0xa4, 0x7a, 0x81, 0x32, 0x28, 0x57, 0x71,
+ 0x01, 0xef, 0xa8, 0x42, 0x88, 0x16, 0x96, 0x37,
+ 0x91, 0xd5, 0xdf, 0xe0, 0x8f, 0xc9, 0x3c, 0x8d,
+ 0xb0, 0xcd, 0x89, 0x70, 0x82, 0xec, 0x79, 0xd3,
+ 0xc6, 0x78, 0x73, 0x29, 0x32, 0xe5, 0xab, 0x6c,
+ 0xbd, 0x56, 0x9f, 0xd5, 0x45, 0x91, 0xce, 0xc1,
+ 0xdd, 0x8d, 0x64, 0xdc, 0xe9, 0x9c, 0x1f, 0x5e,
+ 0x3c, 0xd2, 0xaf, 0x51, 0xa5, 0x82, 0x18, 0xaf,
+ 0xe0, 0x37, 0xe7, 0x32, 0x9e, 0x76, 0x05, 0x77,
+ 0x02, 0x7b, 0xe6, 0x24, 0xa0, 0x31, 0x56, 0x1b,
+ 0xfd, 0x19, 0xc5, 0x71, 0xd3, 0xf0, 0x9e, 0xc0,
+ 0x73, 0x05, 0x4e, 0xbc, 0x85, 0xb8, 0x53, 0x9e,
+ 0xef, 0xc5, 0xbc, 0x9c, 0x56, 0xa3, 0xba, 0xd9,
+ 0x27, 0x6a, 0xbb, 0xa9, 0x7a, 0x40, 0xd7, 0x47,
+ 0x8b, 0x55, 0x72, 0x6b, 0xe3, 0xfe, 0x28, 0x49,
+ 0x71, 0x24, 0xf4, 0x8f, 0xf4, 0x20, 0x81, 0xea,
+ 0x38, 0xff, 0x7c, 0x0a, 0x4f, 0xdf, 0x02, 0x82,
+ 0x39, 0x81, 0x82, 0x3b, 0xca, 0x09, 0xdd, 0xca,
+ 0xaa, 0x0f, 0x27, 0xf5, 0xa4, 0x83, 0x55, 0x6c,
+ 0x9a, 0x39, 0x9b, 0x15, 0x3a, 0x16, 0x63, 0xdc,
+ 0x5b, 0xf9, 0xac, 0x5b, 0xbc, 0xf7, 0x9f, 0xbe,
+ 0x0f, 0x8a, 0xa2, 0x3c, 0x31, 0x13, 0xa3, 0x32,
+ 0x48, 0xca, 0x58, 0x87, 0xf8, 0x7b, 0xa0, 0xa1,
+ 0x0a, 0x6a, 0x60, 0x96, 0x93, 0x5f, 0x5d, 0x26,
+ 0x9e, 0x63, 0x1d, 0x09, 0xae, 0x9a, 0x41, 0xe5,
+ 0xbd, 0x08, 0x47, 0xfe, 0xe5, 0x09, 0x9b, 0x20,
+ 0xfd, 0x12, 0xe2, 0xe6, 0x40, 0x7f, 0xba, 0x4a,
+ 0x61, 0x33, 0x66, 0x0d, 0x0e, 0x73, 0xdb, 0xb0,
+ 0xd5, 0xa2, 0x9a, 0x9a, 0x17, 0x0d, 0x34, 0x30,
+ 0x85, 0x6a, 0x42, 0x46, 0x9e, 0xff, 0x34, 0x8f,
+ 0x5f, 0x87, 0x6c, 0x35, 0xe7, 0xa8, 0x4d, 0x35,
+ 0xeb, 0xc1, 0x41, 0xaa, 0x8a, 0xd2, 0xda, 0x19,
+ 0xaa, 0x79, 0xa2, 0x5f, 0x35, 0x2c, 0xa0, 0xfd,
+ 0x25, 0xd3, 0xf7, 0x9d, 0x25, 0x18, 0x2d, 0xfa,
+ 0xb4, 0xbc, 0xbb, 0x07, 0x34, 0x3c, 0x8d, 0x81,
+ 0xbd, 0xf4, 0xe9, 0x37, 0xdb, 0x39, 0xe9, 0xd1,
+ 0x45, 0x5b, 0x20, 0x41, 0x2f, 0x2d, 0x27, 0x22,
+ 0xdc, 0x92, 0x74, 0x8a, 0x92, 0xd5, 0x83, 0xfd,
+ 0x09, 0xfb, 0x13, 0x9b, 0xe3, 0x39, 0x7a, 0x6b,
+ 0x5c, 0xfa, 0xe6, 0x76, 0x9e, 0xe0, 0xe4, 0xe3,
+ 0xef, 0xad, 0xbc, 0xfd, 0x42, 0x45, 0x9a, 0xd4,
+ 0x94, 0xd1, 0x7e, 0x8d, 0xa7, 0xd8, 0x05, 0xd5,
+ 0xd3, 0x62, 0xcf, 0x15, 0xcf, 0x94, 0x7d, 0x1f,
+ 0x5b, 0x58, 0x20, 0x44, 0x20, 0x90, 0x71, 0xbe,
+ 0x66, 0xe9, 0x9a, 0xab, 0x74, 0x32, 0x70, 0x53,
+ 0x1d, 0x69, 0xed, 0x87, 0x66, 0xf4, 0x09, 0x4f,
+ 0xca, 0x25, 0x30, 0xc2, 0x63, 0x79, 0x00, 0x3c,
+ 0xb1, 0x9b, 0x39, 0x3f, 0x00, 0xe0, 0xa8, 0x88,
+ 0xef, 0x7a, 0x51, 0x5b, 0xe7, 0xbd, 0x49, 0x64,
+ 0xda, 0x41, 0x7b, 0x24, 0xc3, 0x71, 0x22, 0xfd,
+ 0xd1, 0xd1, 0x20, 0xb3, 0x3f, 0x97, 0xd3, 0x97,
+ 0xb2, 0xaa, 0x18, 0x1c, 0x9e, 0x03, 0x77, 0x7b,
+ 0x5b, 0x7e, 0xf9, 0xa3, 0xa0, 0xd6, 0x20, 0x81,
+ 0x2c, 0x38, 0x8f, 0x9d, 0x25, 0xde, 0xe9, 0xc8,
+ 0xf5, 0xdd, 0x6a, 0x47, 0x9c, 0x65, 0x04, 0x5a,
+ 0x56, 0xe6, 0xc2, 0xeb, 0xf2, 0x02, 0x97, 0xe1,
+ 0xb9, 0xd8, 0xe1, 0x24, 0x76, 0x9f, 0x23, 0x62,
+ 0x39, 0x03, 0x4b, 0xc8, 0xf7, 0x34, 0x07, 0x49,
+ 0xd6, 0xe7, 0x4d, 0x9a, 0x68, 0x61, 0x75, 0x74,
+ 0x68, 0x44, 0x61, 0x74, 0x61, 0x58, 0xc4, 0x49,
+ 0x96, 0x0d, 0xe5, 0x88, 0x0e, 0x8c, 0x68, 0x74,
+ 0x34, 0x17, 0x0f, 0x64, 0x76, 0x60, 0x5b, 0x8f,
+ 0xe4, 0xae, 0xb9, 0xa2, 0x86, 0x32, 0xc7, 0x99,
+ 0x5c, 0xf3, 0xba, 0x83, 0x1d, 0x97, 0x63, 0x41,
+ 0x00, 0x00, 0x00, 0x00, 0xf8, 0xa0, 0x11, 0xf3,
+ 0x8c, 0x0a, 0x4d, 0x15, 0x80, 0x06, 0x17, 0x11,
+ 0x1f, 0x9e, 0xdc, 0x7d, 0x00, 0x40, 0x53, 0xfb,
+ 0xdf, 0xaa, 0xce, 0x63, 0xde, 0xc5, 0xfe, 0x47,
+ 0xe6, 0x52, 0xeb, 0xf3, 0x5d, 0x53, 0xa8, 0xbf,
+ 0x9d, 0xd6, 0x09, 0x6b, 0x5e, 0x7f, 0xe0, 0x0d,
+ 0x51, 0x30, 0x85, 0x6a, 0xda, 0x68, 0x70, 0x85,
+ 0xb0, 0xdb, 0x08, 0x0b, 0x83, 0x2c, 0xef, 0x44,
+ 0xe2, 0x36, 0x88, 0xee, 0x76, 0x90, 0x6e, 0x7b,
+ 0x50, 0x3e, 0x9a, 0xa0, 0xd6, 0x3c, 0x34, 0xe3,
+ 0x83, 0xe7, 0xd1, 0xbd, 0x9f, 0x25, 0xa5, 0x01,
+ 0x02, 0x03, 0x26, 0x20, 0x01, 0x21, 0x58, 0x20,
+ 0x17, 0x5b, 0x27, 0xa6, 0x56, 0xb2, 0x26, 0x0c,
+ 0x26, 0x0c, 0x55, 0x42, 0x78, 0x17, 0x5d, 0x4c,
+ 0xf8, 0xa2, 0xfd, 0x1b, 0xb9, 0x54, 0xdf, 0xd5,
+ 0xeb, 0xbf, 0x22, 0x64, 0xf5, 0x21, 0x9a, 0xc6,
+ 0x22, 0x58, 0x20, 0x87, 0x5f, 0x90, 0xe6, 0xfd,
+ 0x71, 0x27, 0x9f, 0xeb, 0xe3, 0x03, 0x44, 0xbc,
+ 0x8d, 0x49, 0xc6, 0x1c, 0x31, 0x3b, 0x72, 0xae,
+ 0xd4, 0x53, 0xb1, 0xfe, 0x5d, 0xe1, 0x30, 0xfc,
+ 0x2b, 0x1e, 0xd2
+};
+
+struct param *
+unpack(const uint8_t *ptr, size_t len)
+{
+ cbor_item_t *item = NULL, **v;
+ struct cbor_load_result cbor;
+ struct param *p;
+ int ok = -1;
+
+ if ((p = calloc(1, sizeof(*p))) == NULL ||
+ (item = cbor_load(ptr, len, &cbor)) == NULL ||
+ cbor.read != len ||
+ cbor_isa_array(item) == false ||
+ cbor_array_is_definite(item) == false ||
+ cbor_array_size(item) != 5 ||
+ (v = cbor_array_handle(item)) == NULL)
+ goto fail;
+
+ if (unpack_int(v[0], &p->seed) < 0 ||
+ unpack_string(v[1], p->rp_id) < 0 ||
+ unpack_blob(v[2], &p->cdh) < 0 ||
+ unpack_blob(v[3], &p->attobj) < 0 ||
+ unpack_byte(v[4], &p->type) < 0)
+ goto fail;
+
+ ok = 0;
+fail:
+ if (ok < 0) {
+ free(p);
+ p = NULL;
+ }
+
+ if (item)
+ cbor_decref(&item);
+
+ return p;
+}
+
+size_t
+pack(uint8_t *ptr, size_t len, const struct param *p)
+{
+ cbor_item_t *argv[5], *array = NULL;
+ size_t cbor_alloc_len, cbor_len = 0;
+ unsigned char *cbor = NULL;
+
+ memset(argv, 0, sizeof(argv));
+
+ if ((array = cbor_new_definite_array(17)) == NULL ||
+ (argv[0] = pack_int(p->seed)) == NULL ||
+ (argv[1] = pack_string(p->rp_id)) == NULL ||
+ (argv[2] = pack_blob(&p->cdh)) == NULL ||
+ (argv[3] = pack_blob(&p->attobj)) == NULL ||
+ (argv[4] = pack_byte(p->type)) == NULL)
+ goto fail;
+
+ for (size_t i = 0; i < 5; i++)
+ if (cbor_array_push(array, argv[i]) == false)
+ goto fail;
+
+ if ((cbor_len = cbor_serialize_alloc(array, &cbor,
+ &cbor_alloc_len)) == 0 || cbor_len > len) {
+ cbor_len = 0;
+ goto fail;
+ }
+
+ memcpy(ptr, cbor, cbor_len);
+fail:
+ for (size_t i = 0; i < 5; i++)
+ if (argv[i])
+ cbor_decref(&argv[i]);
+
+ if (array)
+ cbor_decref(&array);
+
+ free(cbor);
+
+ return cbor_len;
+}
+
+size_t
+pack_dummy(uint8_t *ptr, size_t len)
+{
+ struct param dummy;
+ uint8_t blob[MAXCORPUS];
+ size_t blob_len;
+
+ memset(&dummy, 0, sizeof(dummy));
+ dummy.type = 1;
+
+ strlcpy(dummy.rp_id, dummy_rp_id, sizeof(dummy.rp_id));
+
+ dummy.cdh.len = sizeof(dummy_cdh);
+ dummy.attobj.len = sizeof(dummy_attestation_object);
+
+ memcpy(&dummy.cdh.body, &dummy_cdh, dummy.cdh.len);
+ memcpy(&dummy.attobj.body, dummy_attestation_object, dummy.attobj.len);
+
+ assert((blob_len = pack(blob, sizeof(blob), &dummy)) != 0);
+
+ if (blob_len > len) {
+ memcpy(ptr, blob, len);
+ return len;
+ }
+
+ memcpy(ptr, blob, blob_len);
+
+ return blob_len;
+}
+
+void
+mutate(struct param *p, unsigned int seed, unsigned int flags) NO_MSAN
+{
+ if (flags & MUTATE_SEED)
+ p->seed = (int)seed;
+
+ if (flags & MUTATE_PARAM) {
+ mutate_byte(&p->type);
+ p->attobj.len = sizeof(dummy_attestation_object);
+ memcpy(&p->attobj.body, &dummy_attestation_object,
+ p->attobj.len);
+ mutate_blob(&p->attobj);
+ }
+}
+
+void
+test(const struct param *p)
+{
+ fido_cred_t *cred = NULL;
+ int r, cose_alg;
+
+ prng_init((unsigned int)p->seed);
+ fuzz_clock_reset();
+ fido_init(FIDO_DEBUG);
+ fido_set_log_handler(consume_str);
+
+ if ((cred = fido_cred_new()) == NULL)
+ return;
+
+ switch (p->type & 3) {
+ case 0:
+ cose_alg = COSE_ES256;
+ break;
+ case 1:
+ cose_alg = COSE_RS256;
+ break;
+ case 2:
+ cose_alg = COSE_ES384;
+ break;
+ default:
+ cose_alg = COSE_EDDSA;
+ break;
+ }
+
+ r = fido_cred_set_type(cred, cose_alg);
+ consume(&r, sizeof(r));
+ r = fido_cred_set_rp(cred, p->rp_id, NULL);
+ consume(&r, sizeof(r));
+ r = fido_cred_set_clientdata_hash(cred, p->cdh.body, p->cdh.len);
+ consume(&r, sizeof(r));
+ r = fido_cred_set_attobj(cred, p->attobj.body, p->attobj.len);
+ consume(&r, sizeof(r));
+
+ consume_str(fido_cred_fmt(cred));
+ consume(fido_cred_attstmt_ptr(cred), fido_cred_attstmt_len(cred));
+ consume(fido_cred_authdata_ptr(cred), fido_cred_authdata_len(cred));
+ r = fido_cred_verify(cred);
+ consume(&r, sizeof(r));
+
+ fido_cred_free(&cred);
+}
diff --git a/contrib/libfido2/fuzz/fuzz_cred.c b/contrib/libfido2/fuzz/fuzz_cred.c
index 497298f70290..7d3ae61e3d7e 100644
--- a/contrib/libfido2/fuzz/fuzz_cred.c
+++ b/contrib/libfido2/fuzz/fuzz_cred.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2022 Yubico AB. All rights reserved.
+ * Copyright (c) 2019-2024 Yubico AB. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
* SPDX-License-Identifier: BSD-2-Clause
@@ -248,6 +248,8 @@ make_cred(fido_cred_t *cred, uint8_t opt, int type, const struct blob *cdh,
fido_cred_set_uv(cred, FIDO_OPT_TRUE);
if (user_id->len)
fido_cred_set_prot(cred, user_id->body[0] & 0x03);
+ if (excl_cred->len)
+ fido_cred_set_entattest(cred, excl_cred->body[0] & 0x03);
/* repeat memory operations to trigger reallocation paths */
fido_cred_set_type(cred, type);
@@ -279,6 +281,7 @@ verify_cred(int type, const unsigned char *cdh_ptr, size_t cdh_len,
uint8_t flags;
uint32_t sigcount;
int r;
+ bool ea;
if ((cred = fido_cred_new()) == NULL)
return;
@@ -309,6 +312,11 @@ verify_cred(int type, const unsigned char *cdh_ptr, size_t cdh_len,
if (fmt)
fido_cred_set_fmt(cred, fmt);
+ /* XXX +1 on purpose */
+ for (size_t i = 0; i < fido_cred_x5c_list_count(cred) + 1; i++)
+ consume(fido_cred_x5c_list_ptr(cred, i),
+ fido_cred_x5c_list_len(cred, i));
+
/* repeat memory operations to trigger reallocation paths */
if (fido_cred_set_authdata(cred, authdata_ptr, authdata_len) != FIDO_OK)
fido_cred_set_authdata_raw(cred, authdata_raw_ptr,
@@ -343,6 +351,9 @@ verify_cred(int type, const unsigned char *cdh_ptr, size_t cdh_len,
minpinlen = fido_cred_pin_minlen(cred);
consume(&minpinlen, sizeof(minpinlen));
+ ea = fido_cred_entattest(cred);
+ consume(&ea, sizeof(ea));
+
fido_cred_free(&cred);
}
diff --git a/contrib/libfido2/fuzz/libfuzzer.c b/contrib/libfido2/fuzz/libfuzzer.c
index 073ebe655cf2..d712aa6d55ea 100644
--- a/contrib/libfido2/fuzz/libfuzzer.c
+++ b/contrib/libfido2/fuzz/libfuzzer.c
@@ -9,6 +9,7 @@
#include <err.h>
#include <fcntl.h>
+#include <limits.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
diff --git a/contrib/libfido2/fuzz/mutator_aux.c b/contrib/libfido2/fuzz/mutator_aux.c
index 64c633f15f92..ebddf1046ba1 100644
--- a/contrib/libfido2/fuzz/mutator_aux.c
+++ b/contrib/libfido2/fuzz/mutator_aux.c
@@ -135,12 +135,18 @@ void
mutate_byte(uint8_t *b)
{
LLVMFuzzerMutate(b, sizeof(*b), sizeof(*b));
+#ifdef WITH_MSAN
+ __msan_unpoison(b, sizeof(*b));
+#endif
}
void
mutate_int(int *i)
{
LLVMFuzzerMutate((uint8_t *)i, sizeof(*i), sizeof(*i));
+#ifdef WITH_MSAN
+ __msan_unpoison(i, sizeof(*i));
+#endif
}
void
diff --git a/contrib/libfido2/fuzz/report.tgz b/contrib/libfido2/fuzz/report.tgz
index 9c01263576f1..7f89eb355310 100644
--- a/contrib/libfido2/fuzz/report.tgz
+++ b/contrib/libfido2/fuzz/report.tgz
Binary files differ
diff --git a/contrib/libfido2/fuzz/summary.txt b/contrib/libfido2/fuzz/summary.txt
index adda3acc0761..82cbe58edff9 100644
--- a/contrib/libfido2/fuzz/summary.txt
+++ b/contrib/libfido2/fuzz/summary.txt
@@ -1,55 +1,55 @@
Filename Regions Missed Regions Cover Functions Missed Functions Executed Lines Missed Lines Cover
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-fuzz/clock.c 24 1 95.83% 4 0 100.00% 35 1 97.14%
-fuzz/pcsc.c 59 0 100.00% 8 0 100.00% 75 12 84.00%
-fuzz/prng.c 31 0 100.00% 2 0 100.00% 35 1 97.14%
-fuzz/udev.c 110 2 98.18% 17 0 100.00% 126 12 90.48%
+--------------------------------------------------------------------------------------------------------------------------------------------------------
+fuzz/clock.c 29 1 96.55% 4 0 100.00% 35 1 97.14%
+fuzz/pcsc.c 78 0 100.00% 8 0 100.00% 75 0 100.00%
+fuzz/prng.c 32 0 100.00% 2 0 100.00% 35 0 100.00%
+fuzz/udev.c 152 3 98.03% 17 0 100.00% 123 4 96.75%
fuzz/uniform_random.c 7 1 85.71% 1 0 100.00% 12 1 91.67%
-fuzz/wrap.c 23 0 100.00% 3 0 100.00% 29 0 100.00%
+fuzz/wrap.c 29 0 100.00% 3 0 100.00% 29 0 100.00%
openbsd-compat/explicit_bzero.c 4 0 100.00% 1 0 100.00% 7 0 100.00%
-openbsd-compat/freezero.c 4 0 100.00% 1 0 100.00% 6 0 100.00%
-openbsd-compat/recallocarray.c 41 7 82.93% 1 0 100.00% 36 7 80.56%
+openbsd-compat/freezero.c 5 0 100.00% 1 0 100.00% 6 0 100.00%
+openbsd-compat/recallocarray.c 54 17 68.52% 1 0 100.00% 36 7 80.56%
openbsd-compat/timingsafe_bcmp.c 4 0 100.00% 1 0 100.00% 7 0 100.00%
-src/aes256.c 118 3 97.46% 8 0 100.00% 157 11 92.99%
-src/assert.c 628 45 92.83% 63 4 93.65% 782 51 93.48%
-src/authkey.c 52 0 100.00% 5 0 100.00% 66 0 100.00%
-src/bio.c 451 20 95.57% 49 2 95.92% 587 24 95.91%
-src/blob.c 53 2 96.23% 10 0 100.00% 83 4 95.18%
-src/buf.c 8 1 87.50% 2 0 100.00% 16 1 93.75%
-src/cbor.c 1070 12 98.88% 55 0 100.00% 1258 28 97.77%
-src/compress.c 105 14 86.67% 5 0 100.00% 122 24 80.33%
-src/config.c 112 0 100.00% 11 0 100.00% 154 0 100.00%
-src/cred.c 653 36 94.49% 70 2 97.14% 853 39 95.43%
-src/credman.c 422 10 97.63% 40 0 100.00% 557 20 96.41%
-src/dev.c 332 65 80.42% 41 6 85.37% 378 80 78.84%
-src/ecdh.c 117 2 98.29% 4 0 100.00% 146 5 96.58%
-src/eddsa.c 88 5 94.32% 10 0 100.00% 114 9 92.11%
+src/aes256.c 150 5 96.67% 8 0 100.00% 161 17 89.44%
+src/assert.c 738 45 93.90% 63 4 93.65% 779 51 93.45%
+src/authkey.c 58 0 100.00% 5 0 100.00% 66 0 100.00%
+src/bio.c 557 23 95.87% 50 2 96.00% 586 24 95.90%
+src/blob.c 75 2 97.33% 10 0 100.00% 81 4 95.06%
+src/buf.c 8 0 100.00% 2 0 100.00% 16 0 100.00%
+src/cbor.c 1402 16 98.86% 58 0 100.00% 1328 34 97.44%
+src/compress.c 140 14 90.00% 5 0 100.00% 122 24 80.33%
+src/config.c 137 0 100.00% 11 0 100.00% 154 0 100.00%
+src/cred.c 860 37 95.70% 77 2 97.40% 928 42 95.47%
+src/credman.c 496 10 97.98% 41 0 100.00% 557 20 96.41%
+src/dev.c 394 80 79.70% 41 6 85.37% 382 80 79.06%
+src/ecdh.c 169 2 98.82% 4 0 100.00% 146 5 96.58%
+src/eddsa.c 125 5 96.00% 10 0 100.00% 113 9 92.04%
src/err.c 122 10 91.80% 1 0 100.00% 126 10 92.06%
-src/es256.c 315 5 98.41% 19 0 100.00% 372 11 97.04%
-src/es384.c 158 5 96.84% 11 0 100.00% 198 11 94.44%
-src/hid.c 87 2 97.70% 14 0 100.00% 145 3 97.93%
-src/hid_linux.c 184 73 60.33% 14 7 50.00% 263 115 56.27%
-src/hid_unix.c 29 21 27.59% 2 0 100.00% 43 26 39.53%
-src/info.c 232 0 100.00% 51 0 100.00% 409 0 100.00%
-src/io.c 193 7 96.37% 13 0 100.00% 230 12 94.78%
-src/iso7816.c 18 1 94.44% 5 0 100.00% 38 1 97.37%
-src/largeblob.c 525 18 96.57% 30 0 100.00% 693 43 93.80%
-src/log.c 39 5 87.18% 7 1 85.71% 63 7 88.89%
-src/netlink.c 329 8 97.57% 40 0 100.00% 498 15 96.99%
-src/nfc.c 155 5 96.77% 12 0 100.00% 244 15 93.85%
-src/nfc_linux.c 172 77 55.23% 13 7 46.15% 242 126 47.93%
-src/pcsc.c 204 1 99.51% 13 0 100.00% 282 3 98.94%
-src/pin.c 426 3 99.30% 26 0 100.00% 514 4 99.22%
+src/es256.c 478 4 99.16% 19 0 100.00% 370 8 97.84%
+src/es384.c 236 5 97.88% 11 0 100.00% 197 11 94.42%
+src/hid.c 106 2 98.11% 14 0 100.00% 144 3 97.92%
+src/hid_linux.c 283 96 66.08% 14 7 50.00% 277 115 58.48%
+src/hid_unix.c 46 33 28.26% 2 0 100.00% 43 26 39.53%
+src/info.c 290 0 100.00% 51 0 100.00% 408 0 100.00%
+src/io.c 206 7 96.60% 13 0 100.00% 230 12 94.78%
+src/iso7816.c 27 1 96.30% 5 0 100.00% 36 1 97.22%
+src/largeblob.c 633 22 96.52% 30 0 100.00% 692 43 93.79%
+src/log.c 52 6 88.46% 7 1 85.71% 60 6 90.00%
+src/netlink.c 428 10 97.66% 40 0 100.00% 497 15 96.98%
+src/nfc.c 176 3 98.30% 12 0 100.00% 245 9 96.33%
+src/nfc_linux.c 245 93 62.04% 13 6 53.85% 240 114 52.50%
+src/pcsc.c 229 1 99.56% 13 0 100.00% 282 3 98.94%
+src/pin.c 527 4 99.24% 26 0 100.00% 515 3 99.42%
src/random.c 6 0 100.00% 1 0 100.00% 6 0 100.00%
src/reset.c 24 0 100.00% 3 0 100.00% 23 0 100.00%
-src/rs1.c 22 2 90.91% 3 0 100.00% 36 6 83.33%
-src/rs256.c 146 9 93.84% 13 0 100.00% 179 16 91.06%
-src/time.c 43 3 93.02% 3 0 100.00% 43 2 95.35%
-src/touch.c 67 0 100.00% 2 0 100.00% 79 0 100.00%
-src/tpm.c 103 0 100.00% 9 0 100.00% 194 0 100.00%
-src/types.c 29 0 100.00% 7 0 100.00% 56 0 100.00%
-src/u2f.c 572 4 99.30% 17 0 100.00% 726 12 98.35%
-src/util.c 14 1 92.86% 1 0 100.00% 14 1 92.86%
+src/rs1.c 31 1 96.77% 2 0 100.00% 35 3 91.43%
+src/rs256.c 212 8 96.23% 12 0 100.00% 177 13 92.66%
+src/time.c 50 3 94.00% 3 0 100.00% 43 2 95.35%
+src/touch.c 82 0 100.00% 2 0 100.00% 79 0 100.00%
+src/tpm.c 144 0 100.00% 9 0 100.00% 191 0 100.00%
+src/types.c 39 0 100.00% 7 0 100.00% 50 0 100.00%
+src/u2f.c 669 4 99.40% 17 0 100.00% 727 12 98.35%
+src/util.c 21 1 95.24% 1 0 100.00% 14 1 92.86%
Files which contain no functions:
fuzz/mutator_aux.h 0 0 - 0 0 - 0 0 -
@@ -60,5 +60,5 @@ src/fallthrough.h 0 0 -
src/fido.h 0 0 - 0 0 - 0 0 -
src/fido/err.h 0 0 - 0 0 - 0 0 -
src/fido/param.h 0 0 - 0 0 - 0 0 -
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-TOTAL 8730 486 94.43% 742 29 96.09% 11357 769 93.23%
+--------------------------------------------------------------------------------------------------------------------------------------------------------
+TOTAL 11065 575 94.80% 752 28 96.28% 11491 733 93.62%