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/varnish-modules-0.16.0/src/vmod_xkey.c Examining data/varnish-modules-0.16.0/src/vmod_header.c Examining data/varnish-modules-0.16.0/src/vmod_softpurge.c Examining data/varnish-modules-0.16.0/src/foreign/hash/hash_slinger.h Examining data/varnish-modules-0.16.0/src/vmod_var.c Examining data/varnish-modules-0.16.0/src/vmod_config.h Examining data/varnish-modules-0.16.0/src/vmod_vsthrottle.c Examining data/varnish-modules-0.16.0/src/vmod_tcp.c Examining data/varnish-modules-0.16.0/src/vmod_bodyaccess.c Examining data/varnish-modules-0.16.0/src/vmod_saintmode.c FINAL RESULTS: data/varnish-modules-0.16.0/src/vmod_bodyaccess.c:80: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, ctx->pfx, prefix_len); data/varnish-modules-0.16.0/src/vmod_bodyaccess.c:81: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 + prefix_len, str, size); data/varnish-modules-0.16.0/src/vmod_header.c:158: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(&hp->hd[v], &hp->hd[u], sizeof *hp->hd); data/varnish-modules-0.16.0/src/vmod_header.c:159: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(&hp->hdf[v], &hp->hdf[u], sizeof *hp->hdf); data/varnish-modules-0.16.0/src/vmod_saintmode.c:138: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(tp->digest, ctx->bo->digest, sizeof tp->digest); data/varnish-modules-0.16.0/src/vmod_tcp.c:118: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 strategy[TCP_CA_NAME_MAX + 1]; data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:55: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 digest[SHA256_LEN]; data/varnish-modules-0.16.0/src/vmod_vsthrottle.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(tb->digest, digest, sizeof tb->digest); data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:121: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(&k.digest, digest, sizeof k.digest); data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:167: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 digest[SHA256_LEN]; data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:216: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 digest[SHA256_LEN]; data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:259: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 digest[SHA256_LEN]; data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:286: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 digest[SHA256_LEN]; data/varnish-modules-0.16.0/src/vmod_xkey.c:57: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 digest[DIGEST_LEN]; data/varnish-modules-0.16.0/src/vmod_xkey.c:264: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(&key.digest, digest, len); data/varnish-modules-0.16.0/src/vmod_xkey.c:280: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(&head->key.digest, digest, len); data/varnish-modules-0.16.0/src/vmod_xkey.c:445: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 digest[DIGEST_LEN]; data/varnish-modules-0.16.0/src/vmod_xkey.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 digest[DIGEST_LEN]; data/varnish-modules-0.16.0/src/vmod_bodyaccess.c:68: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). prefix_len = strlen(ctx->pfx); data/varnish-modules-0.16.0/src/vmod_header.c:79: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). assert(l == strlen(hdr + 1)); data/varnish-modules-0.16.0/src/vmod_tcp.c:130:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(strategy, new, TCP_CA_NAME_MAX); data/varnish-modules-0.16.0/src/vmod_tcp.c:132: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). socklen_t l = strlen(strategy); data/varnish-modules-0.16.0/src/vmod_vsthrottle.c:151:26: [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). SHA256_Update(&sctx, s, strlen(s)); ANALYSIS SUMMARY: Hits = 23 Lines analyzed = 2870 in approximately 0.09 seconds (32709 lines/second) Physical Source Lines of Code (SLOC) = 2107 Hits@level = [0] 0 [1] 5 [2] 18 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 23 [1+] 23 [2+] 18 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 10.916 [1+] 10.916 [2+] 8.54295 [3+] 0 [4+] 0 [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.