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/mdk4-4.1+git20200420/src/attacks/attacks.c Examining data/mdk4-4.1+git20200420/src/attacks/attacks.h Examining data/mdk4-4.1+git20200420/src/attacks/auth_dos.c Examining data/mdk4-4.1+git20200420/src/attacks/auth_dos.h Examining data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c Examining data/mdk4-4.1+git20200420/src/attacks/beacon_flood.h Examining data/mdk4-4.1+git20200420/src/attacks/countermeasures.c Examining data/mdk4-4.1+git20200420/src/attacks/countermeasures.h Examining data/mdk4-4.1+git20200420/src/attacks/deauth.c Examining data/mdk4-4.1+git20200420/src/attacks/deauth.h Examining data/mdk4-4.1+git20200420/src/attacks/dummy.c Examining data/mdk4-4.1+git20200420/src/attacks/dummy.h Examining data/mdk4-4.1+git20200420/src/attacks/eapol.c Examining data/mdk4-4.1+git20200420/src/attacks/eapol.h Examining data/mdk4-4.1+git20200420/src/attacks/fuzzer.c Examining data/mdk4-4.1+git20200420/src/attacks/fuzzer.h Examining data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c Examining data/mdk4-4.1+git20200420/src/attacks/ieee80211s.h Examining data/mdk4-4.1+git20200420/src/attacks/probing.c Examining data/mdk4-4.1+git20200420/src/attacks/probing.h Examining data/mdk4-4.1+git20200420/src/attacks/wids.c Examining data/mdk4-4.1+git20200420/src/attacks/wids.h Examining data/mdk4-4.1+git20200420/src/brute.c Examining data/mdk4-4.1+git20200420/src/brute.h Examining data/mdk4-4.1+git20200420/src/channelhopper.c Examining data/mdk4-4.1+git20200420/src/channelhopper.h Examining data/mdk4-4.1+git20200420/src/debug.c Examining data/mdk4-4.1+git20200420/src/debug.h Examining data/mdk4-4.1+git20200420/src/dumpfile.c Examining data/mdk4-4.1+git20200420/src/dumpfile.h Examining data/mdk4-4.1+git20200420/src/fragmenting.c Examining data/mdk4-4.1+git20200420/src/fragmenting.h Examining data/mdk4-4.1+git20200420/src/ghosting.c Examining data/mdk4-4.1+git20200420/src/ghosting.h Examining data/mdk4-4.1+git20200420/src/greylist.c Examining data/mdk4-4.1+git20200420/src/greylist.h Examining data/mdk4-4.1+git20200420/src/helpers.c Examining data/mdk4-4.1+git20200420/src/helpers.h Examining data/mdk4-4.1+git20200420/src/linkedlist.c Examining data/mdk4-4.1+git20200420/src/linkedlist.h Examining data/mdk4-4.1+git20200420/src/mac_addr.c Examining data/mdk4-4.1+git20200420/src/mac_addr.h Examining data/mdk4-4.1+git20200420/src/manufactor.h Examining data/mdk4-4.1+git20200420/src/mdk3_old.c Examining data/mdk4-4.1+git20200420/src/mdk4.c Examining data/mdk4-4.1+git20200420/src/osdep.c Examining data/mdk4-4.1+git20200420/src/osdep.h Examining data/mdk4-4.1+git20200420/src/osdep/airpcap.c Examining data/mdk4-4.1+git20200420/src/osdep/airpcap.h Examining data/mdk4-4.1+git20200420/src/osdep/byteorder.h Examining data/mdk4-4.1+git20200420/src/osdep/common.c Examining data/mdk4-4.1+git20200420/src/osdep/common.h Examining data/mdk4-4.1+git20200420/src/osdep/crctable_osdep.h Examining data/mdk4-4.1+git20200420/src/osdep/cygwin.c Examining data/mdk4-4.1+git20200420/src/osdep/cygwin.h Examining data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/darwin.c Examining data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/dummy.c Examining data/mdk4-4.1+git20200420/src/osdep/dummy_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/file.c Examining data/mdk4-4.1+git20200420/src/osdep/freebsd.c Examining data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/linux.c Examining data/mdk4-4.1+git20200420/src/osdep/linux_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/netbsd.c Examining data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/network.c Examining data/mdk4-4.1+git20200420/src/osdep/network.h Examining data/mdk4-4.1+git20200420/src/osdep/openbsd.c Examining data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c Examining data/mdk4-4.1+git20200420/src/osdep/osdep.c Examining data/mdk4-4.1+git20200420/src/osdep/osdep.h Examining data/mdk4-4.1+git20200420/src/osdep/packed.h Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/ieee80211_radiotap.h Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/parse.c Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/platform.h Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/radiotap-parser.c Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/radiotap-parser.h Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/radiotap.c Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/radiotap.h Examining data/mdk4-4.1+git20200420/src/osdep/radiotap/radiotap_iter.h Examining data/mdk4-4.1+git20200420/src/osdep/tap-win32/common.h Examining data/mdk4-4.1+git20200420/src/packet.c Examining data/mdk4-4.1+git20200420/src/packet.h Examining data/mdk4-4.1+git20200420/src/pcap.h Examining data/mdk4-4.1+git20200420/src/test.c FINAL RESULTS: data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:538:3: [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(auth_dos_name, AUTH_DOS_NAME); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:112:43: [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). bopt->ssid = malloc(strlen(optarg) + 1); strcpy(bopt->ssid, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:117:52: [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). bopt->ssid_filename = malloc(strlen(optarg) + 1); strcpy(bopt->ssid_filename, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:122:56: [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). bopt->mac_ssid_filename = malloc(strlen(optarg) + 1); strcpy(bopt->mac_ssid_filename, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:142:2: [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(bopt->encryptions, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:273:3: [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(beacon_flood_name, BEACON_FLOOD_NAME); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:200:3: [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(countermeasures_name, COUNTERMEASURES_NAME); data/mdk4-4.1+git20200420/src/attacks/deauth.c:86: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(dopt->whitelist, optarg); data/mdk4-4.1+git20200420/src/attacks/deauth.c:91: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(dopt->blacklist, optarg); data/mdk4-4.1+git20200420/src/attacks/deauth.c:458:3: [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(deauth_name, DEAUTH_NAME); data/mdk4-4.1+git20200420/src/attacks/dummy.c:71:3: [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(dummy_name, DUMMY_NAME); data/mdk4-4.1+git20200420/src/attacks/eapol.c:364:3: [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(eapol_name, EAPOL_NAME); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:251:3: [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(fuzz_name, FUZZ_NAME); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:111:46: [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). dopt->mesh_id = malloc(strlen(optarg) + 1); strcpy(dopt->mesh_id, optarg); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:430:3: [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(ieee80211s_name, IEEE80211S_NAME); data/mdk4-4.1+git20200420/src/attacks/probing.c:83:2: [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(popt->ssid, optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:89:2: [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(popt->filename, optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:104:2: [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(popt->charsets, optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:110:2: [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(popt->proceed, optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:391:3: [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(probing_name, PROBING_NAME); data/mdk4-4.1+git20200420/src/attacks/wids.c:76:45: [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). wopt->target = malloc(strlen(optarg) + 1); strcpy(wopt->target, optarg); data/mdk4-4.1+git20200420/src/attacks/wids.c:320:3: [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(wids_name, WIDS_NAME); data/mdk4-4.1+git20200420/src/linkedlist.c:164:3: [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(new_item->ssid, ssid); data/mdk4-4.1+git20200420/src/mdk3_old.c:473:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (! (argc > t+1)) { printf(use_macb); return -1; } data/mdk4-4.1+git20200420/src/mdk3_old.c:477:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (! (argc > t+1)) { printf(use_macb); return -1; } data/mdk4-4.1+git20200420/src/mdk3_old.c:481:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (! (argc > t+1)) { printf(use_macb); return -1; } data/mdk4-4.1+git20200420/src/mdk3_old.c:493:25: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. if (! (argc > t+1)) { printf(use_wpad); return -1; } data/mdk4-4.1+git20200420/src/mdk3_old.c:499:2: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. printf(use_head); data/mdk4-4.1+git20200420/src/osdep.c:44:5: [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(osdep_iface_in, interface1); data/mdk4-4.1+git20200420/src/osdep.c:47:5: [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(osdep_iface_out, interface2); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:296:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( stderr, err, AirpcapGetLastError(airpcap_handle)); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:298:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf( stderr, err); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:330:5: [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(iface, DEVICE_PREFIX); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:331:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(iface, param); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:336:5: [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(iface, param); data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:423:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(str, tmp); data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:167:5: [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(ifra.ifra_name, priv->tf_ifr.ifr_name); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:359: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(ifr.ifr_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:366: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(ifr.ifr_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:374: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(ifmr.ifm_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:391: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(ifr.ifr_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:397:2: [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(pf->pf_ireq.i_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:401:2: [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(pf->pf_ifr.ifr_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:420:2: [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(ifr.ifr_name, iface); data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c:162:2: [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(ifra.ifra_name, priv->tf_ifr.ifr_name); data/mdk4-4.1+git20200420/src/osdep/linux.c:189:9: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl(path, "iwpriv",iface, "ndis_reset", NULL); data/mdk4-4.1+git20200420/src/osdep/linux.c:221:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(curfile, "%s/%s", dir, ep->d_name); data/mdk4-4.1+git20200420/src/osdep/linux.c:489:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(dev->iwconfig, "iwconfig", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:966:13: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl( dev->wlanctlng, "wlanctl-ng", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:988:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( dev->iwpriv, "iwpriv", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1004:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(dev->iwconfig, "iwconfig", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1064:13: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl( dev->wlanctlng, "wlanctl-ng", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1086:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( dev->iwpriv, "iwpriv", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1102:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(dev->iwconfig, "iwconfig", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1157:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp(dev->iwconfig, "iwconfig", wi_get_ifname(wi), data/mdk4-4.1+git20200420/src/osdep/linux.c:1282:13: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl( dev->wl, "wl", "monitor", "1", NULL); data/mdk4-4.1+git20200420/src/osdep/linux.c:1301:17: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl( dev->wlanctlng, "wlanctl-ng", iface, data/mdk4-4.1+git20200420/src/osdep/linux.c:1320:17: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( dev->iwpriv, "iwpriv", iface, data/mdk4-4.1+git20200420/src/osdep/linux.c:1337:17: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( dev->iwpriv, "iwpriv", iface, data/mdk4-4.1+git20200420/src/osdep/linux.c:1376:9: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( "iwpriv", "iwpriv", iface, "monitor_type", "1", NULL ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1384:9: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( "iwpriv", "iwpriv", iface, "prismhdr", "1", NULL ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1392:9: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( "iwpriv", "iwpriv", iface, "set_prismhdr", "1", NULL ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1690:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(strbuf) == 0) data/mdk4-4.1+git20200420/src/osdep/linux.c:1698:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(strbuf) == 0) data/mdk4-4.1+git20200420/src/osdep/linux.c:1706:9: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (system(strbuf) == 0) data/mdk4-4.1+git20200420/src/osdep/linux.c:1719:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system( strbuf ) == 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1747:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system( strbuf ) == 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1756:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system( strbuf ) == 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1771:18: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. unused = system( strbuf ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1795:13: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf((char *) strbuf, "/proc/sys/net/%s/dev_type", iface); data/mdk4-4.1+git20200420/src/osdep/linux.c:1812:17: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system( strbuf ) == 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1820:26: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. unused = system( strbuf ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1827:26: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. unused = system( strbuf ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1842:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( "iwpriv", "iwpriv", iface, "get_port3", NULL ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1857:13: [4] (shell) system: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if( system( strbuf ) == 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1868:13: [4] (shell) execlp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execlp( "iwpriv", "iwpriv", iface, "get_regdomain", NULL ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1957:29: [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(dev->main_if, this_iface->d_name); data/mdk4-4.1+git20200420/src/osdep/linux.c:1983:33: [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(dev->main_if, this_iface->d_name); data/mdk4-4.1+git20200420/src/osdep/linux.c:2250:19: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. ret = sscanf(battery_data, "%*s %*d.%*d %*x %x %x %x %*d%% %d %s\n", &ac, data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:84:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "a:mi:s:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:313:12: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. apnr = random() % apcount; data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:321:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. apnr = random() % apcount; data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:102:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "n:f:av:t:w:b:mhc:s:i:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:227:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. encindex = random() % strlen(bopt->encryptions); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:230:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (random() % 2) bitrate = 11; data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:239:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. if (random() % 2) adhoc = 0; data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:61:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "t:js:w:n:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:167:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. r = random(); data/mdk4-4.1+git20200420/src/attacks/deauth.c:82:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "w:b:s:xc:E:B:S:W:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/eapol.c:74:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "t:ls:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:80:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "s:m:c:p:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:144:60: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. unsigned int mod, modcount, i, j, k, src = fopt->sources[random() % strlen(fopt->sources)]; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:168:88: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(generate_mac(MAC_KIND_AP), ssid, osdep_get_channel(), encs[random() % 4], (random() % 2) ? 54 : 11, random() % 2); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:168:104: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(generate_mac(MAC_KIND_AP), ssid, osdep_get_channel(), encs[random() % 4], (random() % 2) ? 54 : 11, random() % 2); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:168:129: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(generate_mac(MAC_KIND_AP), ssid, osdep_get_channel(), encs[random() % 4], (random() % 2) ? 54 : 11, random() % 2); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:186:15: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. modcount = (random() % strlen(fopt->modifiers)) + 1; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:192:27: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. mod = fopt->modifiers[random() % strlen(fopt->modifiers)]; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:205:15: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. k = ((random() % pkt.len) / 4) + 1; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:207:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt.data[random() % pkt.len] = random(); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:207:42: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt.data[random() % pkt.len] = random(); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:210:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. k = random() % (FUZZ_MAX_SIZE - pkt.len); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:213:42: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. for (j=0; j<k; j++) extra[j] = random(); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:219:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt.len = (random() % pkt.len) + 1; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:223:25: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. hdr->duration = random(); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:224:22: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. hdr->flags = random(); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:74:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "n:f:s:b:p:l")) != -1) { data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:211:16: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. curfuzz = (random() % 4) + 1; data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:228:46: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. sniff.len = sizeof(struct ieee_hdr) + (random() % (sniff.len - sizeof(struct ieee_hdr))); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:232:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. j = ((random() % sniff.len) / 4) + 1; data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:234:20: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. sniff.data[random() % sniff.len] = random(); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:234:44: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. sniff.data[random() % sniff.len] = random(); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:316:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. hops = (random() % 10) + 1; //Plus one so it looks like we just forwarded it ;) data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:318:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. seq += (random() % 10); //Randomly increasing sequence counter data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:319:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. tseq = seq + ((random() % 50) - 25); //Setting target seq somewhere near orig seq data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:330:18: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. preq->metric = random() % 4096; data/mdk4-4.1+git20200420/src/attacks/probing.c:77:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "e:f:t:s:b:p:r:")) != -1) { data/mdk4-4.1+git20200420/src/attacks/probing.c:201:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. type = random()%2; data/mdk4-4.1+git20200420/src/attacks/probing.c:205:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. c=0x80+(random()%0x80); data/mdk4-4.1+git20200420/src/attacks/probing.c:207:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. c=0x41+(random()%25); data/mdk4-4.1+git20200420/src/attacks/probing.c:212:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. type = random()%4; data/mdk4-4.1+git20200420/src/attacks/probing.c:231:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. type = random()%2; data/mdk4-4.1+git20200420/src/attacks/wids.c:68:17: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "e:c:zs:")) != -1) { data/mdk4-4.1+git20200420/src/fragmenting.c:70:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random() % 100; data/mdk4-4.1+git20200420/src/fragmenting.c:74:9: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random() % (frag_max - frag_min + 1); data/mdk4-4.1+git20200420/src/ghosting.c:51:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random() % VALID_RATE_COUNT; data/mdk4-4.1+git20200420/src/helpers.c:16:10: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. c = (random() % 14) + 1; data/mdk4-4.1+git20200420/src/helpers.c:28:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random(); data/mdk4-4.1+git20200420/src/helpers.c:30:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = (random() % 94) + ' '; data/mdk4-4.1+git20200420/src/helpers.c:44:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. len = (random() % 256); data/mdk4-4.1+git20200420/src/helpers.c:46:14: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. len = (random() % 32); data/mdk4-4.1+git20200420/src/linkedlist.c:255:16: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int i, rnd = random() % SHUFFLE_DISTANCE; data/mdk4-4.1+git20200420/src/linkedlist.c:264:16: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. int i, rnd = random() % SHUFFLE_DISTANCE; data/mdk4-4.1+git20200420/src/mac_addr.c:50:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pos = random(); data/mdk4-4.1+git20200420/src/mac_addr.c:60:41: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. } else mac_v.ether_addr_octet[t] = random(); data/mdk4-4.1+git20200420/src/mac_addr.c:66:41: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. } else mac_v.ether_addr_octet[t] = random(); data/mdk4-4.1+git20200420/src/mac_addr.c:86:36: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. gmac.ether_addr_octet[t] = random(); data/mdk4-4.1+git20200420/src/mdk4.c:180:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(time(NULL)); //Fresh numbers each run data/mdk4-4.1+git20200420/src/osdep.c:262:13: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random() % available_out_txpowers_count; data/mdk4-4.1+git20200420/src/osdep.c:279:11: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. rnd = random() % available_in_txpowers_count; data/mdk4-4.1+git20200420/src/packet.c:368:40: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. for (t=0; t<32; t++) rsn->nonce[t] = random(); data/mdk4-4.1+git20200420/src/packet.c:372:42: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. for (t=0; t<16; t++) rsn->key_mic[t] = random(); data/mdk4-4.1+git20200420/src/test.c:138:45: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. cl = add_to_clist(cl, (u_char *) rdata, random(), strlen(rdata)+1); data/mdk4-4.1+git20200420/src/test.c:146:45: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. cl = add_to_clist(cl, (u_char *) rdata, random(), strlen(rdata)+1); data/mdk4-4.1+git20200420/src/test.c:198:49: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(bssid, ssid, (uint8_t) (random() % 14), enc[random() % 4], (random() % 2) * 54, random() % 2); data/mdk4-4.1+git20200420/src/test.c:198:69: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(bssid, ssid, (uint8_t) (random() % 14), enc[random() % 4], (random() % 2) * 54, random() % 2); data/mdk4-4.1+git20200420/src/test.c:198:85: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(bssid, ssid, (uint8_t) (random() % 14), enc[random() % 4], (random() % 2) * 54, random() % 2); data/mdk4-4.1+git20200420/src/test.c:198:105: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_beacon(bssid, ssid, (uint8_t) (random() % 14), enc[random() % 4], (random() % 2) * 54, random() % 2); data/mdk4-4.1+git20200420/src/test.c:211:40: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_auth(bssid, station, (random() % 2) + 1); data/mdk4-4.1+git20200420/src/test.c:218:40: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. pkt = create_probe(station, ssid, (random() % 2) * 54); data/mdk4-4.1+git20200420/src/test.c:276:3: [3] (random) srandom: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. srandom(time(NULL)); //Fresh numbers each run data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:21: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 *status_codes[3] = {"No Response", "Working", "Frozen"}; data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:101:31: [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). aopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:343: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(retn.data, dataclist->data, dataclist->data_len); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:21: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 encryptions[5]; data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:92:3: [2] (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). Risk is low because the source is a constant string. strcpy(bopt->encryptions, "nwta"); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:156:7: [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). ch = atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:163:31: [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). bopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:71:31: [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). copt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:75:37: [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). copt->burst_pause = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:79:39: [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). copt->burst_packets = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:168:5: [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(pkt.data + 24, &r, 4); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:171:5: [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(pkt.data + 28, &r, 4); data/mdk4-4.1+git20200420/src/attacks/deauth.c:24:10: [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 essid_block[33] = {0}; // essid for d mode, -E data/mdk4-4.1+git20200420/src/attacks/deauth.c:95:35: [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). dopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/deauth.c:104:24: [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). speed = 1000 * atoi(speedstr + 1); data/mdk4-4.1+git20200420/src/attacks/deauth.c:114: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(essid_block, optarg, essid_len); data/mdk4-4.1+git20200420/src/attacks/deauth.c:162:5: [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(mac_block.ether_addr_octet, sniffed.data + 16, ETHER_ADDR_LEN); data/mdk4-4.1+git20200420/src/attacks/deauth.c:317:9: [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(essid_mac_block.ether_addr_octet, sniffed.data + 16, ETHER_ADDR_LEN); data/mdk4-4.1+git20200420/src/attacks/eapol.c:81:31: [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). eopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/eapol.c:160: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(target_wpa1, tags, 2 + tags[1]); data/mdk4-4.1+git20200420/src/attacks/eapol.c:166:7: [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(target_rsn, tags, 2 + tags[1]); data/mdk4-4.1+git20200420/src/attacks/eapol.c:321: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(pkt.data + pkt.len, target_wpa1, target_wpa1[1] + 2); data/mdk4-4.1+git20200420/src/attacks/eapol.c:324: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(pkt.data + pkt.len, target_rsn, target_rsn[1] + 2); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:86:26: [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). speed = 1000 * atoi(speedstr + 1); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:95:38: [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). fopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:145: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 *ssid, encs[5] = "nwta"; data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:21:1: [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 blackhole_info[1024]; data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:78:6: [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). i = atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:103:31: [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). dopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:92:31: [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). popt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:116:35: [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). popt->channel = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/probing.c:196:12: [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 ssid[256] = {0}; data/mdk4-4.1+git20200420/src/attacks/wids.c:82:21: [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). speed = 1000 * atoi(speedstr + 1); data/mdk4-4.1+git20200420/src/attacks/wids.c:94:38: [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). wopt->speed = (unsigned int) atoi(optarg); data/mdk4-4.1+git20200420/src/attacks/wids.c:272:7: [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(pkt.data, wclient->data, wclient->data_len); data/mdk4-4.1+git20200420/src/channelhopper.c:61:17: [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. extern unsigned char essid_block[33]; data/mdk4-4.1+git20200420/src/channelhopper.c:386: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 ssid[32]; data/mdk4-4.1+git20200420/src/channelhopper.c:407: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(bssid.ether_addr_octet, sniffed.data + 16, ETHER_ADDR_LEN); data/mdk4-4.1+git20200420/src/channelhopper.c:413: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(ssid, pie_data, ie_len); data/mdk4-4.1+git20200420/src/fragmenting.c:35: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(inject.data, pkt->data, pkt->len); data/mdk4-4.1+git20200420/src/helpers.c:114:20: [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 ((file_fp = fopen(filename, "r")) == NULL) { data/mdk4-4.1+git20200420/src/linkedlist.c:140: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(new_item->data, data, data_len); data/mdk4-4.1+git20200420/src/linkedlist.c:185: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(new_item->data, data, data_len); data/mdk4-4.1+git20200420/src/mac_addr.c:59:18: [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. sscanf((char *) (clients[pos] + (2 * t)), "%2hhx", &mac_v.ether_addr_octet[t]); data/mdk4-4.1+git20200420/src/mac_addr.c:65:18: [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. sscanf((char *) (accesspoints[pos] + (2 * t)), "%2hhx", &mac_v.ether_addr_octet[t]); data/mdk4-4.1+git20200420/src/mac_addr.c:135:14: [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. sscanf((char *) clients[pos], "%2hhx%2hhx%2hhx", upb.ether_addr_octet, upb.ether_addr_octet+1, upb.ether_addr_octet+2); data/mdk4-4.1+git20200420/src/mac_addr.c:137: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(mac_v.ether_addr_octet, upb.ether_addr_octet, 3); data/mdk4-4.1+git20200420/src/mac_addr.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(mac_v.ether_addr_octet+3, lowb.ether_addr_octet, 3); data/mdk4-4.1+git20200420/src/mac_addr.c:143:6: [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(lowb.ether_addr_octet, mac_lower->ether_addr_octet, 3); data/mdk4-4.1+git20200420/src/mac_addr.c:152: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(mac_v.ether_addr_octet, mac_base.ether_addr_octet, 3); data/mdk4-4.1+git20200420/src/mac_addr.c:153: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(mac_v.ether_addr_octet+3, lowb.ether_addr_octet, 3); data/mdk4-4.1+git20200420/src/mac_addr.h:15:24: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #define MAC_COPY(x,y) (memcpy((x).ether_addr_octet, (y).ether_addr_octet, ETHER_ADDR_LEN)) data/mdk4-4.1+git20200420/src/manufactor.h:30:10: [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 clients[445][25] = { data/mdk4-4.1+git20200420/src/manufactor.h:479:10: [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 accesspoints[227][25] = { data/mdk4-4.1+git20200420/src/mdk3_old.c:50:10: [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 tmpbuf[MAX_PACKET_LENGTH]; // Temp buffer for packet manipulation in send/read_packet data/mdk4-4.1+git20200420/src/mdk3_old.c:51:10: [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 pkt[MAX_PACKET_LENGTH]; // Space to save generated packet data/mdk4-4.1+git20200420/src/mdk3_old.c:52:10: [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 pkt_sniff[MAX_PACKET_LENGTH]; // Space to save sniffed packets data/mdk4-4.1+git20200420/src/mdk3_old.c:53:10: [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 pkt_check[MAX_PACKET_LENGTH]; // Space to save sniffed packets to check success data/mdk4-4.1+git20200420/src/mdk3_old.c:54:10: [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 aps_known[MAX_APS_TRACKED][ETHER_ADDR_LEN]; // Array to save MACs of known APs data/mdk4-4.1+git20200420/src/mdk3_old.c:56:10: [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 auth[MAX_APS_TESTED][ETHER_ADDR_LEN]; // Array to save MACs of APs currently under test data/mdk4-4.1+git20200420/src/mdk3_old.c:134:21: [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 unsigned char last_mac[6] = "\x00\x00\x00\x00\x00\x00"; data/mdk4-4.1+git20200420/src/mdk3_old.c:150:7: [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(last_mac, pkt_sniff+4, 6); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:317:5: [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 errbuf[AIRPCAP_ERRBUF_SIZE ]; data/mdk4-4.1+git20200420/src/osdep/cygwin.c:342: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 lame[1024]; data/mdk4-4.1+git20200420/src/osdep/cygwin.c:489: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 buf[2048]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:48: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 tc_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:55: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 tc_guid[256]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:114: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 device[256]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:173: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 key[256]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:208: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[256]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:278: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[256]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:381: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 m[16]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:382: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 mold[sizeof(m)]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:411: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 str[2*6+1]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:412: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 strold[sizeof(str)]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:419: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 tmp[3]; data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:421: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. if (sprintf(tmp, "%.2X", *mac++) != 2) data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:588: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 buf[2048]; data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:42:5: [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 tf_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:48:5: [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 iface[12]; data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:58:14: [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(name, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:64:18: [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(iface, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:155:5: [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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/file.c:44: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 pf_mac[6]; data/mdk4-4.1+git20200420/src/osdep/file.c:53: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 buf[4096]; data/mdk4-4.1+git20200420/src/osdep/file.c:131: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(h80211, &buf[off], rc); data/mdk4-4.1+git20200420/src/osdep/file.c:140: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(mac, pn->pf_mac, sizeof(pn->pf_mac)); data/mdk4-4.1+git20200420/src/osdep/file.c:240:7: [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(iface + 7, O_RDONLY); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:53: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 pf_buf[4096]; data/mdk4-4.1+git20200420/src/osdep/freebsd.c:272: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(h80211, wh, plen); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:337:9: [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[64]; data/mdk4-4.1+git20200420/src/osdep/freebsd.c:405:17: [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(buf, "/dev/bpf%d", i); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:407:22: [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(buf, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:465: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(mac, sdp->sdl_data + sdp->sdl_nlen, 6); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:508: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:584:18: [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 ((apmfd = open("/dev/apm", O_RDONLY)) < 0) data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c:40: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 tf_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c:60:7: [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(iface, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c:149: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:137:14: [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 pl_mac[6]; data/mdk4-4.1+git20200420/src/osdep/linux.c:456:5: [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 s[32]; data/mdk4-4.1+git20200420/src/osdep/linux.c:602:14: [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 tmpbuf[4096]; data/mdk4-4.1+git20200420/src/osdep/linux.c:793:5: [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, tmpbuf + n, caplen ); data/mdk4-4.1+git20200420/src/osdep/linux.c:805:14: [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 maddr[6]; data/mdk4-4.1+git20200420/src/osdep/linux.c:807:14: [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 tmpbuf[4096]; data/mdk4-4.1+git20200420/src/osdep/linux.c:836:9: [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(tmpbuf, u8aRadiotap, sizeof (u8aRadiotap) ); data/mdk4-4.1+git20200420/src/osdep/linux.c:837:9: [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(tmpbuf + sizeof (u8aRadiotap), buf, count); data/mdk4-4.1+git20200420/src/osdep/linux.c:856:30: [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. if( ( ((unsigned char *) buf)[1] & 3 ) != 3 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:858:17: [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( tmpbuf, buf, 24 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:864:17: [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( tmpbuf + 46, buf + 24, count - 24 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:870:17: [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( tmpbuf, buf, 30 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:876:17: [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( tmpbuf + 46, buf + 30, count - 30 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:885:26: [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. if( ( ((unsigned char *) buf)[1] & 3 ) == 2 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:889:13: [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( maddr, buf + 4, 6 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:890:13: [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 + 4, buf + 16, 6 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:891:13: [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 + 16, maddr, 6 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:949:5: [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 s[32]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1051:5: [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 s[32]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1142:5: [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 s[32]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1196:5: [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[256]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1200:11: [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). fd2 = open(buf, O_WRONLY); data/mdk4-4.1+git20200420/src/osdep/linux.c:1205:15: [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). fd2 = open(buf, O_WRONLY); data/mdk4-4.1+git20200420/src/osdep/linux.c:1562:5: [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( mac, (unsigned char*)ifr.ifr_hwaddr.sa_data, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:1610:5: [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 strbuf[512]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1618:5: [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 r_file[128], buf[128]; data/mdk4-4.1+git20200420/src/osdep/linux.c:1728:28: [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). kver = atoi(checklinuxversion.release + 4); data/mdk4-4.1+git20200420/src/osdep/linux.c:1785: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). f = fopen(strbuf, "r"); data/mdk4-4.1+git20200420/src/osdep/linux.c:1796:17: [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). f = fopen( (char *) strbuf,"w"); data/mdk4-4.1+git20200420/src/osdep/linux.c:1882:21: [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 ((acpi = fopen(r_file, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:1892:25: [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 ((acpi = fopen(r_file, "w")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:1897:25: [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 ((acpi = fopen(r_file, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:1938:29: [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 ((acpi = fopen(r_file, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:1967:41: [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 ((acpi = fopen(r_file, "w")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:1972:41: [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 ((acpi = fopen(r_file, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:2105: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(mac, pl->pl_mac, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:2126: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( pl->pl_mac, (unsigned char*)ifr.ifr_hwaddr.sa_data, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:2129: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(mac, pl->pl_mac, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:2162: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(ifr.ifr_hwaddr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:2163: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(pl->pl_mac, mac, 6); data/mdk4-4.1+git20200420/src/osdep/linux.c:2229:5: [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[128]; data/mdk4-4.1+git20200420/src/osdep/linux.c:2233:5: [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 units[32]; data/mdk4-4.1+git20200420/src/osdep/linux.c:2242:20: [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 ((apm = fopen("/proc/apm", "r")) != NULL ) { data/mdk4-4.1+git20200420/src/osdep/linux.c:2271:9: [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 battery_state[128]; data/mdk4-4.1+git20200420/src/osdep/linux.c:2272:9: [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 battery_info[128]; data/mdk4-4.1+git20200420/src/osdep/linux.c:2290:25: [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 ((acpi = fopen(battery_state, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:2319:20: [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). info = fopen(battery_info, "r"); data/mdk4-4.1+git20200420/src/osdep/linux.c:2331:25: [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 ((acpi = fopen(battery_state, "r")) == NULL) data/mdk4-4.1+git20200420/src/osdep/linux.c:2348:28: [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). rate = atoi(buf + 25); data/mdk4-4.1+git20200420/src/osdep/linux.c:2350:30: [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). remain = atoi(buf + 25); data/mdk4-4.1+git20200420/src/osdep/linux.c:2354:31: [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). current = atoi(buf + 25); data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:44: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 tl_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:53:14: [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_tap = open( name ? name : "/dev/net/tun", O_RDWR ); data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:136:9: [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(priv->tl_ifr.ifr_hwaddr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:68: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 pn_buf[4096]; data/mdk4-4.1+git20200420/src/osdep/netbsd.c:256: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(h80211, wh, plen); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:300:9: [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[64]; data/mdk4-4.1+git20200420/src/osdep/netbsd.c:369:22: [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(buf, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:433: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(mac, sdp->sdl_data + sdp->sdl_nlen, 6); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:476: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:545:18: [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 ((apmfd = open("/dev/apm", O_RDONLY)) < 0) data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c:39: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 tn_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c:59:7: [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(iface, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c:147: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/network.c:39: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 q_buf[2048]; data/mdk4-4.1+git20200420/src/osdep/network.c:71: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(pktbuf + sizeof(struct net_hdr), arg, len); data/mdk4-4.1+git20200420/src/osdep/network.c:201: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(q->q_buf, buf, q->q_len); data/mdk4-4.1+git20200420/src/osdep/network.c:207: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 buf[2048]; data/mdk4-4.1+git20200420/src/osdep/network.c:225: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(arg, buf, l); data/mdk4-4.1+git20200420/src/osdep/network.c:263: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(buf, q->q_buf, q->q_len); data/mdk4-4.1+git20200420/src/osdep/network.c:314: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(h80211, &bufc[sz], l); data/mdk4-4.1+git20200420/src/osdep/network.c:337: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(mac, buf, 6); data/mdk4-4.1+git20200420/src/osdep/network.c:347: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 buf[2048]; data/mdk4-4.1+git20200420/src/osdep/network.c:352: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(ptr, ti, sz); data/mdk4-4.1+git20200420/src/osdep/network.c:357: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(ptr, h80211, len); data/mdk4-4.1+git20200420/src/osdep/network.c:434:9: [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). port = atoi(ptr); data/mdk4-4.1+git20200420/src/osdep/network.c:451: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 ip[16]; data/mdk4-4.1+git20200420/src/osdep/openbsd.c:67: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 po_buf[4096]; data/mdk4-4.1+git20200420/src/osdep/openbsd.c:255: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(h80211, wh, plen); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:299:9: [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[64]; data/mdk4-4.1+git20200420/src/osdep/openbsd.c:368:22: [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(buf, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:432: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(mac, sdp->sdl_data + sdp->sdl_nlen, 6); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:475: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:544:18: [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 ((apmfd = open("/dev/apm", O_RDONLY)) < 0) data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c:39: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 to_name[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c:59:7: [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(iface, O_RDWR); data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c:147: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(ifr->ifr_addr.sa_data, mac, 6); data/mdk4-4.1+git20200420/src/osdep/osdep.h:87:9: [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 wi_interface[MAX_IFACE_NAME]; data/mdk4-4.1+git20200420/src/osdep/radiotap/parse.c:119:7: [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(argv[fnidx], O_RDONLY); data/mdk4-4.1+git20200420/src/packet.c:48:7: [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((pkt->data) + (sizeof(struct ieee_hdr)), source.ether_addr_octet, ETHER_ADDR_LEN); data/mdk4-4.1+git20200420/src/packet.c:139: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(pkt->data + pkt->len + 2, ssid, strlen(ssid)); //Copy the SSID data/mdk4-4.1+git20200420/src/packet.c:146:5: [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(pkt->data + pkt->len, DEFAULT_11B_RATES, 6); //11 MBit data/mdk4-4.1+git20200420/src/packet.c:150:5: [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(pkt->data + pkt->len, DEFAULT_11G_RATES, 10); //54 MBit data/mdk4-4.1+git20200420/src/packet.c:187:5: [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(beacon.data + beacon.len, DEFAULT_WPA_TKIP_TAG, 26); data/mdk4-4.1+git20200420/src/packet.c:191:5: [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(beacon.data + beacon.len, DEFAULT_WPA_AES_TAG, 26); data/mdk4-4.1+git20200420/src/packet.c:308:7: [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(ssid, tags + 2, tags[1]); data/mdk4-4.1+git20200420/src/packet.c:337: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(pkt->data + pkt->len, data, len); data/mdk4-4.1+git20200420/src/packet.c:374: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(pkt->data + sizeof(struct ieee_hdr) + sizeof(struct llc_header) + sizeof(struct rsn_auth), wpa_element, wpa_length); data/mdk4-4.1+git20200420/src/packet.h:58:12: [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 data[MAX_PACKET_SIZE]; data/mdk4-4.1+git20200420/src/test.c:38: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 chan[8]; data/mdk4-4.1+git20200420/src/test.c:39: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 *ssid[8]; data/mdk4-4.1+git20200420/src/test.c:86: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 parse1[18] = "aa:bB:Cc:DD:00:0f"; data/mdk4-4.1+git20200420/src/test.c:87: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 parse2[13] = "aabbCCdDEef9"; data/mdk4-4.1+git20200420/src/test.c:126: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 tdata[10] = "testdata"; data/mdk4-4.1+git20200420/src/test.c:188: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 enc[4] = {'n', 'w', 't', 'a'}; data/mdk4-4.1+git20200420/src/test.c:248: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 word[3] = { 'x', 'x', 0x00 }; //Can't init with "xx", would be READ ONLY! data/mdk4-4.1+git20200420/src/attacks/auth_dos.c:537:32: [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 *auth_dos_name = malloc(strlen(AUTH_DOS_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:105: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(optarg) > 255) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:107:13: [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(optarg) > 32) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:112: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). bopt->ssid = malloc(strlen(optarg) + 1); strcpy(bopt->ssid, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:117:31: [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). bopt->ssid_filename = malloc(strlen(optarg) + 1); strcpy(bopt->ssid_filename, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:122:35: [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). bopt->mac_ssid_filename = malloc(strlen(optarg) + 1); strcpy(bopt->mac_ssid_filename, optarg); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:135:7: [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(optarg) > 4) || (strlen(optarg) < 1)) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:135:31: [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(optarg) > 4) || (strlen(optarg) < 1)) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:137:13: [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). for(i=0; i<strlen(optarg); i++) { data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:227: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). encindex = random() % strlen(bopt->encryptions); data/mdk4-4.1+git20200420/src/attacks/beacon_flood.c:272:36: [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 *beacon_flood_name = malloc(strlen(BEACON_FLOOD_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/countermeasures.c:199:39: [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 *countermeasures_name = malloc(strlen(COUNTERMEASURES_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/deauth.c:85:32: [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). dopt->whitelist = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/deauth.c:90:32: [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). dopt->blacklist = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/deauth.c:113: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). essid_len = strlen(optarg); data/mdk4-4.1+git20200420/src/attacks/deauth.c:457: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). char *deauth_name = malloc(strlen(DEAUTH_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/dummy.c:70:29: [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 *dummy_name = malloc(strlen(DUMMY_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/eapol.c:363:29: [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 *eapol_name = malloc(strlen(EAPOL_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:64: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). for (i=0; i<strlen(options); i++) { data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:144:71: [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). unsigned int mod, modcount, i, j, k, src = fopt->sources[random() % strlen(fopt->sources)]; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:186: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). modcount = (random() % strlen(fopt->modifiers)) + 1; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:192:38: [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). mod = fopt->modifiers[random() % strlen(fopt->modifiers)]; data/mdk4-4.1+git20200420/src/attacks/fuzzer.c:250:28: [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 *fuzz_name = malloc(strlen(FUZZ_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:106: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(optarg) > 255) { data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:108:13: [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(optarg) > 32) { data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:111: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). dopt->mesh_id = malloc(strlen(optarg) + 1); strcpy(dopt->mesh_id, optarg); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:204:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(50000); data/mdk4-4.1+git20200420/src/attacks/ieee80211s.c:429:34: [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 *ieee80211s_name = malloc(strlen(IEEE80211S_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/probing.c:82: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). popt->ssid = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/probing.c:88: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). popt->filename = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/probing.c:103: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). popt->charsets = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/probing.c:109: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). popt->proceed = malloc(strlen(optarg) + 1); data/mdk4-4.1+git20200420/src/attacks/probing.c:180: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(ssid) == ssidlen) { data/mdk4-4.1+git20200420/src/attacks/probing.c:283: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). } while (strlen(filessid) != ssidlen); data/mdk4-4.1+git20200420/src/attacks/probing.c:288: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). if (ssidlen && popt->proceed && (ssidlen != strlen(popt->proceed))) { data/mdk4-4.1+git20200420/src/attacks/probing.c:390:31: [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 *probing_name = malloc(strlen(PROBING_NAME) + 1); data/mdk4-4.1+git20200420/src/attacks/wids.c:71: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(optarg) > 255) { data/mdk4-4.1+git20200420/src/attacks/wids.c:73:13: [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(optarg) > 32) { data/mdk4-4.1+git20200420/src/attacks/wids.c:76: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). wopt->target = malloc(strlen(optarg) + 1); strcpy(wopt->target, optarg); data/mdk4-4.1+git20200420/src/attacks/wids.c:319:28: [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 *wids_name = malloc(strlen(WIDS_NAME) + 1); data/mdk4-4.1+git20200420/src/brute.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). for(i=0; i<strlen(cls); i++) { data/mdk4-4.1+git20200420/src/brute.c:93: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). for (i=0; i<strlen(last); i++) { data/mdk4-4.1+git20200420/src/brute.c:101: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). for (ii=strlen(last)-1; ii>=0; ii--) { data/mdk4-4.1+git20200420/src/brute.c:104:31: [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 (nextclass == (cls + strlen(cls))) { data/mdk4-4.1+git20200420/src/channelhopper.c:396:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10); data/mdk4-4.1+git20200420/src/channelhopper.c:568:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(3000*1000); data/mdk4-4.1+git20200420/src/channelhopper.c:582:3: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(hopper_useconds); data/mdk4-4.1+git20200420/src/ghosting.c:39:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * ghosting_period); data/mdk4-4.1+git20200420/src/ghosting.c:56:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(1000 * ghosting_period); data/mdk4-4.1+git20200420/src/helpers.c:98:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(wait.tv_usec); data/mdk4-4.1+git20200420/src/helpers.c:134: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). if (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = 0x00; data/mdk4-4.1+git20200420/src/helpers.c:134:46: [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 (line[strlen(line) - 1] == '\n') line[strlen(line) - 1] = 0x00; data/mdk4-4.1+git20200420/src/helpers.c:140:10: [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). *len = strlen(in) / 2; data/mdk4-4.1+git20200420/src/linkedlist.c:163:27: [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). new_item->ssid = malloc(strlen(ssid) + 1); data/mdk4-4.1+git20200420/src/mdk3_old.c:550:16: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. if (usespeed) usleep(pps2usec(pps)); data/mdk4-4.1+git20200420/src/mdk4.c:143:7: [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(argv[2]) != 1){ data/mdk4-4.1+git20200420/src/mdk4.c:145: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(argv[3]) != 1){ data/mdk4-4.1+git20200420/src/osdep.c:43:29: [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). osdep_iface_in = malloc(strlen(interface1) + 1); data/mdk4-4.1+git20200420/src/osdep.c:46:27: [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). osdep_iface_out = malloc(strlen(interface2) + 1); data/mdk4-4.1+git20200420/src/osdep.c:90:4: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(10000); data/mdk4-4.1+git20200420/src/osdep.c:180:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, osdep_iface_out, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep.c:219:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, osdep_iface_in, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep.c:266:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, osdep_iface_out, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep.c:283:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wreq.ifr_name, osdep_iface_in, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:107: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). len = strlen(iface); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:293:7: [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(err)) data/mdk4-4.1+git20200420/src/osdep/airpcap.c:319:28: [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). iface = (char *)calloc(1, strlen(param) + 100); data/mdk4-4.1+git20200420/src/osdep/airpcap.c:324:7: [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(param) > 0) data/mdk4-4.1+git20200420/src/osdep/cygwin.c:80:20: [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). slen = strlen(String), data/mdk4-4.1+git20200420/src/osdep/cygwin.c:81:20: [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). plen = strlen(Pattern); data/mdk4-4.1+git20200420/src/osdep/cygwin.c:137: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(iface) == 0) data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:394:27: [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). (unsigned char *) m, strlen(m)+1) != ERROR_SUCCESS) data/mdk4-4.1+git20200420/src/osdep/cygwin_tap.c:434: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). strlen(str)+1) != ERROR_SUCCESS) data/mdk4-4.1+git20200420/src/osdep/darwin_tap.c:184:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ti_fd(ti), buf, len); data/mdk4-4.1+git20200420/src/osdep/file.c:58:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(pf->pf_fd, &pkh, sizeof(pkh)); data/mdk4-4.1+git20200420/src/osdep/file.c:69:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(pf->pf_fd, buf, pkh.caplen); data/mdk4-4.1+git20200420/src/osdep/file.c:246:12: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if ((rc = read(fd, &pfh, sizeof(pfh))) != sizeof(pfh)) data/mdk4-4.1+git20200420/src/osdep/freebsd.c:259:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pf->pf_totlen = read(pf->pf_fd, pf->pf_buf, sizeof(pf->pf_buf)); data/mdk4-4.1+git20200420/src/osdep/freebsd.c:348: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(iface) >= sizeof(ifr.ifr_name)) data/mdk4-4.1+git20200420/src/osdep/freebsd_tap.c:181:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ti_fd(ti), buf, len); data/mdk4-4.1+git20200420/src/osdep/linux.c:213: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). len = strlen( filename ); data/mdk4-4.1+git20200420/src/osdep/linux.c:214: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). lentot = strlen( dir ) + 256 + 2; data/mdk4-4.1+git20200420/src/osdep/linux.c:224: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). if ((int)strlen( ep->d_name) == len && !strcmp(ep->d_name, filename)) data/mdk4-4.1+git20200420/src/osdep/linux.c:393:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, dev->main_if, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:395:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:427:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, dev->main_if, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:429:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:464:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:482:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100000); data/mdk4-4.1+git20200420/src/osdep/linux.c:517:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, dev->main_if, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:519:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:544:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, dev->main_if, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:546:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:565:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, dev->main_if, sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:567:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:586:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, dev->main_if, sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:588:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:611:20: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if( ( caplen = read( dev->fd_in, tmpbuf, count ) ) < 0 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:905:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( 10000 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:922:13: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( 10000 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1117:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1125:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( 10000 ); /* madwifi needs a second chance */ data/mdk4-4.1+git20200420/src/osdep/linux.c:1172:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1180:9: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep( 10000 ); /* madwifi needs a second chance */ data/mdk4-4.1+git20200420/src/osdep/linux.c:1230:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1250:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, wi_get_ifname(wi), IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1355:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, iface, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1415:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, iface, sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1433:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr2.ifr_name, dev->main_if, sizeof( ifr2.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1444:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq2.ifr_name, dev->main_if, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1498:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( wrq.ifr_name, iface, IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1710: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(iface) == 5 && data/mdk4-4.1+git20200420/src/osdep/linux.c:1776: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( iface ) >= 4 || strlen( iface ) <= 6 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1776:35: [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( iface ) >= 4 || strlen( iface ) <= 6 ) data/mdk4-4.1+git20200420/src/osdep/linux.c:1904:39: [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). dev->main_if = (char*) malloc(strlen(iface)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:1905: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). memset(dev->main_if, 0, strlen(iface)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:1906:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dev->main_if, iface, strlen(iface)); data/mdk4-4.1+git20200420/src/osdep/linux.c:1906:38: [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). strncpy(dev->main_if, iface, strlen(iface)); data/mdk4-4.1+git20200420/src/osdep/linux.c:1908:29: [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). iface=(char*)malloc(strlen(buf)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:1910: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). memset(iface, 0, strlen(buf)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:1911:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(iface, buf, strlen(buf)); data/mdk4-4.1+git20200420/src/osdep/linux.c:1911:29: [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). strncpy(iface, buf, strlen(buf)); data/mdk4-4.1+git20200420/src/osdep/linux.c:1918:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, iface, sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:1956:59: [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). dev->main_if = (char*) malloc(strlen(this_iface->d_name)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:1982:63: [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). dev->main_if = (char*) malloc(strlen(this_iface->d_name)+1); data/mdk4-4.1+git20200420/src/osdep/linux.c:2110:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux.c:2143:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( ifr.ifr_name, wi_get_ifname(wi), sizeof( ifr.ifr_name ) - 1 ); data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:63:5: [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( if_request.ifr_name, "at%d", IFNAMSIZ ); data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:71:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy( priv->tl_name, if_request.ifr_name, MAX_IFACE_NAME ); data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:72:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(priv->tl_ifr.ifr_name, priv->tl_name, data/mdk4-4.1+git20200420/src/osdep/linux_tap.c:163:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ti_fd(ti), buf, len); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:243:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). pn->pn_totlen = read(pn->pn_fd, pn->pn_buf, sizeof(pn->pn_buf)); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:312: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(iface) >= sizeof(ifr.ifr_name)) data/mdk4-4.1+git20200420/src/osdep/netbsd.c:323:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:330:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:337:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifmr.ifm_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:354:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:360:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pn->pn_ireq.i_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:363:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pn->pn_ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd.c:385:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c:160:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifra.ifra_name, priv->tn_ifr.ifr_name, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/netbsd_tap.c:179:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ti_fd(ti), buf, len); data/mdk4-4.1+git20200420/src/osdep/network.c:106:5: [1] (obsolete) usleep: This C routine is considered obsolete (as opposed to the shell command by the same name). The interaction of this function with SIGALRM and other timer functions such as sleep(), alarm(), setitimer(), and nanosleep() is unspecified (CWE-676). Use nanosleep(2) or setitimer(2) instead. usleep(100); data/mdk4-4.1+git20200420/src/osdep/network.c:432: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). assert(strlen(host) <= 15); data/mdk4-4.1+git20200420/src/osdep/network.c:433:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ip, host, ipsize); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:242:19: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). po->po_totlen = read(po->po_fd, po->po_buf, sizeof(po->po_buf)); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:311: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(iface) >= sizeof(ifr.ifr_name)) data/mdk4-4.1+git20200420/src/osdep/openbsd.c:322:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:329:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:336:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifmr.ifm_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:353:9: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:359:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(po->po_ireq.i_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:362:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(po->po_ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd.c:384:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifr.ifr_name, iface, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c:160:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifra.ifra_name, priv->to_ifr.ifr_name, IFNAMSIZ); data/mdk4-4.1+git20200420/src/osdep/openbsd_tap.c:179:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). return read(ti_fd(ti), buf, len); data/mdk4-4.1+git20200420/src/osdep/osdep.c:167:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(wi->wi_interface, iface, sizeof(wi->wi_interface)-1); data/mdk4-4.1+git20200420/src/packet.c:138:37: [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). pkt->data[pkt->len+1] = (uint8_t) strlen(ssid); //SSID len data/mdk4-4.1+git20200420/src/packet.c:139:42: [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). memcpy(pkt->data + pkt->len + 2, ssid, strlen(ssid)); //Copy the SSID data/mdk4-4.1+git20200420/src/packet.c:141: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). pkt->len += strlen(ssid) + 2; data/mdk4-4.1+git20200420/src/test.c:55:12: [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(strlen(ssid[i]) > 0); data/mdk4-4.1+git20200420/src/test.c:56:12: [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(strlen(ssid[i]) < 33); data/mdk4-4.1+git20200420/src/test.c:134:108: [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). printf(" Searching \"%s\" in empty list: %X\n", tdata, (unsigned int) search_data(cl, (u_char *) tdata, strlen(tdata))); data/mdk4-4.1+git20200420/src/test.c:138:55: [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). cl = add_to_clist(cl, (u_char *) rdata, random(), strlen(rdata)+1); data/mdk4-4.1+git20200420/src/test.c:142:46: [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). cl = add_to_clist(cl, (u_char *) tdata, 0, strlen(tdata)+1); data/mdk4-4.1+git20200420/src/test.c:146:55: [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). cl = add_to_clist(cl, (u_char *) rdata, random(), strlen(rdata)+1); data/mdk4-4.1+git20200420/src/test.c:152:107: [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). printf(" Searching \"%s\" in full list: %X\n", tdata, (unsigned int) search_data(cl, (u_char *) tdata, strlen(tdata))); data/mdk4-4.1+git20200420/src/test.c:253: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). sl = strlen(word); ANALYSIS SUMMARY: Hits = 523 Lines analyzed = 19106 in approximately 0.51 seconds (37130 lines/second) Physical Source Lines of Code (SLOC) = 13637 Hits@level = [0] 460 [1] 168 [2] 205 [3] 71 [4] 79 [5] 0 Hits@level+ = [0+] 983 [1+] 523 [2+] 355 [3+] 150 [4+] 79 [5+] 0 Hits/KSLOC@level+ = [0+] 72.0833 [1+] 38.3515 [2+] 26.0321 [3+] 10.9995 [4+] 5.79306 [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.