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-cthelper-1.0.0/include/libnetfilter_cthelper/libnetfilter_cthelper.h Examining data/libnetfilter-cthelper-1.0.0/include/linux/netfilter/nfnetlink_cthelper.h Examining data/libnetfilter-cthelper-1.0.0/include/linux/netfilter/nfnetlink.h Examining data/libnetfilter-cthelper-1.0.0/src/libnetfilter_cthelper.c Examining data/libnetfilter-cthelper-1.0.0/src/internal.h Examining data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-add.c Examining data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-del.c Examining data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-get.c FINAL RESULTS: data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-add.c:12: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[MNL_SOCKET_BUFFER_SIZE]; data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-add.c:31:62: [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). nfct_helper_attr_set_u32(nfct_helper, NFCTH_ATTR_QUEUE_NUM, atoi(argv[2])); data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-del.c:11: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[MNL_SOCKET_BUFFER_SIZE]; data/libnetfilter-cthelper-1.0.0/examples/nfct-helper-get.c:11: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-cthelper-1.0.0/examples/nfct-helper-get.c:36: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[MNL_SOCKET_BUFFER_SIZE]; data/libnetfilter-cthelper-1.0.0/src/libnetfilter_cthelper.c:69: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[NF_CT_HELPER_NAME_MAX]; data/libnetfilter-cthelper-1.0.0/src/libnetfilter_cthelper.c:76: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[NF_CT_HELPER_NAME_MAX]; data/libnetfilter-cthelper-1.0.0/src/libnetfilter_cthelper.c:159:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p->name, data, NF_CT_HELPER_NAME_MAX); data/libnetfilter-cthelper-1.0.0/src/libnetfilter_cthelper.c:211:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(h->name, data, NF_CT_HELPER_NAME_MAX); ANALYSIS SUMMARY: Hits = 9 Lines analyzed = 1299 in approximately 0.05 seconds (27147 lines/second) Physical Source Lines of Code (SLOC) = 937 Hits@level = [0] 5 [1] 2 [2] 7 [3] 0 [4] 0 [5] 0 Hits@level+ = [0+] 14 [1+] 9 [2+] 7 [3+] 0 [4+] 0 [5+] 0 Hits/KSLOC@level+ = [0+] 14.9413 [1+] 9.60512 [2+] 7.47065 [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.