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/libapache2-mod-authn-yubikey-1.0/libykclient.c Examining data/libapache2-mod-authn-yubikey-1.0/libykclient.h Examining data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c FINAL RESULTS: data/libapache2-mod-authn-yubikey-1.0/libykclient.c:45:5: [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. printf x; \ data/libapache2-mod-authn-yubikey-1.0/libykclient.c:191:7: [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(&(mem->memory[mem->size]), ptr, realsize); data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:208:5: [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 l[MAX_STRING_LEN]; data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:495:5: [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 l[MAX_STRING_LEN]; data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:512:7: [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 buffer[1024]; data/libapache2-mod-authn-yubikey-1.0/libykclient.c:247: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). while (status[strlen (status) - 1] == '\r' data/libapache2-mod-authn-yubikey-1.0/libykclient.c:248:13: [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). || status[strlen (status) - 1] == '\n') data/libapache2-mod-authn-yubikey-1.0/libykclient.c:249: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). status[strlen (status) - 1] = '\0'; data/libapache2-mod-authn-yubikey-1.0/libykclient.c:251:35: [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). D (("parsed status (%d): %s\n", strlen (status), status)); data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:114:16: [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). dt.dsize = strlen(dt.dptr); data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:116:16: [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). dt.dsize = strlen(dt.dptr) + 1; data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:234: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). if (strlen(password) < YUBIKEY_TOKEN_LENGTH) { data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:246:35: [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). passwordLength = (apr_size_t) strlen(password) - YUBIKEY_TOKEN_LENGTH; data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:254: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). if (strlen(password) > YUBIKEY_TOKEN_LENGTH) { data/libapache2-mod-authn-yubikey-1.0/mod_authn_yubikey.c:376:35: [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). passwordLength = (apr_size_t) strlen(password) - YUBIKEY_TOKEN_LENGTH; ANALYSIS SUMMARY: Hits = 15 Lines analyzed = 1073 in approximately 0.05 seconds (19621 lines/second) Physical Source Lines of Code (SLOC) = 701 Hits@level = [0] 1 [1] 10 [2] 4 [3] 0 [4] 1 [5] 0 Hits@level+ = [0+] 16 [1+] 15 [2+] 5 [3+] 1 [4+] 1 [5+] 0 Hits/KSLOC@level+ = [0+] 22.8245 [1+] 21.398 [2+] 7.13267 [3+] 1.42653 [4+] 1.42653 [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.