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/libnet-arp-perl-1.0.11/get_mac_linux.c Examining data/libnet-arp-perl-1.0.11/arp.h Examining data/libnet-arp-perl-1.0.11/arp_lookup_bsd.c Examining data/libnet-arp-perl-1.0.11/ppport.h Examining data/libnet-arp-perl-1.0.11/get_mac_bsd.c Examining data/libnet-arp-perl-1.0.11/send_packet_bsd.c Examining data/libnet-arp-perl-1.0.11/arp_lookup_linux.c Examining data/libnet-arp-perl-1.0.11/send_packet_linux.c FINAL RESULTS: data/libnet-arp-perl-1.0.11/arp_lookup_bsd.c:88:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mac,"%s", ether_ntoa((struct ether_addr *)LLADDR(sdl))); data/libnet-arp-perl-1.0.11/arp_lookup_linux.c:84:9: [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(areq.arp_dev, device); data/libnet-arp-perl-1.0.11/get_mac_bsd.c:56:8: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mac, "%s", data/libnet-arp-perl-1.0.11/arp_lookup_linux.c:91:13: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(hw_addr, "%02x:%02x:%02x:%02x:%02x:%02x", data/libnet-arp-perl-1.0.11/get_mac_linux.c:64:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(mac,"%02x:%02x:%02x:%02x:%02x:%02x", data/libnet-arp-perl-1.0.11/send_packet_bsd.c:32: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 bpfdev[12]; data/libnet-arp-perl-1.0.11/send_packet_bsd.c:41:7: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(bpfdev,"/dev/bpf%d",i); data/libnet-arp-perl-1.0.11/send_packet_bsd.c:42:19: [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). if((bpffd = open(bpfdev,O_WRONLY)) > 0) data/libnet-arp-perl-1.0.11/arp_lookup_bsd.c:46:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(mac,"unknown", HEX_HW_ADDR_LEN); data/libnet-arp-perl-1.0.11/arp_lookup_linux.c:58:11: [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(device) || (strlen(device) >= 16) ) data/libnet-arp-perl-1.0.11/arp_lookup_linux.c:58:30: [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(device) || (strlen(device) >= 16) ) data/libnet-arp-perl-1.0.11/arp_lookup_linux.c:66: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). else if ( !strlen(ip) || (inet_aton(ip, &ipaddr) == 0) ) data/libnet-arp-perl-1.0.11/get_mac_bsd.c:42:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(mac,"unknown", HEX_HW_ADDR_LEN); data/libnet-arp-perl-1.0.11/get_mac_linux.c:35: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(mac) || !strlen(dev) ) data/libnet-arp-perl-1.0.11/get_mac_linux.c:35: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). if ( !strlen(mac) || !strlen(dev) ) data/libnet-arp-perl-1.0.11/get_mac_linux.c:39:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(mac,"unknown", HEX_HW_ADDR_LEN); data/libnet-arp-perl-1.0.11/get_mac_linux.c:44:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(iface.ifr_name, dev, IFNAMSIZ); data/libnet-arp-perl-1.0.11/ppport.h:699: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). STRLEN len = strlen(radix); data/libnet-arp-perl-1.0.11/send_packet_bsd.c:34:8: [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(dev) == 0) || data/libnet-arp-perl-1.0.11/send_packet_linux.c:35: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(dev) == 0) data/libnet-arp-perl-1.0.11/send_packet_linux.c:55:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(addr.sa_data,dev,sizeof(addr.sa_data)); ANALYSIS SUMMARY: Hits = 21 Lines analyzed = 1464 in approximately 0.06 seconds (26250 lines/second) Physical Source Lines of Code (SLOC) = 910 Hits@level = [0] 5 [1] 13 [2] 5 [3] 0 [4] 3 [5] 0 Hits@level+ = [0+] 26 [1+] 21 [2+] 8 [3+] 3 [4+] 3 [5+] 0 Hits/KSLOC@level+ = [0+] 28.5714 [1+] 23.0769 [2+] 8.79121 [3+] 3.2967 [4+] 3.2967 [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.