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/sympa-6.2.58~dfsg/src/libexec/familyqueue.c Examining data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c Examining data/sympa-6.2.58~dfsg/src/libexec/queue.c Examining data/sympa-6.2.58~dfsg/src/libexec/sympa_newaliases-wrapper.c Examining data/sympa-6.2.58~dfsg/src/cgi/sympa_soap_server-wrapper.fcgi.c Examining data/sympa-6.2.58~dfsg/src/cgi/wwsympa-wrapper.fcgi.c FINAL RESULTS: data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:79:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, r); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:104:6: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(listname, argv[1]); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:79:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, r); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:106:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(listname, argv[1]); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:110:7: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(familyname, argv[2]); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:119:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s: while changing dir to '%s'",argv[0],queuedir); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:128:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s: while opening queue file '%s'",argv[0],qfile); data/sympa-6.2.58~dfsg/src/libexec/queue.c:79:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(s, r); data/sympa-6.2.58~dfsg/src/libexec/queue.c:107:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(listname, argv[1]); data/sympa-6.2.58~dfsg/src/libexec/queue.c:114:10: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(listname, argv[2]); data/sympa-6.2.58~dfsg/src/libexec/queue.c:124:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s: while changing dir to '%s'",argv[0],queuedir); data/sympa-6.2.58~dfsg/src/libexec/queue.c:133:6: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buffer,"%s: while opening queue file '%s'",argv[0],qfile); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:35:8: [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 qfile[128]; data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:36:8: [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[16384]; data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:52:4: [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[16384], *p, *r, *s; data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:55:13: [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 ((f = fopen(file, "r")) != NULL) { data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:113: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). fd = open(qfile, O_CREAT|O_WRONLY, 0600); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:35:8: [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 qfile[128]; data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:36:8: [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[16384]; data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:52:4: [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[16384], *p, *r, *s; data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:55:13: [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 ((f = fopen(file, "r")) != NULL) { data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:125: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). fd = open(qfile, O_CREAT|O_WRONLY, 0600); data/sympa-6.2.58~dfsg/src/libexec/queue.c:35:8: [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 qfile[128]; data/sympa-6.2.58~dfsg/src/libexec/queue.c:36:8: [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[16384]; data/sympa-6.2.58~dfsg/src/libexec/queue.c:52:4: [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[16384], *p, *r, *s; data/sympa-6.2.58~dfsg/src/libexec/queue.c:55:13: [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 ((f = fopen(file, "r")) != NULL) { data/sympa-6.2.58~dfsg/src/libexec/queue.c:130: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). fd = open(qfile, O_CREAT|O_WRONLY, 0600); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:77: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). s = malloc(strlen(r) + 1); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:102: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). listname = malloc(strlen(argv[1]) + 1); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:111:4: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(027); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:117:24: [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). write(fd, listname, strlen(listname)); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:125: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). write(fd, buf, strlen(buf)); data/sympa-6.2.58~dfsg/src/libexec/bouncequeue.c:127:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = read(fileno(stdin), buf, sizeof buf)) > 0) data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:77: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). s = malloc(strlen(r) + 1); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:104: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). listname = malloc(strlen(argv[1]) + 1); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:108:24: [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). familyname = malloc(strlen(argv[2]) + 1); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:118:33: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:118:49: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:123:4: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(027); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:127:33: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:127:49: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:133: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). write(fd, familyname, strlen(familyname)); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:136:24: [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). write(fd, listname, strlen(listname)); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:145: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). write(fd, buf, strlen(buf)); data/sympa-6.2.58~dfsg/src/libexec/familyqueue.c:147:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = read(fileno(stdin), buf, sizeof buf)) > 0) data/sympa-6.2.58~dfsg/src/libexec/queue.c:77: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). s = malloc(strlen(r) + 1); data/sympa-6.2.58~dfsg/src/libexec/queue.c:105: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). listname = malloc(strlen(argv[1]) + 1); data/sympa-6.2.58~dfsg/src/libexec/queue.c:112: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). listname = malloc(strlen(argv[2]) + 1); data/sympa-6.2.58~dfsg/src/libexec/queue.c:123:33: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/queue.c:123:49: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/queue.c:128:4: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(027); data/sympa-6.2.58~dfsg/src/libexec/queue.c:132:33: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/queue.c:132:49: [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). char* buffer=(char*)malloc(strlen(argv[0])+strlen(queuedir)+80); data/sympa-6.2.58~dfsg/src/libexec/queue.c:138:24: [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). write(fd, listname, strlen(listname)); data/sympa-6.2.58~dfsg/src/libexec/queue.c:146: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). write(fd, buf, strlen(buf)); data/sympa-6.2.58~dfsg/src/libexec/queue.c:148:16: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((i = read(fileno(stdin), buf, sizeof buf)) > 0) ANALYSIS SUMMARY: Hits = 56 Lines analyzed = 545 in approximately 0.10 seconds (5226 lines/second) Physical Source Lines of Code (SLOC) = 335 Hits@level = [0] 11 [1] 29 [2] 15 [3] 0 [4] 12 [5] 0 Hits@level+ = [0+] 67 [1+] 56 [2+] 27 [3+] 12 [4+] 12 [5+] 0 Hits/KSLOC@level+ = [0+] 200 [1+] 167.164 [2+] 80.597 [3+] 35.8209 [4+] 35.8209 [5+] 0 Dot directories skipped = 2 (--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.