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/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoe_clif.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_els.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_gs.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_ns.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_scsi.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_types.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoe_utils.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoemon_utils.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/fip.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/libopenfcoe.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/dcbnl.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/rtnetlink.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/types.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/rtnetlink.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/scsi_bsg_fc.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/scsi_netlink.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/scsi_netlink_fc.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/strarr.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_other.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_select.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_timer.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c Examining data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c FINAL RESULTS: data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:425:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, link, sizeof(link)); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:665:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, link, sizeof(link)); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:752:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, link, sizeof(link)); data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoemon_utils.h:133:9: [5] (buffer) gets: Does not check for buffer overflows (CWE-120, CWE-20). Use fgets() instead. #define gets DONT_USE_gets data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:55:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, link, sizeof(link)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:74:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, link, sizeof(link)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:251:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. err = readlink(path, buf, sizeof(buf) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:439:8: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, buf, sizeof(buf) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:460:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. ret = readlink(path, buf, sizeof(buf) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:58:7: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. rc = vprintf(format, ap); data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:72:7: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. rc = vprintf(format, ap); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:949:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(vlan_name, sizeof(vlan_name), FCOE_VLAN_FORMAT, data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1578:7: [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. If the scanf format is influenceable by an attacker, it's exploitable. rc = sscanf(ifname, FCOE_VID_SCAN_FORMAT, &vid); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1955:22: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (force_legacy || access(FCOE_BUS_CREATE, F_OK)) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3013:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/issue_lip", SYSFS_FCHOST, p->fchost); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3024:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/device/scsi_host/%s/scan", data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3824:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf+len, "%s%s", prefix, msg); data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:218:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. flen = vsnprintf(bp, len, format, arg); data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:490:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(hba_dir, sizeof(hba_dir), SYSFS_HBA_DIR "/%s", fp_hba); data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:989:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(bsg_dev, "/dev/bsg/%s", fp_dev); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:182:3: [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, "ERROR: " format); \ data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:188:4: [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("DEBUG: " format); \ data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:718:7: [4] (race) access: This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition (CWE-362/CWE-367!). Set up the correct permissions (e.g., using setuid()) and try to open the file directly. if (!access(FCOE_BUS_CREATE, F_OK)) { data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoe_utils.h:65:3: [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, "%s: " fmt, progname, ##args); \ data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoemon_utils.h:131: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). #define strcpy DONT_USE_strcpy data/fcoe-utils-1.0.32+git20190507.9834b34/include/fcoemon_utils.h:132:9: [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). #define strcat DONT_USE_strcat data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:61:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/symbolic_name", SYSFS_FCHOST, dname); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:118:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", SYSFS_NET, ifname); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:229:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", SYSFS_FCOE_BUS_DEVICES, dname); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:295:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s/%s", SYSFS_FCOE_BUS_DEVICES, ctlr, attr); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:73:9: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. flen = vsnprintf(bp, len, format, arg); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:147:2: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. vsnprintf(buf, sizeof(buf), format, arg); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:598:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/%s", SYSFS_NET_DIR, netdev); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:173:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(ctlr->path, sizeof(ctlr->path), data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:183:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(hpath, "%s/%.*s/", SYSFS_FCHOST, data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:245:9: [3] (buffer) getopt_long: 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. opt = getopt_long(argc, argv, optstring, fcoeadm_opts, NULL); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3605:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv("LISTEN_PID"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3618:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. env = getenv("LISTEN_FDS"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3703:14: [3] (buffer) getopt_long: 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 ((c = getopt_long(argc, argv, "fdhlsv", data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:374:16: [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, "?c:fi:h:qs:xF:P:N:")) != -1) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:442:16: [3] (buffer) getopt_long: 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_long(argc, argv, "", lopt, NULL)) != -1) { data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:528:7: [3] (buffer) getopt_long: 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. c = getopt_long(argc, argv, GETOPT_STR, long_options, NULL); data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:165: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 sense[96]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:271: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 name[255]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:310: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 name[255]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcnsq.c:427:12: [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). bsg_dev = open(bsg, O_RDWR); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoe_clif.h:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:55: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 progname[20]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:107: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 rbuf[MAX_MSGBUF]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:123:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). rc = atoi(rbuf); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:399: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). stat_interval = atoi(argv[optind]); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:424: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). stat_interval = atoi(argv[optind]); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:190: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 path[2048]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:244: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 vendor[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:245: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 model[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:246: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 rev[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:251: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:252: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 npath[2048]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:333: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 vendor[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:334: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:335: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 npath[2048]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:336: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 model[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:337: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 rev[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:417: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:418: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 link[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:564: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:574: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:653: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 link[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:654: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 ifname[32]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:742: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 link[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:814: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 temp[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:815: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 mac[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:842: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 temp[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:128: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 ifname[IFNAMSIZ]; /* netif on which fcoe i/f is created */ data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:129: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 real_ifname[IFNAMSIZ]; /* underlying net ifname - e.g. if ifname data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:146:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:151: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 fchost[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:152: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 ctlr[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:347: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 progname[20]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:367: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 tmp[CONFIG_MAX_VAL_LEN + 1]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:402: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[FILE_NAME_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:473: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(real_ifname, ifname, sep - ifname); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:479: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 file[80]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:481: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 val[CONFIG_MAX_VAL_LEN + 1]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:522:8: [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). fp = fopen(file, "r"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:704: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 host[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:934: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 real_name[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:935: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 vlan_name[IFNAMSIZ*2]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:966:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1001: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, ((struct fip_tlv_mac_addr *)tlv)->mac_addr, data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1302: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1384: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 old[32]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1385: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 new[32]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1588: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1589: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 real_dev[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1591:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1609: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, RTA_DATA(ap), ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1639: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(p->mac, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1661: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(p->mac, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1779: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2183: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[128]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2290: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2334: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[20]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2854: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 rbuf[MAX_MSGBUF]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2865:7: [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). fp = fopen(path, "w"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2950: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 path[MAX_PATH_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3091: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[80], params[30]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3394: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 fchost[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3495: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(&r->from, f, flen); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3510: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[MAX_MSGBUF], rbuf[MAX_MSGBUF]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3511: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 ifname[sizeof(data->ifname) + 1]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3829: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 msg[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3833:2: [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(msg, "0x%02x - ", errors); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.h:156:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifname[IFNAMSIZ]; /* Ethernet interface name */ data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:119: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 fp_dev[64]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:201: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 sa_buf[SA_LOG_BUF_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:250: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[SA_LOG_BUF_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:295: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 lbuf[120]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:468: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 hba_dir[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:587: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(&cdb.rqst_data.h_ct.preamble_word0, &ct.hdr, data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:627: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 response[32]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:828: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 sense[MAX_SENSE_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:870: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 msg[80]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:871: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 time_msg[80]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:984: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 bsg_dev[80]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:990: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). fp_fd = open(bsg_dev, O_RDWR); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:242: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 sense[96]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:300: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 rp_sysfs[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:306:6: [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(rp_sysfs, "ro"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:349: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 rp_sysfs[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:350: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 rp_state[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:359:6: [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(rp_sysfs, "ro"); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:406: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(rpi, &rpii, sizeof(rpii)); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:485:12: [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). bsg_dev = open(bsg_name, O_RDWR); data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:72: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 suffix[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:137: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:138:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac_addr[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:158:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac_addr[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:325: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(fcf->mac_addr, tlvs.mac->mac_addr, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:450: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(iff->mac_addr, RTA_DATA(ifla[IFLA_ADDRESS]), ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:602: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 vlan_name[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:680: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 fchost[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:681: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 ctlr[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_scsi.h:306: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 is_vendor_id[8]; /* ASCII T10 vendor identification */ data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_scsi.h:307: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 is_product[16]; /* ASCII product identification */ data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_scsi.h:308: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 is_rev_level[4]; /* ASCII revision level */ data/fcoe-utils-1.0.32+git20190507.9834b34/include/fc_scsi.h:309: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 is_vendor_spec[56 - 36]; /* vendor specific data */ data/fcoe-utils-1.0.32+git20190507.9834b34/include/fip.h:115:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mac_addr[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/fip.h:121: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 __resvd[3]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/fip.h:128: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 __resvd[2]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/fip.h:129: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 wwn[8]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/libopenfcoe.h:51: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 path[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/libopenfcoe.h:52: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/libopenfcoe.h:87: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 path[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/rtnetlink.h:638: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(skb_put(skb, attrlen), data, attrlen); }) data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h:54: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 net_data[3]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h:61: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 net_data[6]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h:69: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 net_data[2]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h:73: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 net_data[4]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/net_types.h:77: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 net_data[8]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:56: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_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:57:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char symbolic_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:58: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 node_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:59: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 port_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:60: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 fabric_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:61: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 speed[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:62: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 supported_speeds[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:63: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 maxframe_size[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:64: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 port_id[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:65: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 port_state[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:66: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 scsi_target_id[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:67: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 supported_classes[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:68: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 roles[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:72: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 manufacturer[64]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:73: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 serial_number[64]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:74: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 model_description[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:75: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 hardware_version[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char driver_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/include/sysfs_hba.h:77: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 driver_version[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:28:7: [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). fp = fopen(path, "r"); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:57:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:58: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 path[MAX_PATH_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:108: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 path[MAX_PATH_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:130: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 fchost[FCHOSTBUFLEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:203:7: [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). fp = fopen(path, "w"); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:226: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 path[MAX_PATH_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:293: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 path[MAX_PATH_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:108: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(mr.mr_address, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:127: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 smac[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:131: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(smac, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:165: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 smac[ETHER_ADDR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:166: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 dmac[ETHER_ADDR_LEN] = FIP_ALL_FCF_MACS; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:168: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(smac, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:172: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(eh->h_source, smac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:173: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(eh->h_dest, dmac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:181:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:300: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(tlvs.mac.mac_addr, eh.h_source, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:372: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(eh.h_source, mac, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:374: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(dsa.sll_addr, dest, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:375: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(eh.h_dest, dest, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:376: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(tlvs.mac.mac_addr, eh.h_source, ETHER_ADDR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fip.c:396:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:122: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[8192]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:175: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(RTA_DATA(rta), data, alen); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:197: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 attrbuf[RTA_SPACE(IFNAMSIZ)]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:245: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 attrbuf[RTA_SPACE(IFNAMSIZ)]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:293: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 attrbuf[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:345: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 attrbuf[RTA_SPACE(IFNAMSIZ)]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:410: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 ifname[IFNAMSIZ]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:444: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(vlan->ifname, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:469: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(ifname, vlan.ifname, IFNAMSIZ); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:486: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 attrbuf[1204]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:550: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(addr, NLA_DATA(rta) + ETH_ALEN, ETH_ALEN); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:56: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 sa_buf[SA_LOG_BUF_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:118: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[SA_LOG_BUF_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:144: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[SA_LOG_BUF_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:167: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 ctime_buf[30]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:34: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 file_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:39:7: [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). fp = fopen(file_name, "r"); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:75: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 file_name[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:79:7: [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). fp = fopen(file_name, "w"); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:97: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/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:122: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/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:144: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/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:50: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 link[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char link[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:237: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[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:425: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[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:442: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 realdev[256]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:491: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:527: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:561: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:594: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 path[1024]; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:614:14: [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). ctlr_num = atoi(&ctlr[sizeof("ctlr_") - 1]); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:79:15: [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). fcf->index = atoi(dp->d_name + sizeof("fcf_") - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:99: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[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:155: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[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:156: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 lesb_path[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:157: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 hpath[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:158: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 fchost[MAX_STR_LEN]; data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:177:16: [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). ctlr->index = atoi(dp->d_name + sizeof("ctlr_") - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:153: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). addrlen = sizeof(sa_family_t) + strlen(lp->sun_path + 1) + 1; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:164: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). addrlen = sizeof(sa_family_t) + strlen(clif_info->dest.sun_path + 1) + 1; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:189:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(data.ifname, ifname, sizeof(data.ifname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm.c:235:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(progname, basename(argv[0]), sizeof(progname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:103:45: [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 (!strncmp(rp_info->roles, FCP_TARG_STR, strlen(FCP_TARG_STR))) data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:270:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(path, "/device/", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:270:43: [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). strncat(path, "/device/", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:276:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(path, "block", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:276:40: [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). strncat(path, "block", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:352:2: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is low because the source is a constant string. strncat(path, "block", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:352:40: [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). strncat(path, "block", sizeof(path) - strlen(path) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:437: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(path) - strlen(substr); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:437:23: [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(path) - strlen(substr); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:545: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 (!strncmp(dp->d_name, "host", strlen("host"))) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:563: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). if (!strncmp(dp->d_name, "vport", strlen("vport"))) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoeadm_display.c:683:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifname, offs, i); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:381:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmp, s, len - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:382:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, tmp, len - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:504: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). strlen(CFG_FILE_PREFIX)); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:509: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). strlen(DEF_CFG_FILE))) data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:521: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). (int)(sizeof(file) - strlen(CONFIG_DIR) - 2), dp->d_name); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:833:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(fcm_fc_socket, buf, DEF_RX_BUF_SIZE); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1091:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifv.device1, vlan_ifname, sizeof(ifv.device1) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1094:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(real_ifname, ifv.u.device2, IFNAMSIZ - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1309: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). iflen = strlen(ff->ifname); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1325:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(msg.ifname, ff->ifname, iflen); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1574: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(ifname) <= strlen(FCOE_VLAN_SUFFIX) || data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1574: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). if (strlen(ifname) <= strlen(FCOE_VLAN_SUFFIX) || data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1575:21: [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). strcmp(&ifname[strlen(ifname) - strlen(FCOE_VLAN_SUFFIX)], data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1575: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). strcmp(&ifname[strlen(ifname) - strlen(FCOE_VLAN_SUFFIX)], data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1647: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(real_dev)) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1648:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p->real_ifname, real_dev, sizeof(p->real_ifname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1662:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(p->real_ifname, ifname, sizeof(p->real_ifname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:1791:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifname, NLA_DATA(rta_parent), sizeof(ifname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2070: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). addrlen = sizeof(sa_family_t) + strlen(dest.sun_path + 1) + 1; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2189:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). rc = read(clif->cl_fd, buf, sizeof(buf) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2194: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). len = strlen(buf); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2258: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(req); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:2687: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(resp); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3008: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(p->fchost) <= 0) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3019: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(p->fchost) <= 0) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3113: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). (u_int) strlen(ff->ifname), ff->ifname); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3123: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). (u_int) strlen(ff->ifname), ff->ifname, params); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3130: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). (u_int) strlen(ff->ifname), ff->ifname, ""); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3137: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). (u_int) strlen(ff->ifname), ff->ifname, ""); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3144: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). (u_int) strlen(ff->ifname), ff->ifname, ""); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3151: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). (u_int) strlen(ff->ifname), ff->ifname, ""); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3158: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). (u_int) strlen(ff->ifname), ff->ifname, ""); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3359: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(p->real_ifname)) data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3542:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ifname, data->ifname, sizeof(ifname)); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3582: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). sendto(snum, rbuf, strlen(rbuf), 0, (struct sockaddr *)&from, data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3660: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). addrlen = sizeof(sa_family_t) + strlen(addr.sun_path + 1) + 1; data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3697:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(progname, basename(argv[0]), sizeof(progname) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3732:2: [1] (access) umask: Ensure that umask is given most restrictive possible setting (e.g., 066 or 077) (CWE-732). umask(0); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3821: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). size_t len = strlen(buf); data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3823: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). if (len + strlen(msg) + strlen(prefix) < maxlen) data/fcoe-utils-1.0.32+git20190507.9834b34/fcoemon.c:3823: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). if (len + strlen(msg) + strlen(prefix) < maxlen) data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:207: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(format); data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:494: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). (void) strtoul(fp_hba + strlen("host"), &endptr, 10); data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:499: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(fp_hba) == strlen("xx:yy:aa:bb:cc:dd:ee:ff")) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:499:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(fp_hba) == strlen("xx:yy:aa:bb:cc:dd:ee:ff")) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:507: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). } else if (strlen(fp_hba) == strlen("aa:bb:cc:dd:ee:ff")) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:507: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). } else if (strlen(fp_hba) == strlen("aa:bb:cc:dd:ee:ff")) { data/fcoe-utils-1.0.32+git20190507.9834b34/fcping.c:973: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(fp_interval * 1000); data/fcoe-utils-1.0.32+git20190507.9834b34/fcrls.c:369: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). if (strncmp(rp_state, RPORT_ONLINE, strlen(RPORT_ONLINE))) { data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:451:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(iff->ifname, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:545: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 (optarg && strlen(optarg)) { data/fcoe-utils-1.0.32+git20190507.9834b34/fipvlan.c:546:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(config.suffix, optarg, 255); data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/rtnetlink.h:614: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). int len = strlen(str) + 1; data/fcoe-utils-1.0.32+git20190507.9834b34/include/linux/rtnetlink.h:668: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). RTA_PUT(skb, attrtype, strlen(value) + 1, value) data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:39: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). for (i = 0; i < strlen(buf); i++) { data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:84:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fchost, namelist[n]->d_name, data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:111: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(ifname)) data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:167:21: [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 (!last_space || strlen(last_space) == 1) data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:192: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). if (symb && !strncmp(ifname, symb, strlen(symb))) data/fcoe-utils-1.0.32+git20190507.9834b34/lib/fcoe_utils.c:268:6: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctlr, namelist[n]->d_name, data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:213:44: [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). add_rtattr(&req.nh, IFLA_IFNAME, ifname, strlen(ifname)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:261:44: [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). add_rtattr(&req.nh, IFLA_IFNAME, ifname, strlen(ifname)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:306:41: [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). add_rtattr(&req.nh, IFLA_IFNAME, name, strlen(name)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:308: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). add_rtattr(&req.nh, IFLA_INFO_KIND, "vlan", strlen("vlan")); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:363: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). add_rtattr(&req.nh, IFLA_IFNAME, name, strlen(name)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:381:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, RTA_DATA(ifla[IFLA_IFNAME]), IFNAMSIZ); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/rtnetlink.c:507:50: [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). add_rtattr(nh, DCB_ATTR_IFNAME, (void *)ifname, strlen(ifname) + 1); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_log.c:62: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(format); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sa_sys.c:55: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). cp = buf + strlen(buf); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:62: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). host[strlen(host) - strlen(rport) - 1] = '\0'; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:62: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). host[strlen(host) - strlen(rport) - 1] = '\0'; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:81: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). rport[strlen(rport) - strlen(target) - 1] = '\0'; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:81: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). rport[strlen(rport) - strlen(target) - 1] = '\0'; data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:217:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(info->manufacturer, vname, sizeof(info->manufacturer)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:223:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(info->model_description, dname, data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:241:2: [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(info->driver_name, "Unknown", sizeof(info->driver_name)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:242:2: [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(info->driver_version, "Unknown", sizeof(info->driver_version)); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:259:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(info->driver_name, data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:260: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). strstr(buf, "module") + strlen("module") + 1, data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:320:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pa->device_name, rport, sizeof(pa->device_name) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:397:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(pa->device_name, host, sizeof(pa->device_name) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:450: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). len = strlen(netdev) - strlen(subif); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:450: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). len = strlen(netdev) - strlen(subif); data/fcoe-utils-1.0.32+git20190507.9834b34/lib/sysfs_hba.c:451:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(realdev, netdev, sizeof(realdev) - 1); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:46: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(src) != MAC_ADDR_STRLEN) data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:144:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(fchost, dp->d_name, MAX_STR_LEN); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:184: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). (int)(sizeof(hpath) - strlen(SYSFS_FCHOST) - 3), fchost); data/fcoe-utils-1.0.32+git20190507.9834b34/libopenfcoe.c:194:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ctlr->ifname, ifname, IFNAMSIZ-1); ANALYSIS SUMMARY: Hits = 345 Lines analyzed = 17145 in approximately 0.47 seconds (36868 lines/second) Physical Source Lines of Code (SLOC) = 11945 Hits@level = [0] 230 [1] 104 [2] 199 [3] 7 [4] 26 [5] 9 Hits@level+ = [0+] 575 [1+] 345 [2+] 241 [3+] 42 [4+] 35 [5+] 9 Hits/KSLOC@level+ = [0+] 48.1373 [1+] 28.8824 [2+] 20.1758 [3+] 3.51612 [4+] 2.9301 [5+] 0.753453 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.