Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/libfido2-1.5.0/examples/assert.c Examining data/libfido2-1.5.0/examples/cred.c Examining data/libfido2-1.5.0/examples/extern.h Examining data/libfido2-1.5.0/examples/info.c Examining data/libfido2-1.5.0/examples/manifest.c Examining data/libfido2-1.5.0/examples/reset.c Examining data/libfido2-1.5.0/examples/retries.c Examining data/libfido2-1.5.0/examples/select.c Examining data/libfido2-1.5.0/examples/setpin.c Examining data/libfido2-1.5.0/examples/util.c Examining data/libfido2-1.5.0/fuzz/dummy.h Examining data/libfido2-1.5.0/fuzz/fuzz_assert.c Examining data/libfido2-1.5.0/fuzz/fuzz_bio.c Examining data/libfido2-1.5.0/fuzz/fuzz_cred.c Examining data/libfido2-1.5.0/fuzz/fuzz_credman.c Examining data/libfido2-1.5.0/fuzz/fuzz_mgmt.c Examining data/libfido2-1.5.0/fuzz/libfuzzer.c Examining data/libfido2-1.5.0/fuzz/mutator_aux.c Examining data/libfido2-1.5.0/fuzz/mutator_aux.h Examining data/libfido2-1.5.0/fuzz/preload-fuzz.c Examining data/libfido2-1.5.0/fuzz/preload-snoop.c Examining data/libfido2-1.5.0/fuzz/prng.c Examining data/libfido2-1.5.0/fuzz/uniform_random.c Examining data/libfido2-1.5.0/fuzz/wiredata_fido2.h Examining data/libfido2-1.5.0/fuzz/wiredata_u2f.h Examining data/libfido2-1.5.0/fuzz/wrap.c Examining data/libfido2-1.5.0/openbsd-compat/bsd-getline.c Examining data/libfido2-1.5.0/openbsd-compat/bsd-getpagesize.c Examining data/libfido2-1.5.0/openbsd-compat/clock_gettime.c Examining data/libfido2-1.5.0/openbsd-compat/err.h Examining data/libfido2-1.5.0/openbsd-compat/explicit_bzero.c Examining data/libfido2-1.5.0/openbsd-compat/explicit_bzero_win32.c Examining data/libfido2-1.5.0/openbsd-compat/getopt.h Examining data/libfido2-1.5.0/openbsd-compat/getopt_long.c Examining data/libfido2-1.5.0/openbsd-compat/openbsd-compat.h Examining data/libfido2-1.5.0/openbsd-compat/posix_win.c Examining data/libfido2-1.5.0/openbsd-compat/posix_win.h Examining data/libfido2-1.5.0/openbsd-compat/readpassphrase.c Examining data/libfido2-1.5.0/openbsd-compat/readpassphrase.h Examining data/libfido2-1.5.0/openbsd-compat/readpassphrase_win32.c Examining data/libfido2-1.5.0/openbsd-compat/recallocarray.c Examining data/libfido2-1.5.0/openbsd-compat/strlcat.c Examining data/libfido2-1.5.0/openbsd-compat/strlcpy.c Examining data/libfido2-1.5.0/openbsd-compat/time.h Examining data/libfido2-1.5.0/openbsd-compat/timingsafe_bcmp.c Examining data/libfido2-1.5.0/openbsd-compat/types.h Examining data/libfido2-1.5.0/regress/assert.c Examining data/libfido2-1.5.0/regress/cred.c Examining data/libfido2-1.5.0/regress/dev.c Examining data/libfido2-1.5.0/src/aes256.c Examining data/libfido2-1.5.0/src/assert.c Examining data/libfido2-1.5.0/src/authkey.c Examining data/libfido2-1.5.0/src/bio.c Examining data/libfido2-1.5.0/src/blob.c Examining data/libfido2-1.5.0/src/blob.h Examining data/libfido2-1.5.0/src/buf.c Examining data/libfido2-1.5.0/src/cbor.c Examining data/libfido2-1.5.0/src/cred.c Examining data/libfido2-1.5.0/src/credman.c Examining data/libfido2-1.5.0/src/dev.c Examining data/libfido2-1.5.0/src/ecdh.c Examining data/libfido2-1.5.0/src/eddsa.c Examining data/libfido2-1.5.0/src/err.c Examining data/libfido2-1.5.0/src/es256.c Examining data/libfido2-1.5.0/src/extern.h Examining data/libfido2-1.5.0/src/fido.h Examining data/libfido2-1.5.0/src/fido/bio.h Examining data/libfido2-1.5.0/src/fido/credman.h Examining data/libfido2-1.5.0/src/fido/eddsa.h Examining data/libfido2-1.5.0/src/fido/err.h Examining data/libfido2-1.5.0/src/fido/es256.h Examining data/libfido2-1.5.0/src/fido/param.h Examining data/libfido2-1.5.0/src/fido/rs256.h Examining data/libfido2-1.5.0/src/fido/types.h Examining data/libfido2-1.5.0/src/hid.c Examining data/libfido2-1.5.0/src/hid_hidapi.c Examining data/libfido2-1.5.0/src/hid_openbsd.c Examining data/libfido2-1.5.0/src/hid_osx.c Examining data/libfido2-1.5.0/src/hid_win.c Examining data/libfido2-1.5.0/src/info.c Examining data/libfido2-1.5.0/src/io.c Examining data/libfido2-1.5.0/src/iso7816.c Examining data/libfido2-1.5.0/src/iso7816.h Examining data/libfido2-1.5.0/src/log.c Examining data/libfido2-1.5.0/src/packed.h Examining data/libfido2-1.5.0/src/pin.c Examining data/libfido2-1.5.0/src/reset.c Examining data/libfido2-1.5.0/src/rs256.c Examining data/libfido2-1.5.0/src/u2f.c Examining data/libfido2-1.5.0/src/hid_linux.c Examining data/libfido2-1.5.0/tools/assert_get.c Examining data/libfido2-1.5.0/tools/assert_verify.c Examining data/libfido2-1.5.0/tools/base64.c Examining data/libfido2-1.5.0/tools/bio.c Examining data/libfido2-1.5.0/tools/cred_make.c Examining data/libfido2-1.5.0/tools/cred_verify.c Examining data/libfido2-1.5.0/tools/credman.c Examining data/libfido2-1.5.0/tools/extern.h Examining data/libfido2-1.5.0/tools/fido2-assert.c Examining data/libfido2-1.5.0/tools/fido2-cred.c Examining data/libfido2-1.5.0/tools/fido2-token.c Examining data/libfido2-1.5.0/tools/pin.c Examining data/libfido2-1.5.0/tools/token.c Examining data/libfido2-1.5.0/tools/util.c FINAL RESULTS: data/libfido2-1.5.0/openbsd-compat/err.h:30:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/libfido2-1.5.0/openbsd-compat/err.h:50:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/libfido2-1.5.0/openbsd-compat/err.h:64:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/libfido2-1.5.0/openbsd-compat/err.h:78:3: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/libfido2-1.5.0/openbsd-compat/readpassphrase.c:201:1: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. getpass(const char *prompt) data/libfido2-1.5.0/src/extern.h:108:32: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((__format__ (printf, 1, 2))); data/libfido2-1.5.0/src/log.c:51:6: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. r = vsnprintf(line, sizeof(line) - 1, fmt, ap); data/libfido2-1.5.0/examples/assert.c:179:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "P:T:a:h:ps:t:uv")) != -1) { data/libfido2-1.5.0/examples/cred.c:183:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "P:T:e:hi:k:rt:uv")) != -1) { data/libfido2-1.5.0/openbsd-compat/getopt.h:57:6: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt_long(int, char * const *, const char *, data/libfido2-1.5.0/openbsd-compat/getopt.h:63:6: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. int getopt(int, char * const *, const char *); data/libfido2-1.5.0/openbsd-compat/getopt_long.c:307:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); data/libfido2-1.5.0/openbsd-compat/getopt_long.c:481:1: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt(int nargc, char * const *nargv, const char *options) data/libfido2-1.5.0/openbsd-compat/getopt_long.c:501:1: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. getopt_long(int nargc, char * const *nargv, const char *options, data/libfido2-1.5.0/src/dev.c:525:28: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (flags & FIDO_DEBUG || getenv("FIDO_DEBUG") != NULL) data/libfido2-1.5.0/src/pin.c:203:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("FIDO_UVTOKEN") != NULL) { data/libfido2-1.5.0/tools/assert_get.c:210:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "dhi:o:prt:uv")) != -1) { data/libfido2-1.5.0/tools/assert_verify.c:148:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "dhi:pv")) != -1) { data/libfido2-1.5.0/tools/cred_make.c:137:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "c:dhi:o:qruv")) != -1) { data/libfido2-1.5.0/tools/cred_verify.c:116:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "c:dhi:o:v")) != -1) { data/libfido2-1.5.0/tools/fido2-token.c:47:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, TOKEN_OPT)) != -1) { data/libfido2-1.5.0/tools/token.c:160:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, TOKEN_OPT)) != -1) { data/libfido2-1.5.0/tools/token.c:274:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, TOKEN_OPT)) != -1) { data/libfido2-1.5.0/tools/token.c:315:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, TOKEN_OPT)) != -1) { data/libfido2-1.5.0/tools/token.c:369:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, TOKEN_OPT)) != -1) { data/libfido2-1.5.0/examples/assert.c:24:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char cdh[32] = { data/libfido2-1.5.0/examples/cred.c:23:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char cdh[32] = { data/libfido2-1.5.0/examples/cred.c:30:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char user_id[32] = { data/libfido2-1.5.0/examples/info.c:59:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flags_txt[128]; data/libfido2-1.5.0/examples/util.c:84:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_WRONLY | O_CREAT, 0644)) < 0) { data/libfido2-1.5.0/examples/util.c:117:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_RDONLY)) < 0) { data/libfido2-1.5.0/examples/util.c:164:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/examples/util.c:208:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_WRONLY | O_CREAT, 0644)) < 0) { data/libfido2-1.5.0/examples/util.c:253:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/examples/util.c:297:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_WRONLY | O_CREAT, 0644)) < 0) { data/libfido2-1.5.0/examples/util.c:341:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/examples/util.c:378:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_WRONLY | O_CREAT, 0644)) < 0) { data/libfido2-1.5.0/fuzz/fuzz_assert.c:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_assert.c:29:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_id[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_assert.c:154:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor, cbor_len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:190:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.cred.body, &dummy_cdh, dummy.cred.len); /* XXX */ data/libfido2-1.5.0/fuzz/fuzz_assert.c:191:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.cdh.body, &dummy_cdh, dummy.cdh.len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:192:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.wire_data.body, &dummy_wire_data_fido, data/libfido2-1.5.0/fuzz/fuzz_assert.c:194:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.es256.body, &dummy_es256, dummy.es256.len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:195:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.rs256.body, &dummy_rs256, dummy.rs256.len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:196:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.eddsa.body, &dummy_eddsa, dummy.eddsa.len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:201:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:205:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, blob_len); data/libfido2-1.5.0/fuzz/fuzz_assert.c:475:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->wire_data.body, &dummy_wire_data_u2f, data/libfido2-1.5.0/fuzz/fuzz_assert.c:479:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->wire_data.body, &dummy_wire_data_fido, data/libfido2-1.5.0/fuzz/fuzz_bio.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_bio.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_bio.c:165:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor, cbor_len); data/libfido2-1.5.0/fuzz/fuzz_bio.c:198:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.info_wire_data.body, &dummy_info_wire_data, data/libfido2-1.5.0/fuzz/fuzz_bio.c:200:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.enroll_wire_data.body, &dummy_enroll_wire_data, data/libfido2-1.5.0/fuzz/fuzz_bio.c:202:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.list_wire_data.body, &dummy_list_wire_data, data/libfido2-1.5.0/fuzz/fuzz_bio.c:204:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.set_name_wire_data.body, &dummy_set_name_wire_data, data/libfido2-1.5.0/fuzz/fuzz_bio.c:206:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.remove_wire_data.body, &dummy_remove_wire_data, data/libfido2-1.5.0/fuzz/fuzz_bio.c:208:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.id.body, &dummy_id, dummy.id.len); data/libfido2-1.5.0/fuzz/fuzz_bio.c:213:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, len); data/libfido2-1.5.0/fuzz/fuzz_bio.c:217:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, blob_len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:23:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_id[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_name[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:26:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user_icon[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:27:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user_name[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char user_nick[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_cred.c:159:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor, cbor_len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:196:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.cdh.body, &dummy_cdh, dummy.cdh.len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:197:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.user_id.body, &dummy_user_id, dummy.user_id.len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:198:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.wire_data.body, &dummy_wire_data_fido, data/libfido2-1.5.0/fuzz/fuzz_cred.c:204:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:208:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, blob_len); data/libfido2-1.5.0/fuzz/fuzz_cred.c:442:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->wire_data.body, &dummy_wire_data_u2f, data/libfido2-1.5.0/fuzz/fuzz_cred.c:446:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&p->wire_data.body, &dummy_wire_data_fido, data/libfido2-1.5.0/fuzz/fuzz_credman.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_credman.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char rp_id[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_credman.c:152:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor, cbor_len); data/libfido2-1.5.0/fuzz/fuzz_credman.c:184:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.meta_wire_data.body, &dummy_meta_wire_data, data/libfido2-1.5.0/fuzz/fuzz_credman.c:186:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.rp_wire_data.body, &dummy_rp_wire_data, data/libfido2-1.5.0/fuzz/fuzz_credman.c:188:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.rk_wire_data.body, &dummy_rk_wire_data, data/libfido2-1.5.0/fuzz/fuzz_credman.c:190:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.del_wire_data.body, &dummy_del_wire_data, data/libfido2-1.5.0/fuzz/fuzz_credman.c:192:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.cred_id.body, &dummy_cred_id, dummy.cred_id.len); data/libfido2-1.5.0/fuzz/fuzz_credman.c:197:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, len); data/libfido2-1.5.0/fuzz/fuzz_credman.c:201:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, blob_len); data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin1[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:22:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin2[MAXSTR]; data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:136:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor, cbor_len); data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:168:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.reset_wire_data.body, &dummy_reset_wire_data, data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:170:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.info_wire_data.body, &dummy_info_wire_data, data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:172:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.set_pin_wire_data.body, &dummy_set_pin_wire_data, data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:174:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.change_pin_wire_data.body, &dummy_change_pin_wire_data, data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:176:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dummy.retry_wire_data.body, &dummy_retry_wire_data, data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:182:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, len); data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:186:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, blob, blob_len); data/libfido2-1.5.0/fuzz/libfuzzer.c:44:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_CREAT|O_TRUNC|O_WRONLY, 0644)) == -1) { data/libfido2-1.5.0/fuzz/libfuzzer.c:171:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(data, blob, blob_len); data/libfido2-1.5.0/fuzz/mutator_aux.c:76:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(v, cbor_bytestring_handle(item), len); data/libfido2-1.5.0/fuzz/mutator_aux.c:101:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(v->body, cbor_bytestring_handle(item), v->len); data/libfido2-1.5.0/fuzz/mutator_aux.c:193:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, wire_data_ptr, n); data/libfido2-1.5.0/fuzz/preload-fuzz.c:34:1: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *path, int flags, ...) data/libfido2-1.5.0/fuzz/preload-snoop.c:44:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/libfido2-1.5.0/fuzz/preload-snoop.c:76:1: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). open(const char *path, int flags, ...) data/libfido2-1.5.0/openbsd-compat/getopt_long.c:154:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char **) nargv)[pos] = nargv[cstart]; data/libfido2-1.5.0/openbsd-compat/getopt_long.c:156:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. ((char **)nargv)[cstart] = swap; data/libfido2-1.5.0/openbsd-compat/posix_win.c:32:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return (open(path, flags, mode)); data/libfido2-1.5.0/openbsd-compat/posix_win.h:39:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). #define open(path, ...) posix_open(path, __VA_ARGS__) data/libfido2-1.5.0/openbsd-compat/readpassphrase.c:84:24: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). (input = output = open(_PATH_TTY, O_RDWR)) == -1) { data/libfido2-1.5.0/openbsd-compat/readpassphrase.c:203:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[_PASSWORD_LEN + 1]; data/libfido2-1.5.0/openbsd-compat/readpassphrase_win32.c:59:16: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). if ((needed = MultiByteToWideChar(CP_UTF8, 0, utf8, -1, NULL, 0)) == 0 || data/libfido2-1.5.0/openbsd-compat/readpassphrase_win32.c:61:6: [2] (buffer) MultiByteToWideChar: Requires maximum length in CHARACTERS, not bytes (CWE-120). MultiByteToWideChar(CP_UTF8, 0, utf8, -1, utf16, needed) == 0) { data/libfido2-1.5.0/openbsd-compat/recallocarray.c:79:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newptr, ptr, oldsize); data/libfido2-1.5.0/openbsd-compat/recallocarray.c:82:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(newptr, ptr, newsize); data/libfido2-1.5.0/regress/assert.c:15:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char es256_pk[64] = { data/libfido2-1.5.0/regress/assert.c:26:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char cdh[32] = { data/libfido2-1.5.0/regress/assert.c:33:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char authdata[39] = { data/libfido2-1.5.0/regress/assert.c:41:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char sig[72] = { data/libfido2-1.5.0/regress/assert.c:361:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, cdh, sizeof(cdh)); data/libfido2-1.5.0/regress/assert.c:412:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, authdata, sizeof(authdata)); data/libfido2-1.5.0/regress/assert.c:432:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, sig, sizeof(sig)); data/libfido2-1.5.0/regress/cred.c:13:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char cdh[32] = { data/libfido2-1.5.0/regress/cred.c:20:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char authdata[198] = { data/libfido2-1.5.0/regress/cred.c:48:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char authdata_dupkeys[200] = { data/libfido2-1.5.0/regress/cred.c:76:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char authdata_unsorted_keys[198] = { data/libfido2-1.5.0/regress/cred.c:104:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const unsigned char x509[742] = { data/libfido2-1.5.0/regress/cred.c:200:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char sig[70] = { data/libfido2-1.5.0/regress/cred.c:212:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char pubkey[64] = { data/libfido2-1.5.0/regress/cred.c:223:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char id[64] = { data/libfido2-1.5.0/regress/cred.c:239:16: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. const unsigned char aaguid[16] = { data/libfido2-1.5.0/regress/cred.c:605:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, cdh, sizeof(cdh)); data/libfido2-1.5.0/regress/cred.c:688:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, authdata, sizeof(authdata)); data/libfido2-1.5.0/regress/cred.c:727:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, sig, sizeof(sig)); data/libfido2-1.5.0/regress/cred.c:759:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(junk, x509, sizeof(x509)); data/libfido2-1.5.0/src/aes256.c:16:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[32]; data/libfido2-1.5.0/src/aes256.c:60:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[32]; data/libfido2-1.5.0/src/assert.c:173:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/assert.c:227:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/assert.c:401:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dgst->ptr, authdata_ptr, authdata_len); data/libfido2-1.5.0/src/assert.c:402:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dgst->ptr + authdata_len, clientdata->ptr, data/libfido2-1.5.0/src/assert.c:536:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1024]; /* XXX */ data/libfido2-1.5.0/src/assert.c:1059:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sig, ptr, len); data/libfido2-1.5.0/src/authkey.c:64:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/bio.c:50:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(hmac_data->ptr, prefix, sizeof(prefix)); data/libfido2-1.5.0/src/bio.c:51:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(hmac_data->ptr + sizeof(prefix), cbor, cbor_len); data/libfido2-1.5.0/src/bio.c:238:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/bio.c:385:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/bio.c:485:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/bio.c:646:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/blob.c:38:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b->ptr, ptr, len); data/libfido2-1.5.0/src/buf.c:16:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, *buf, count); data/libfido2-1.5.0/src/buf.c:29:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*buf, src, count); data/libfido2-1.5.0/src/cbor.c:197:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*buf, cbor_bytestring_handle(item), *len); data/libfido2-1.5.0/src/cbor.c:222:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*str, cbor_string_handle(item), len); data/libfido2-1.5.0/src/cbor.c:423:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(f->ptr + 1, cbor, f->len - 1); data/libfido2-1.5.0/src/cbor.c:635:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dgst[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/cbor.c:689:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dgst[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/cbor.c:769:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char dgst[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/cred.c:129:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/cred.c:191:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char expected_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/cred.c:277:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/cred.c:351:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1024]; /* XXX */ data/libfido2-1.5.0/src/cred.c:615:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(x509, ptr, len); data/libfido2-1.5.0/src/cred.c:634:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(sig, ptr, len); data/libfido2-1.5.0/src/cred.c:736:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(up->id.ptr, user_id, user_id_len); data/libfido2-1.5.0/src/credman.c:184:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/credman.c:309:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/credman.c:348:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/credman.c:523:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/credman.c:562:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/dev.c:70:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(FIDO_RANDOM_DEV, O_RDONLY)) < 0) data/libfido2-1.5.0/src/dev.c:170:32: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((dev->io_handle = dev->io.open(path)) == NULL) { data/libfido2-1.5.0/src/dev.c:396:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char cdh[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/eddsa.c:86:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(xy, cbor_bytestring_handle(item), xy_len); data/libfido2-1.5.0/src/eddsa.c:147:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pk, ptr, sizeof(*pk)); data/libfido2-1.5.0/src/es256.c:26:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(xy, cbor_bytestring_handle(item), xy_len); data/libfido2-1.5.0/src/es256.c:185:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pk, ++p, sizeof(*pk)); /* uncompressed format */ data/libfido2-1.5.0/src/es256.c:187:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pk, ptr, sizeof(*pk)); /* libfido2 x||y format */ data/libfido2-1.5.0/src/fido/types.h:27:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fido_dev_io_open_t *open; data/libfido2-1.5.0/src/fido/types.h:52:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char x[32]; data/libfido2-1.5.0/src/fido/types.h:53:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char y[32]; data/libfido2-1.5.0/src/fido/types.h:58:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char d[32]; data/libfido2-1.5.0/src/fido/types.h:63:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char n[256]; data/libfido2-1.5.0/src/fido/types.h:64:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char e[3]; data/libfido2-1.5.0/src/fido/types.h:69:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char x[32]; data/libfido2-1.5.0/src/fido/types.h:74:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rp_id_hash[32]; /* sha256 of fido_rp.id */ data/libfido2-1.5.0/src/fido/types.h:82:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aaguid[16]; /* credential's aaguid */ data/libfido2-1.5.0/src/fido/types.h:88:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aaguid[16]; /* credential's aaguid */ data/libfido2-1.5.0/src/fido/types.h:180:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char aaguid[16]; /* aaguid */ data/libfido2-1.5.0/src/hid_hidapi.c:182:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_RDONLY)) < 0) { data/libfido2-1.5.0/src/hid_linux.c:170:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_RDONLY)) == -1) { data/libfido2-1.5.0/src/hid_linux.c:357:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ctx->fd = open(path, O_RDWR)) < 0) { data/libfido2-1.5.0/src/hid_openbsd.c:32:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[64]; data/libfido2-1.5.0/src/hid_openbsd.c:45:13: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(path, O_RDWR)) == -1) { data/libfido2-1.5.0/src/hid_openbsd.c:157:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). (ret->fd = open(path, O_RDWR)) < 0) { data/libfido2-1.5.0/src/hid_osx.c:28:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char report[CTAP_MAX_REPORT_LEN]; data/libfido2-1.5.0/src/hid_osx.c:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/libfido2-1.5.0/src/hid_osx.c:189:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/libfido2-1.5.0/src/hid_osx.c:370:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char loop_id[32]; data/libfido2-1.5.0/src/hid_win.c:41:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char report[1 + CTAP_MAX_REPORT_LEN]; data/libfido2-1.5.0/src/hid_win.c:127:2: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t buf[512]; data/libfido2-1.5.0/src/hid_win.c:476:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, ctx->report + 1, len); data/libfido2-1.5.0/src/info.c:102:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aaguid, cbor_bytestring_handle(item), aaguid_len); data/libfido2-1.5.0/src/info.c:250:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/io.c:40:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char pkt[sizeof(*fp) + 1]; data/libfido2-1.5.0/src/io.c:60:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char pkt[sizeof(*fp) + 1]; data/libfido2-1.5.0/src/io.c:74:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fp->body.init.data, buf, count); data/libfido2-1.5.0/src/io.c:87:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char pkt[sizeof(*fp) + 1]; data/libfido2-1.5.0/src/io.c:99:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fp->body.cont.data, buf, count); data/libfido2-1.5.0/src/io.c:225:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, f.body.init.data, payload_len); data/libfido2-1.5.0/src/io.c:229:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, f.body.init.data, init_data_len); data/libfido2-1.5.0/src/io.c:254:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + r, f.body.cont.data, cont_data_len); data/libfido2-1.5.0/src/io.c:257:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + r, f.body.cont.data, payload_len - r); data/libfido2-1.5.0/src/io.c:290:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/iso7816.c:52:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(apdu->payload_ptr, buf, cnt); data/libfido2-1.5.0/src/log.c:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[LINELEN]; data/libfido2-1.5.0/src/log.c:63:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char row[XXDROW]; data/libfido2-1.5.0/src/log.c:64:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char xxd[XXDLEN]; data/libfido2-1.5.0/src/pin.c:119:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/pin.c:160:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/pin.c:249:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy((*ppin)->ptr, pin, pin_len); data/libfido2-1.5.0/src/pin.c:457:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/rs256.c:52:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ptr, cbor_bytestring_handle(item), len); data/libfido2-1.5.0/src/rs256.c:115:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pk, ptr, sizeof(*pk)); data/libfido2-1.5.0/src/u2f.c:130:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char challenge[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:131:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char application[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:132:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/u2f.c:183:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char challenge[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:184:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rp_id_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:185:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/u2f.c:289:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rp_id_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:290:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/u2f.c:578:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rp_id_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:579:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/u2f.c:780:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char clientdata_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:781:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rp_id_hash[SHA256_DIGEST_LENGTH]; data/libfido2-1.5.0/src/u2f.c:782:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/src/u2f.c:826:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char reply[FIDO_MAXMSG]; data/libfido2-1.5.0/tools/assert_get.c:198:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/assert_get.c:199:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[1024]; data/libfido2-1.5.0/tools/base64.c:53:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(*out, b64_ptr, (size_t)b64_len); data/libfido2-1.5.0/tools/bio.c:42:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/bio.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/bio.c:159:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/bio.c:207:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/cred_make.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[1024]; data/libfido2-1.5.0/tools/cred_make.c:126:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/credman.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/credman.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/credman.c:130:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/credman.c:160:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/credman.c:204:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin[1024]; data/libfido2-1.5.0/tools/pin.c:23:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[1024]; data/libfido2-1.5.0/tools/pin.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin1[1024]; data/libfido2-1.5.0/tools/pin.c:25:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin2[1024]; data/libfido2-1.5.0/tools/pin.c:81:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[1024]; data/libfido2-1.5.0/tools/pin.c:82:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin0[1024]; data/libfido2-1.5.0/tools/pin.c:83:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin1[1024]; data/libfido2-1.5.0/tools/pin.c:84:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pin2[1024]; data/libfido2-1.5.0/tools/token.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flags_txt[128]; data/libfido2-1.5.0/tools/util.c:37:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prompt[1024]; data/libfido2-1.5.0/tools/util.c:55:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(file, O_WRONLY | O_CREAT, 0600)) < 0) data/libfido2-1.5.0/tools/util.c:75:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fd = open(file, O_RDONLY)) < 0) data/libfido2-1.5.0/tools/util.c:164:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/tools/util.c:234:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/tools/util.c:303:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(path, "r")) == NULL) { data/libfido2-1.5.0/examples/util.c:134:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((n = read(fd, *ptr, *len)) < 0) { data/libfido2-1.5.0/fuzz/fuzz_assert.c:80:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbor.read != len || data/libfido2-1.5.0/fuzz/fuzz_assert.c:255:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(pin) == 0) data/libfido2-1.5.0/fuzz/fuzz_bio.c:103:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbor.read != len || data/libfido2-1.5.0/fuzz/fuzz_cred.c:81:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbor.read != len || data/libfido2-1.5.0/fuzz/fuzz_cred.c:263:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(pin) == 0) data/libfido2-1.5.0/fuzz/fuzz_credman.c:92:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbor.read != len || data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:76:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). cbor.read != len || data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:260:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). consume(sa[i], strlen(sa[i])); data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:265:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). consume(sa[i], strlen(sa[i])); data/libfido2-1.5.0/fuzz/fuzz_mgmt.c:271:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). consume(sa[i], strlen(sa[i])); data/libfido2-1.5.0/fuzz/libfuzzer.c:39:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((path = strchr(opt, '=')) == NULL || strlen(++path) == 0) { data/libfido2-1.5.0/fuzz/libfuzzer.c:81:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((f = strchr(opt, '=')) == NULL || strlen(++f) == 0) data/libfido2-1.5.0/fuzz/mutator_aux.c:29:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(s); data/libfido2-1.5.0/fuzz/mutator_aux.c:49:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). consume(str, strlen(str)); data/libfido2-1.5.0/fuzz/mutator_aux.c:118:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(v) >= MAXSTR) data/libfido2-1.5.0/fuzz/mutator_aux.c:121:57: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return cbor_build_bytestring((const unsigned char *)v, strlen(v)); data/libfido2-1.5.0/fuzz/mutator_aux.c:160:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). n = LLVMFuzzerMutate((uint8_t *)s, strlen(s), MAXSTR - 1); data/libfido2-1.5.0/fuzz/preload-fuzz.c:52:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(path, FUZZ_DEV_PREFIX, strlen(FUZZ_DEV_PREFIX)) != 0) data/libfido2-1.5.0/fuzz/preload-snoop.c:53:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (size_t i = 0; i < strlen(s); i++) data/libfido2-1.5.0/fuzz/preload-snoop.c:94:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(path, SNOOP_DEV_PREFIX, strlen(SNOOP_DEV_PREFIX)) != 0) data/libfido2-1.5.0/fuzz/preload-snoop.c:163:1: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). read(int fd, void *buf, size_t nbytes) data/libfido2-1.5.0/fuzz/wrap.c:544:2: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep, data/libfido2-1.5.0/openbsd-compat/bsd-getline.c:64:11: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int c = fgetc(fp); data/libfido2-1.5.0/openbsd-compat/getopt_long.c:184:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). current_argv_len = strlen(current_argv); data/libfido2-1.5.0/openbsd-compat/getopt_long.c:192:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(long_options[i].name) == current_argv_len) { data/libfido2-1.5.0/openbsd-compat/posix_win.c:49:10: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return (read(fd, buf, (unsigned int)count)); data/libfido2-1.5.0/openbsd-compat/posix_win.h:41:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). #define read(fd, buf, count) posix_read(fd, buf, count) data/libfido2-1.5.0/openbsd-compat/readpassphrase.c:133:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (void)write(output, prompt, strlen(prompt)); data/libfido2-1.5.0/openbsd-compat/readpassphrase.c:136:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((nr = read(input, &ch, 1)) == 1 && ch != '\n' && ch != '\r') { data/libfido2-1.5.0/openbsd-compat/strlcat.c:50:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return(dlen + strlen(s)); data/libfido2-1.5.0/src/cbor.c:1103:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *buf += cbor.read; data/libfido2-1.5.0/src/cbor.c:1104:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *len -= cbor.read; data/libfido2-1.5.0/src/cbor.c:1180:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *buf += cbor.read; data/libfido2-1.5.0/src/cbor.c:1181:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *len -= cbor.read; data/libfido2-1.5.0/src/cbor.c:1235:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *buf += cbor.read; data/libfido2-1.5.0/src/cbor.c:1236:15: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). *len -= cbor.read; data/libfido2-1.5.0/src/cred.c:195:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const unsigned char *)id, strlen(id), data/libfido2-1.5.0/src/credman.c:382:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const unsigned char *)rp_id, strlen(rp_id), dgst) != dgst) { data/libfido2-1.5.0/src/dev.c:72:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(fd, nonce, sizeof(*nonce))) < 0 || data/libfido2-1.5.0/src/dev.c:410:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)clientdata, strlen(clientdata), cdh) != cdh) { data/libfido2-1.5.0/src/fido/types.h:29:23: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). fido_dev_io_read_t *read; data/libfido2-1.5.0/src/hid_linux.c:463:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(ctx->fd, buf, len)) < 0 || (size_t)r != len) { data/libfido2-1.5.0/src/hid_openbsd.c:200:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(ctx->fd, buf, len)) == -1 || (size_t)r != len) { data/libfido2-1.5.0/src/hid_osx.c:515:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((r = read(ctx->report_pipe[0], buf, len)) < 0 || (size_t)r != len) { data/libfido2-1.5.0/src/io.c:156:44: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (d->rx_len > sizeof(*fp) || (n = d->io.read(d->io_handle, data/libfido2-1.5.0/src/pin.c:48:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (const unsigned char *)pin, strlen(pin)) < 0) { data/libfido2-1.5.0/src/pin.c:234:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pin_len = strlen(pin); data/libfido2-1.5.0/src/pin.c:270:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (const unsigned char *)oldpin, strlen(oldpin)) < 0) { data/libfido2-1.5.0/src/u2f.c:20:1: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(unsigned int usec) data/libfido2-1.5.0/src/u2f.c:97:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)rp_id, strlen(rp_id), data/libfido2-1.5.0/src/u2f.c:164:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usleep((unsigned)(ms == -1 ? 100 : ms) * 1000) < 0) { data/libfido2-1.5.0/src/u2f.c:199:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)rp_id, strlen(rp_id), data/libfido2-1.5.0/src/u2f.c:307:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)rp_id, strlen(rp_id), data/libfido2-1.5.0/src/u2f.c:340:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usleep((unsigned)(ms == -1 ? 100 : ms) * 1000) < 0) { data/libfido2-1.5.0/src/u2f.c:431:34: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)rp_id, strlen(rp_id), data/libfido2-1.5.0/src/u2f.c:619:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)cred->rp.id, strlen(cred->rp.id), data/libfido2-1.5.0/src/u2f.c:647:7: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usleep((unsigned)(ms == -1 ? 100 : ms) * 1000) < 0) { data/libfido2-1.5.0/src/u2f.c:788:39: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (SHA256((const void *)clientdata, strlen(clientdata), data/libfido2-1.5.0/src/u2f.c:790:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(rp_id), rp_id_hash) != rp_id_hash) { data/libfido2-1.5.0/tools/assert_get.c:182:31: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). explicit_bzero(hmac_secret, strlen(hmac_secret)); data/libfido2-1.5.0/tools/base64.c:72:50: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (in == NULL || ptr == NULL || len == NULL || strlen(in) > INT_MAX) data/libfido2-1.5.0/tools/base64.c:86:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). alloc_len = strlen(in); data/libfido2-1.5.0/tools/base64.c:121:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (size_t)n != strlen(line)) { data/libfido2-1.5.0/tools/fido2-assert.c:41:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (argc < 2 || strlen(argv[1]) != 2 || argv[1][0] != '-') data/libfido2-1.5.0/tools/fido2-cred.c:39:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (argc < 2 || strlen(argv[1]) != 2 || argv[1][0] != '-') data/libfido2-1.5.0/tools/util.c:130:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (size_t)n != strlen(line)) { ANALYSIS SUMMARY: Hits = 332 Lines analyzed = 25553 in approximately 0.73 seconds (35058 lines/second) Physical Source Lines of Code (SLOC) = 19976 Hits@level = [0] 138 [1] 67 [2] 240 [3] 18 [4] 7 [5] 0 Hits@level+ = [0+] 470 [1+] 332 [2+] 265 [3+] 25 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 23.5282 [1+] 16.6199 [2+] 13.2659 [3+] 1.2515 [4+] 0.350421 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.