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/libpam-abl-0.6.0/config.c Examining data/libpam-abl-0.6.0/config.h Examining data/libpam-abl-0.6.0/dbfun.c Examining data/libpam-abl-0.6.0/dbfun.h Examining data/libpam-abl-0.6.0/log.c Examining data/libpam-abl-0.6.0/log.h Examining data/libpam-abl-0.6.0/pam_abl.c Examining data/libpam-abl-0.6.0/pam_abl.h Examining data/libpam-abl-0.6.0/pam_functions.c Examining data/libpam-abl-0.6.0/rule.c Examining data/libpam-abl-0.6.0/rule.h Examining data/libpam-abl-0.6.0/test.c Examining data/libpam-abl-0.6.0/test.h Examining data/libpam-abl-0.6.0/test_abl.c Examining data/libpam-abl-0.6.0/test_config.c Examining data/libpam-abl-0.6.0/test_db.c Examining data/libpam-abl-0.6.0/test_rule.c Examining data/libpam-abl-0.6.0/test_types.c Examining data/libpam-abl-0.6.0/tools.c Examining data/libpam-abl-0.6.0/typefun.c Examining data/libpam-abl-0.6.0/typefun.h FINAL RESULTS: data/libpam-abl-0.6.0/log.c:48:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/libpam-abl-0.6.0/log.c:81:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/libpam-abl-0.6.0/log.c:97:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/libpam-abl-0.6.0/log.c:113:5: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/libpam-abl-0.6.0/log.c:130:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, ap); data/libpam-abl-0.6.0/pam_abl.c:151:22: [4] (shell) execv: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. int result = execv(arg[0], arg); data/libpam-abl-0.6.0/test_types.c:46:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bufferPtr, user); data/libpam-abl-0.6.0/test_types.c:49:5: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(bufferPtr, service); data/libpam-abl-0.6.0/tools.c:95:9: [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. vprintf(msg, ap); data/libpam-abl-0.6.0/tools.c:137:5: [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(PAD PAD "%ld/%02ld:%02ld:%02ld\n", days, hours, minutes, seconds); data/libpam-abl-0.6.0/tools.c:152:17: [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(PAD PAD "Blocked based on rule ["); data/libpam-abl-0.6.0/tools.c:172:9: [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(PAD PAD "Not blocking\n"); data/libpam-abl-0.6.0/tools.c:250:9: [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(PAD "%s (%u)\n", buf, getNofAttempts(state)); data/libpam-abl-0.6.0/tools.c:276:21: [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(PAD PAD "%s" PAD PAD "%s" PAD PAD "%s" PAD PAD "%s", attempt.m_service, attempt.m_userOrHost, reason, ctime(&attempt.m_time)); data/libpam-abl-0.6.0/tools.c:758:13: [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, "hdrvpufwcU:H:s:R:", data/libpam-abl-0.6.0/config.c:253: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(str + 1, s, l + 1); data/libpam-abl-0.6.0/config.c:270:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (r.f = fopen(name, "r"), NULL == r.f) { data/libpam-abl-0.6.0/dbfun.c:30: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 largeBuffer[1024*50]; data/libpam-abl-0.6.0/dbfun.c:42:23: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((ret = dbenv->open(dbenv, home, DB_CREATE | DB_INIT_TXN | DB_INIT_LOCK | DB_INIT_MPOOL | DB_RECOVER | DB_REGISTER, 0)) != 0) { data/libpam-abl-0.6.0/dbfun.c:144:26: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((err = dbHandle->open(dbHandle, tid, dbfile, dbname, DB_BTREE, DB_CREATE, DBPERM)) != 0) { data/libpam-abl-0.6.0/pam_abl.c:103:25: [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(result+outputIndex,info->user, user_sz); data/libpam-abl-0.6.0/pam_abl.c:108:25: [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(result+outputIndex,info->host, host_sz); data/libpam-abl-0.6.0/pam_abl.c:113:25: [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(result+outputIndex,info->service, service_sz); data/libpam-abl-0.6.0/test.c:90:28: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). int exitCode = atoi(argv[2]); data/libpam-abl-0.6.0/test_abl.c:234:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:235:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:236:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:324:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:325:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:326:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hostBuffer[100]; data/libpam-abl-0.6.0/test_abl.c:538:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_abl.c:581:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_abl.c:625:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_abl.c:847:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[10]; data/libpam-abl-0.6.0/test_abl.c:901: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. const char *expected[5]; data/libpam-abl-0.6.0/test_types.c:89:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:90:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:91:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:98:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:99:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:125:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:126:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:135:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:136:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:137:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:144:9: [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(&userBuffer[0], "User2_%d", counter); data/libpam-abl-0.6.0/test_types.c:145:9: [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(&serviceBuffer[0], "Service2_%d", counter); data/libpam-abl-0.6.0/test_types.c:170:9: [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(&userBuffer[0], "User2_%d", counter); data/libpam-abl-0.6.0/test_types.c:171:9: [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(&serviceBuffer[0], "Service2_%d", counter); data/libpam-abl-0.6.0/test_types.c:184:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_types.c:246:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_types.c:262:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_types.c:294:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:295:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:296:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:301:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[100]; data/libpam-abl-0.6.0/test_types.c:311:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:312:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:334:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_types.c:370:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:371:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:372:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:379:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:380:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:408:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:409:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:416:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:417:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:418:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:425:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:426:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:454:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:455:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:462:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:463:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:464:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:471:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:472:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:500:5: [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(&userBuffer[0], "User_%d", 9); data/libpam-abl-0.6.0/test_types.c:501:5: [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(&serviceBuffer[0], "Service_%d", 9); data/libpam-abl-0.6.0/test_types.c:507:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[100]; data/libpam-abl-0.6.0/test_types.c:533:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[1024]; data/libpam-abl-0.6.0/test_types.c:534:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:535:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:542:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:543:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:580:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:581:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:589:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:590:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:619:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:620:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:631:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:632:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:649:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&userBuffer[0], "User_%d", start); data/libpam-abl-0.6.0/test_types.c:665:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:666:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:677:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:678:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:695:17: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&userBuffer[0], "User_%d", start); data/libpam-abl-0.6.0/test_types.c:711:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char userBuffer[100]; data/libpam-abl-0.6.0/test_types.c:712:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char serviceBuffer[100]; data/libpam-abl-0.6.0/test_types.c:722:9: [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(&userBuffer[0], "User_%d", counter); data/libpam-abl-0.6.0/test_types.c:723:9: [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(&serviceBuffer[0], "Service_%d", counter); data/libpam-abl-0.6.0/test_types.c:743:21: [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(&userBuffer[0], "User_%d", start); data/libpam-abl-0.6.0/tools.c:47: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 *users[MAXNAMES]; data/libpam-abl-0.6.0/tools.c:48: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 *hosts[MAXNAMES]; data/libpam-abl-0.6.0/tools.c:248:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, key.data, key.size); data/libpam-abl-0.6.0/tools.c:380:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, key.data, key.size); data/libpam-abl-0.6.0/tools.c:495:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, key.data, key.size); data/libpam-abl-0.6.0/tools.c:628:17: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, key.data, key.size); data/libpam-abl-0.6.0/typefun.c:86: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(allocatedData, data, size); data/libpam-abl-0.6.0/typefun.c:265: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(bufferPtr, userOrHost, userOrHostSize); data/libpam-abl-0.6.0/typefun.c:268: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(bufferPtr, service, serviceSize); data/libpam-abl-0.6.0/config.c:38:19: [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). return len == strlen(pattern) && memcmp(pattern, target, len) == 0; data/libpam-abl-0.6.0/config.c:208:37: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r->lc = (nc == EOF) ? EOF : getc(r->f); data/libpam-abl-0.6.0/config.c:214:17: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r->lc = getc(r->f); data/libpam-abl-0.6.0/config.c:251: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). int l = strlen(s); data/libpam-abl-0.6.0/config.c:275:12: [1] (buffer) getc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). r.lc = getc(r.f); data/libpam-abl-0.6.0/dbfun.c:190:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key.size = strlen(hostOrUser); data/libpam-abl-0.6.0/dbfun.c:237:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key.size = strlen(hostOrUser); data/libpam-abl-0.6.0/dbfun.c:252:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key.size = strlen(hostOrUser); data/libpam-abl-0.6.0/pam_abl.c:88:19: [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_sz = strlen(info->host); data/libpam-abl-0.6.0/pam_abl.c:90:19: [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). user_sz = strlen(info->user); data/libpam-abl-0.6.0/pam_abl.c:92: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). service_sz = strlen(info->service); data/libpam-abl-0.6.0/pam_abl.c:539: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). size_t subjLen = strlen(subject); data/libpam-abl-0.6.0/pam_abl.c:565: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). size_t len = strlen(begin); data/libpam-abl-0.6.0/rule.c:108: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). return (len == strlen(pattern)) && (memcmp(pattern, target, len) == 0); data/libpam-abl-0.6.0/test.c:34: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). size_t dirNameSize = strlen(dirname); data/libpam-abl-0.6.0/test.c:57:47: [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 neededSize = dirNameSize + strlen(entry->d_name) + 2; data/libpam-abl-0.6.0/test_abl.c:550: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). size_t strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:594: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). size_t strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:599:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:604:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:609:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:619: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 (parseIP(invalidIps[x], strlen(invalidIps[x]), &netmask, &parsedIp) == 0) data/libpam-abl-0.6.0/test_abl.c:631: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). size_t strLen = strlen(&buffer[0]); data/libpam-abl-0.6.0/test_abl.c:661:47: [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 (parseIP(invalidIpsWithNetmask[x], strlen(invalidIpsWithNetmask[x]), &netmask, &parsedIp) == 0) data/libpam-abl-0.6.0/test_abl.c:760:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (resultSize != (int)(strlen(result)+1)) { data/libpam-abl-0.6.0/test_abl.c:769:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (resultSize != (int)(strlen(result)+1)) { data/libpam-abl-0.6.0/test_types.c:47: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). bufferPtr += strlen(user) + 1; data/libpam-abl-0.6.0/test_types.c:50: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). bufferPtr += strlen(service) + 1; data/libpam-abl-0.6.0/typefun.c:240:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t userOrHostSize = strlen(userOrHost) + 1; data/libpam-abl-0.6.0/typefun.c:241: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). size_t serviceSize = strlen(service) + 1; ANALYSIS SUMMARY: Hits = 144 Lines analyzed = 6305 in approximately 0.27 seconds (23260 lines/second) Physical Source Lines of Code (SLOC) = 4757 Hits@level = [0] 387 [1] 30 [2] 99 [3] 1 [4] 14 [5] 0 Hits@level+ = [0+] 531 [1+] 144 [2+] 114 [3+] 15 [4+] 14 [5+] 0 Hits/KSLOC@level+ = [0+] 111.625 [1+] 30.2712 [2+] 23.9647 [3+] 3.15325 [4+] 2.94303 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.