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/libnetfilter-log-1.0.1/utils/nfulnl_test.c Examining data/libnetfilter-log-1.0.1/utils/ulog_test.c Examining data/libnetfilter-log-1.0.1/include/libnetfilter_log/libnetfilter_log.h Examining data/libnetfilter-log-1.0.1/include/libnetfilter_log/linux_nfnetlink_log.h Examining data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h Examining data/libnetfilter-log-1.0.1/src/libipulog_compat.c Examining data/libnetfilter-log-1.0.1/src/libnetfilter_log.c FINAL RESULTS: data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h: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 indev_name[ULOG_IFNAMSIZ]; data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h: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 outdev_name[ULOG_IFNAMSIZ]; data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h: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 prefix[ULOG_PREFIX_LEN]; data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h: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 mac[ULOG_MAC_LEN]; data/libnetfilter-log-1.0.1/include/libnetfilter_log/libipulog.h:29: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 payload[0]; data/libnetfilter-log-1.0.1/src/libipulog_compat.c:183: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(h->upmsg.mac, phw->hw_addr, 8); data/libnetfilter-log-1.0.1/src/libipulog_compat.c:191: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(h->upmsg.prefix, NFA_DATA(tb[NFULA_PREFIX-1]), plen); data/libnetfilter-log-1.0.1/src/libipulog_compat.c:196: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(h->upmsg.payload, NFA_DATA(tb[NFULA_PAYLOAD-1]), data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:131:3: [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[NFNL_HEADER_LEN data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:467:3: [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[NFNL_HEADER_LEN data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:499:3: [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[NFNL_HEADER_LEN+NFA_LENGTH(sizeof(u_int32_t))]; data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:524:3: [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[NFNL_HEADER_LEN+NFA_LENGTH(sizeof(u_int32_t))]; data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:553:3: [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[NFNL_HEADER_LEN+NFA_LENGTH(sizeof(u_int32_t))]; data/libnetfilter-log-1.0.1/src/libnetfilter_log.c:587:3: [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[NFNL_HEADER_LEN+NFA_LENGTH(sizeof(u_int16_t))]; data/libnetfilter-log-1.0.1/utils/nfulnl_test.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 buf[4096]; data/libnetfilter-log-1.0.1/utils/ulog_test.c:61:46: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). h = ipulog_create_handle(ipulog_group2gmask(atoi(argv[2])), 65535); data/libnetfilter-log-1.0.1/utils/ulog_test.c:69:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). alarm(atoi(argv[3])); data/libnetfilter-log-1.0.1/utils/ulog_test.c:72:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). for (i = 0; i < atoi(argv[1]); i++) { data/libnetfilter-log-1.0.1/utils/ulog_test.c:28: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(pkt->prefix)) ANALYSIS SUMMARY: Hits = 19 Lines analyzed = 1763 in approximately 0.06 seconds (29606 lines/second) Physical Source Lines of Code (SLOC) = 999 Hits@level = [0] 62 [1] 1 [2] 18 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 81 [1+] 19 [2+] 18 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 81.0811 [1+] 19.019 [2+] 18.018 [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.