shadow-utils-4.19.3-2.fc45
List of Findings
Error: COMPILER_WARNING (CWE-252): [#def1]
shadow-4.19.3/lib/audit_help.c: scope_hint: In function 'audit_logger'
shadow-4.19.3/lib/audit_help.c:71:17: warning[-Wunused-result]: ignoring return value of 'audit_log_acct_message' declared with attribute 'warn_unused_result'
Error: COMPILER_WARNING (CWE-252): [#def2]
shadow-4.19.3/lib/audit_help.c: scope_hint: In function 'audit_logger_with_group'
shadow-4.19.3/lib/audit_help.c:113:9: warning[-Wunused-result]: ignoring return value of 'audit_log_acct_message' declared with attribute 'warn_unused_result'
Error: COMPILER_WARNING (CWE-252): [#def3]
shadow-4.19.3/lib/audit_help.c: scope_hint: In function 'audit_logger_message'
shadow-4.19.3/lib/audit_help.c:122:17: warning[-Wunused-result]: ignoring return value of 'audit_log_user_message' declared with attribute 'warn_unused_result'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
shadow-4.19.3/lib/copydir.c:233:22: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, 1, 40)'
shadow-4.19.3/lib/copydir.c:871:5: enter_function: entry to 'copy_tree'
shadow-4.19.3/lib/copydir.c:887:16: call_function: calling 'copy_tree_impl' from 'copy_tree'
Error: CPPCHECK_WARNING (CWE-476): [#def5]
shadow-4.19.3/lib/env.c:92: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: newstring
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
shadow-4.19.3/lib/exit_if_null.h:41:12: warning[-Wanalyzer-malloc-leak]: leak of ‘reallocarray(0, n_args + 3, 8)’
shadow-4.19.3/src/su.c:236:13: enter_function: entry to ‘execve_shell’
shadow-4.19.3/src/su.c:244:12: branch_true: following ‘true’ branch...
shadow-4.19.3/src/su.c:244:12: branch_true: ...to here
shadow-4.19.3/src/su.c:254:25: call_function: inlined call to ‘mallocarray’ from ‘execve_shell’
shadow-4.19.3/src/su.c:254:25: call_function: inlined call to ‘exit_if_null_’ from ‘execve_shell’
shadow-4.19.3/src/su.c:255:17: branch_false: ...to here
shadow-4.19.3/src/su.c:257:28: call_function: inlined call to ‘exit_if_null_’ from ‘execve_shell’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
shadow-4.19.3/lib/fd.c:39:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/null", 2)'
shadow-4.19.3/lib/fd.c:38:19: acquire_resource: opened here
shadow-4.19.3/lib/fd.c:39:12: danger: 'open("/dev/null", 2)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-122): [#def8]
shadow-4.19.3/lib/find_new_gid.c:128:34: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
shadow-4.19.3/lib/find_new_gid.c:157:5: enter_function: entry to 'find_new_gid'
shadow-4.19.3/lib/find_new_gid.c:169:9: branch_true: following 'true' branch (when 'gid' is non-NULL)...
shadow-4.19.3/lib/find_new_gid.c:175:18: branch_true: ...to here
shadow-4.19.3/lib/find_new_gid.c:175:18: call_function: calling 'get_ranges' from 'find_new_gid'
shadow-4.19.3/lib/find_new_gid.c:175:18: return_function: returning to 'find_new_gid' from 'get_ranges'
shadow-4.19.3/lib/find_new_gid.c:176:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_gid.c:181:12: branch_false: ...to here
shadow-4.19.3/lib/find_new_gid.c:239:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_gid.c:247:16: branch_false: ...to here
shadow-4.19.3/lib/find_new_gid.c:250:16: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_gid.c:275:12: branch_false: ...to here
shadow-4.19.3/lib/find_new_gid.c:275:12: branch_true: following 'true' branch (when 'sys_group != 0')...
shadow-4.19.3/lib/find_new_gid.c:285:20: branch_true: ...to here
shadow-4.19.3/lib/find_new_gid.c:301:41: branch_true: following 'true' branch (when 'id >= highest_found')...
shadow-4.19.3/lib/find_new_gid.c:302:34: branch_true: ...to here
shadow-4.19.3/lib/find_new_gid.c:303:28: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_gid.c:308:36: branch_false: ...to here
shadow-4.19.3/lib/find_new_gid.c:308:35: branch_true: following 'true' branch...
shadow-4.19.3/lib/find_new_gid.c:301:56: branch_true: ...to here
shadow-4.19.3/lib/find_new_gid.c:301:41: branch_true: following 'true' branch (when 'id >= highest_found')...
shadow-4.19.3/lib/find_new_gid.c:302:34: branch_true: ...to here
shadow-4.19.3/lib/find_new_gid.c:302:34: call_function: calling 'check_gid' from 'find_new_gid'
Error: GCC_ANALYZER_WARNING (CWE-122): [#def9]
shadow-4.19.3/lib/find_new_uid.c:127:34: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
shadow-4.19.3/lib/find_new_uid.c:156:5: enter_function: entry to 'find_new_uid'
shadow-4.19.3/lib/find_new_uid.c:168:9: branch_true: following 'true' branch (when 'uid' is non-NULL)...
shadow-4.19.3/lib/find_new_uid.c:174:18: branch_true: ...to here
shadow-4.19.3/lib/find_new_uid.c:174:18: call_function: calling 'get_ranges' from 'find_new_uid'
shadow-4.19.3/lib/find_new_uid.c:174:18: return_function: returning to 'find_new_uid' from 'get_ranges'
shadow-4.19.3/lib/find_new_uid.c:175:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_uid.c:180:12: branch_false: ...to here
shadow-4.19.3/lib/find_new_uid.c:238:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_uid.c:246:16: branch_false: ...to here
shadow-4.19.3/lib/find_new_uid.c:249:16: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_uid.c:274:12: branch_false: ...to here
shadow-4.19.3/lib/find_new_uid.c:274:12: branch_true: following 'true' branch (when 'sys_user != 0')...
shadow-4.19.3/lib/find_new_uid.c:284:20: branch_true: ...to here
shadow-4.19.3/lib/find_new_uid.c:300:41: branch_true: following 'true' branch (when 'id >= highest_found')...
shadow-4.19.3/lib/find_new_uid.c:301:34: branch_true: ...to here
shadow-4.19.3/lib/find_new_uid.c:302:28: branch_false: following 'false' branch...
shadow-4.19.3/lib/find_new_uid.c:307:36: branch_false: ...to here
shadow-4.19.3/lib/find_new_uid.c:307:35: branch_true: following 'true' branch...
shadow-4.19.3/lib/find_new_uid.c:300:56: branch_true: ...to here
shadow-4.19.3/lib/find_new_uid.c:300:41: branch_true: following 'true' branch (when 'id >= highest_found')...
shadow-4.19.3/lib/find_new_uid.c:301:34: branch_true: ...to here
shadow-4.19.3/lib/find_new_uid.c:301:34: call_function: calling 'check_uid' from 'find_new_uid'
Error: CPPCHECK_WARNING (CWE-457): [#def10]
shadow-4.19.3/lib/getdef.c:264: error[uninitvar]: Uninitialized variable: val
Error: CPPCHECK_WARNING (CWE-457): [#def11]
shadow-4.19.3/lib/getdef.c:298: error[uninitvar]: Uninitialized variable: val
Error: CPPCHECK_WARNING (CWE-457): [#def12]
shadow-4.19.3/lib/getdef.c:331: error[uninitvar]: Uninitialized variable: val
Error: CPPCHECK_WARNING (CWE-457): [#def13]
shadow-4.19.3/lib/getdef.c:363: error[uninitvar]: Uninitialized variable: val
Error: COMPILER_WARNING (CWE-477): [#def14]
shadow-4.19.3/lib/getdef.c: scope_hint: In function 'def_load'
shadow-4.19.3/lib/getdef.c:486:9: warning[-Wdeprecated-declarations]: 'econf_readDirs' is deprecated: Use the econf_readConfig/econf_readConfigWithCallback instead
shadow-4.19.3/lib/getdef.c:22: included_from: Included from here.
/usr/include/libeconf.h:497:1: note: declared here
Error: COMPILER_WARNING (CWE-477): [#def15]
shadow-4.19.3/lib/getdef.c:486:9: warning[-Wdeprecated-declarations]: 'econf_readDirs' is deprecated: Use the econf_readConfig/econf_readConfigWithCallback instead
Error: CPPCHECK_WARNING (CWE-457): [#def16]
shadow-4.19.3/lib/gettime.c:47: error[uninitvar]: Uninitialized variable: epoch
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
shadow-4.19.3/lib/groupio.c:352:40: warning[-Wanalyzer-malloc-leak]: leak of 'calloc(members + 1, 8)'
shadow-4.19.3/lib/groupio.c:315:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:320:9: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:322:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:328:20: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:329:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:329:12: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:347:23: acquire_memory: allocated here
shadow-4.19.3/lib/groupio.c:348:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:348:12: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:352:19: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:352:19: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:358:19: branch_false: following 'false' branch...
shadow-4.19.3/lib/groupio.c:373:9: branch_false: ...to here
shadow-4.19.3/lib/groupio.c:352:40: danger: 'calloc(members + 1, 8)' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
shadow-4.19.3/lib/list.c:64:25: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, (long unsigned int)(i + 2), 8)'
shadow-4.19.3/lib/list.c:32:1: enter_function: entry to 'add_list'
shadow-4.19.3/lib/list.c:37:9: branch_true: following 'true' branch (when 'member' is non-NULL)...
shadow-4.19.3/lib/list.c:38:9: branch_true: ...to here
shadow-4.19.3/lib/list.c:38:9: branch_true: following 'true' branch (when 'list' is non-NULL)...
shadow-4.19.3/lib/list.c:38:9: branch_true: ...to here
shadow-4.19.3/lib/list.c:56:15: call_function: inlined call to 'mallocarray' from 'add_list'
shadow-4.19.3/lib/list.c:56:15: call_function: inlined call to 'exit_if_null_' from 'add_list'
shadow-4.19.3/lib/list.c:64:21: branch_false: following 'false' branch...
shadow-4.19.3/lib/list.c:68:18: branch_false: ...to here
shadow-4.19.3/lib/list.c:64:25: danger: 'reallocarray(0, (long unsigned int)(i + 2), 8)' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
shadow-4.19.3/lib/list.c:150:24: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, (long unsigned int)(i + 1), 8)'
shadow-4.19.3/lib/list.c:138:1: enter_function: entry to 'dup_list'
shadow-4.19.3/lib/list.c:143:9: branch_true: following 'true' branch (when 'list' is non-NULL)...
shadow-4.19.3/lib/list.c:143:9: branch_true: ...to here
shadow-4.19.3/lib/list.c:147:15: call_function: inlined call to 'mallocarray' from 'dup_list'
shadow-4.19.3/lib/list.c:147:15: call_function: inlined call to 'exit_if_null_' from 'dup_list'
shadow-4.19.3/lib/list.c:150:16: branch_true: following 'true' branch...
shadow-4.19.3/lib/list.c:151:26: branch_true: ...to here
shadow-4.19.3/lib/list.c:150:24: danger: 'reallocarray(0, (long unsigned int)(i + 1), 8)' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: COMPILER_WARNING (CWE-563): [#def20]
shadow-4.19.3/lib/commonio.c:30: included_from: Included from here.
shadow-4.19.3/lib/commonio.c: scope_hint: In function 'dec_lock_count'
shadow-4.19.3/lib/nscd.h:10:35: warning[-Wunused-value]: statement with no effect
shadow-4.19.3/lib/commonio.c:457:33: note: in expansion of macro 'nscd_flush_cache'
Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
shadow-4.19.3/lib/readpassphrase.c:93:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/tty", 2)'
shadow-4.19.3/lib/readpassphrase.c:63:12: branch_false: following 'false' branch (when 'bufsiz != 0')...
shadow-4.19.3/lib/readpassphrase.c:63:12: branch_false: ...to here
shadow-4.19.3/lib/readpassphrase.c:69:21: branch_true: following 'true' branch (when 'i != 65')...
shadow-4.19.3/lib/readpassphrase.c:70:17: branch_true: ...to here
shadow-4.19.3/lib/readpassphrase.c:78:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/readpassphrase.c:79:31: branch_false: ...to here
shadow-4.19.3/lib/readpassphrase.c:79:31: acquire_resource: opened here
shadow-4.19.3/lib/readpassphrase.c:78:13: branch_false: following 'false' branch...
shadow-4.19.3/lib/readpassphrase.c:93:12: branch_false: ...to here
shadow-4.19.3/lib/readpassphrase.c:93:12: danger: 'open("/dev/tty", 2)' leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: COMPILER_WARNING (CWE-252): [#def22]
shadow-4.19.3/lib/readpassphrase.c: scope_hint: In function 'readpassphrase'
shadow-4.19.3/lib/readpassphrase.c:128:23: warning[-Wunused-result]: ignoring return value of 'write' declared with attribute 'warn_unused_result'
Error: COMPILER_WARNING (CWE-252): [#def23]
shadow-4.19.3/lib/readpassphrase.c:147:23: warning[-Wunused-result]: ignoring return value of 'write' declared with attribute 'warn_unused_result'
Error: CPPCHECK_WARNING (CWE-476): [#def24]
shadow-4.19.3/lib/string/strcmp/streq.h:27: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s1
Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
shadow-4.19.3/lib/string/strtok/stpsep.h:30:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(default_file, "r")’
shadow-4.19.3/src/useradd.c:2463:5: enter_function: entry to ‘main’
shadow-4.19.3/src/useradd.c:2498:23: call_function: inlined call to ‘exit_if_null_’ from ‘main’
shadow-4.19.3/src/useradd.c:2498:9: branch_false: ...to here
shadow-4.19.3/src/useradd.c:2510:9: call_function: calling ‘get_defaults’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
shadow-4.19.3/lib/string/strtok/stpsep.h:30:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(default_file, "r")’
shadow-4.19.3/src/useradd.c:2463:5: enter_function: entry to ‘main’
shadow-4.19.3/src/useradd.c:2498:23: call_function: inlined call to ‘exit_if_null_’ from ‘main’
shadow-4.19.3/src/useradd.c:2498:9: branch_false: ...to here
shadow-4.19.3/src/useradd.c:2510:9: call_function: calling ‘get_defaults’ from ‘main’
Error: CPPCHECK_WARNING (CWE-457): [#def27]
shadow-4.19.3/lib/strtoday.c:38: error[uninitvar]: Uninitialized variable: d
Error: GCC_ANALYZER_WARNING (CWE-775): [#def28]
shadow-4.19.3/lib/sulog.c:59:13: warning[-Wanalyzer-file-leak]: leak of FILE 'fopen(getdef_str("SULOG_FILE"), "a+")'
shadow-4.19.3/lib/sulog.c:35:17: branch_false: following 'false' branch (when 'saved_locale' is NULL)...
shadow-4.19.3/lib/sulog.c:42:22: branch_false: ...to here
shadow-4.19.3/lib/sulog.c:43:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/sulog.c:47:18: branch_false: ...to here
shadow-4.19.3/lib/sulog.c:57:14: acquire_resource: opened here
shadow-4.19.3/lib/sulog.c:59:12: branch_true: following 'true' branch (when 'oldgid != 0')...
shadow-4.19.3/lib/sulog.c:59:31: branch_true: ...to here
shadow-4.19.3/lib/sulog.c:59:13: danger: 'fopen(getdef_str("SULOG_FILE"), "a+")' leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
shadow-4.19.3/lib/sulog.c:59:13: warning[-Wanalyzer-malloc-leak]: leak of 'fopen(getdef_str("SULOG_FILE"), "a+")'
shadow-4.19.3/lib/sulog.c:35:17: branch_false: following 'false' branch (when 'saved_locale' is NULL)...
shadow-4.19.3/lib/sulog.c:42:22: branch_false: ...to here
shadow-4.19.3/lib/sulog.c:43:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/sulog.c:47:18: branch_false: ...to here
shadow-4.19.3/lib/sulog.c:57:14: acquire_memory: allocated here
shadow-4.19.3/lib/sulog.c:59:12: branch_true: following 'true' branch (when 'oldgid != 0')...
shadow-4.19.3/lib/sulog.c:59:31: branch_true: ...to here
shadow-4.19.3/lib/sulog.c:59:13: danger: 'fopen(getdef_str("SULOG_FILE"), "a+")' leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, 1, 32)'
shadow-4.19.3/lib/xgetXXbyYY.c:49:35: enter_function: entry to 'xgetgrnam'
shadow-4.19.3/lib/xgetXXbyYY.c:57:18: call_function: inlined call to 'mallocarray' from 'xgetgrnam'
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: ...to here
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: danger: 'reallocarray(0, 1, 32)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, 1, 48)'
shadow-4.19.3/lib/xgetXXbyYY.c:49:35: enter_function: entry to 'xgetpwnam'
shadow-4.19.3/lib/xgetXXbyYY.c:57:18: call_function: inlined call to 'mallocarray' from 'xgetpwnam'
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: ...to here
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: danger: 'reallocarray(0, 1, 48)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: warning[-Wanalyzer-malloc-leak]: leak of 'reallocarray(0, 1, 72)'
shadow-4.19.3/lib/xgetXXbyYY.c:49:35: enter_function: entry to 'xgetspnam'
shadow-4.19.3/lib/xgetXXbyYY.c:57:18: call_function: inlined call to 'mallocarray' from 'xgetspnam'
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: following 'false' branch...
shadow-4.19.3/lib/xgetXXbyYY.c:58:12: branch_false: ...to here
shadow-4.19.3/lib/xgetXXbyYY.c:65:26: danger: 'reallocarray(0, 1, 72)' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
shadow-4.19.3/libsubid/api.c:45:1: warning[-Wanalyzer-malloc-leak]: leak of 'progname'
shadow-4.19.3/libsubid/api.c:25:12: branch_true: following 'true' branch (when 'progname' is non-NULL)...
shadow-4.19.3/libsubid/api.c:26:28: branch_true: ...to here
shadow-4.19.3/libsubid/api.c:26:28: acquire_memory: allocated here
shadow-4.19.3/libsubid/api.c:27:20: branch_false: following 'false' branch (when 'progname' is non-NULL)...
shadow-4.19.3/libsubid/api.c:29:17: branch_false: ...to here
shadow-4.19.3/libsubid/api.c:45:1: danger: 'progname' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-457): [#def34]
shadow-4.19.3/src/check_subid_range.c:49: error[uninitvar]: Uninitialized variable: count
Error: CPPCHECK_WARNING (CWE-908): [#def35]
shadow-4.19.3/src/faillog.c:678: error[useClosedFile]: Used file that is not opened.
Error: COMPILER_WARNING (CWE-252): [#def36]
shadow-4.19.3/src/gpasswd.c: scope_hint: In function ‘catch_signals’
shadow-4.19.3/src/gpasswd.c:168:24: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING: [#def37]
shadow-4.19.3/src/login.c: scope_hint: In function ‘main’
shadow-4.19.3/src/login.c:451:24: warning[-Wunused-but-set-variable=]: variable ‘subroot’ set but not used
Error: COMPILER_WARNING (CWE-252): [#def38]
shadow-4.19.3/src/login.c:718:25: warning[-Wunused-result]: ignoring return value of ‘audit_log_acct_message’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def39]
shadow-4.19.3/src/login.c:1033:9: warning[-Wunused-result]: ignoring return value of ‘audit_log_acct_message’ declared with attribute ‘warn_unused_result’
Error: COMPILER_WARNING (CWE-252): [#def40]
shadow-4.19.3/src/su.c: scope_hint: In function ‘su_failure’
shadow-4.19.3/src/su.c:216:9: warning[-Wunused-result]: ignoring return value of ‘audit_log_acct_message’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
shadow-4.19.3/src/su.c:258:23: warning[-Wanalyzer-malloc-leak]: leak of ‘reallocarray(0, n_args + 3, 8)’
shadow-4.19.3/src/su.c:236:13: enter_function: entry to ‘execve_shell’
shadow-4.19.3/src/su.c:244:12: branch_true: following ‘true’ branch...
shadow-4.19.3/src/su.c:244:12: branch_true: ...to here
shadow-4.19.3/src/su.c:254:25: call_function: inlined call to ‘mallocarray’ from ‘execve_shell’
shadow-4.19.3/src/su.c:254:25: call_function: inlined call to ‘exit_if_null_’ from ‘execve_shell’
shadow-4.19.3/src/su.c:255:17: branch_false: ...to here
shadow-4.19.3/src/su.c:257:28: call_function: inlined call to ‘exit_if_null_’ from ‘execve_shell’
shadow-4.19.3/src/su.c:257:17: branch_false: ...to here
shadow-4.19.3/src/su.c:258:23: danger: ‘reallocarray(0, n_args + 3, 8)’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: COMPILER_WARNING (CWE-252): [#def42]
shadow-4.19.3/src/su.c: scope_hint: In function ‘main’
shadow-4.19.3/src/su.c:1142:9: warning[-Wunused-result]: ignoring return value of ‘audit_log_acct_message’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
shadow-4.19.3/src/sulogin.c:90:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(argv[1], 2)’
shadow-4.19.3/src/sulogin.c:85:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
shadow-4.19.3/src/sulogin.c:86:17: branch_true: ...to here
shadow-4.19.3/src/sulogin.c:90:21: acquire_resource: opened here
shadow-4.19.3/src/sulogin.c:90:20: danger: ‘open(argv[1], 2)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-910): [#def44]
shadow-4.19.3/src/sulogin.c:92:17: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘0’
shadow-4.19.3/src/sulogin.c:85:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
shadow-4.19.3/src/sulogin.c:86:17: branch_true: ...to here
shadow-4.19.3/src/sulogin.c:86:17: release_resource: closed here
shadow-4.19.3/src/sulogin.c:90:20: branch_false: following ‘false’ branch...
shadow-4.19.3/src/sulogin.c:92:17: branch_false: ...to here
shadow-4.19.3/src/sulogin.c:92:17: danger: ‘dup’ on closed file descriptor ‘0’; ‘close’ was at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: COMPILER_WARNING (CWE-252): [#def45]
shadow-4.19.3/src/sulogin.c: scope_hint: In function ‘main’
shadow-4.19.3/src/sulogin.c:92:17: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-910): [#def46]
shadow-4.19.3/src/sulogin.c:93:17: warning[-Wanalyzer-fd-use-after-close]: ‘dup’ on closed file descriptor ‘0’
shadow-4.19.3/src/sulogin.c:85:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
shadow-4.19.3/src/sulogin.c:86:17: branch_true: ...to here
shadow-4.19.3/src/sulogin.c:86:17: release_resource: closed here
shadow-4.19.3/src/sulogin.c:90:20: branch_false: following ‘false’ branch...
shadow-4.19.3/src/sulogin.c:92:17: branch_false: ...to here
shadow-4.19.3/src/sulogin.c:93:17: danger: ‘dup’ on closed file descriptor ‘0’; ‘close’ was at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: COMPILER_WARNING (CWE-252): [#def47]
shadow-4.19.3/src/sulogin.c:93:17: warning[-Wunused-result]: ignoring return value of ‘dup’ declared with attribute ‘warn_unused_result’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
shadow-4.19.3/src/useradd.c:356:17: warning[-Wanalyzer-malloc-leak]: leak of ‘default_file’
shadow-4.19.3/src/useradd.c:2463:5: enter_function: entry to ‘main’
shadow-4.19.3/src/useradd.c:2498:23: call_function: inlined call to ‘exit_if_null_’ from ‘main’
shadow-4.19.3/src/useradd.c:2498:9: branch_false: ...to here
shadow-4.19.3/src/useradd.c:2510:9: call_function: calling ‘get_defaults’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-590): [#def49]
shadow-4.19.3/src/useradd.c:496:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘default_file’ which points to memory not on the heap
shadow-4.19.3/src/useradd.c:2463:5: enter_function: entry to ‘main’
shadow-4.19.3/src/useradd.c:2498:23: call_function: inlined call to ‘exit_if_null_’ from ‘main’
shadow-4.19.3/src/useradd.c:2498:9: branch_false: ...to here
shadow-4.19.3/src/useradd.c:2510:9: call_function: calling ‘get_defaults’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
shadow-4.19.3/src/useradd.c:498:1: warning[-Wanalyzer-malloc-leak]: leak of ‘default_file’
shadow-4.19.3/src/useradd.c:2463:5: enter_function: entry to ‘main’
shadow-4.19.3/src/useradd.c:2498:23: call_function: inlined call to ‘exit_if_null_’ from ‘main’
shadow-4.19.3/src/useradd.c:2498:9: branch_false: ...to here
shadow-4.19.3/src/useradd.c:2510:9: call_function: calling ‘get_defaults’ from ‘main’
Error: COMPILER_WARNING (CWE-252): [#def51]
shadow-4.19.3/src/useradd.c: scope_hint: In function ‘create_home’
shadow-4.19.3/src/useradd.c:2325:16: warning[-Wunused-result]: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’
Error: CPPCHECK_WARNING (CWE-457): [#def52]
shadow-4.19.3/src/usermod.c:341: error[uninitvar]: Uninitialized variable: pos
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
shadow-4.19.3/src/vipw.c:278:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "r")’
shadow-4.19.3/src/vipw.c:475:5: enter_function: entry to ‘main’
shadow-4.19.3/src/vipw.c:546:20: branch_false: following ‘false’ branch...
shadow-4.19.3/src/vipw.c:551:12: branch_false: ...to here
shadow-4.19.3/src/vipw.c:551:12: branch_true: following ‘true’ branch (when ‘do_vigr != 0’)...
shadow-4.19.3/src/vipw.c:553:20: branch_true: ...to here
shadow-4.19.3/src/vipw.c:553:20: branch_false: following ‘false’ branch (when ‘editshadow == 0’)...
shadow-4.19.3/src/vipw.c:561:25: branch_false: ...to here
shadow-4.19.3/src/vipw.c:561:25: call_function: calling ‘vipwedit’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
shadow-4.19.3/src/vipw.c:278:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "r")’
shadow-4.19.3/src/vipw.c:475:5: enter_function: entry to ‘main’
shadow-4.19.3/src/vipw.c:546:20: branch_false: following ‘false’ branch...
shadow-4.19.3/src/vipw.c:551:12: branch_false: ...to here
shadow-4.19.3/src/vipw.c:551:12: branch_true: following ‘true’ branch (when ‘do_vigr != 0’)...
shadow-4.19.3/src/vipw.c:553:20: branch_true: ...to here
shadow-4.19.3/src/vipw.c:553:20: branch_false: following ‘false’ branch (when ‘editshadow == 0’)...
shadow-4.19.3/src/vipw.c:561:25: branch_false: ...to here
shadow-4.19.3/src/vipw.c:561:25: call_function: calling ‘vipwedit’ from ‘main’
Error: COMPILER_WARNING (CWE-252): [#def55]
shadow-4.19.3/src/vipw.c: scope_hint: In function ‘vipwedit’
shadow-4.19.3/src/vipw.c:445:9: warning[-Wunused-result]: ignoring return value of ‘link’ declared with attribute ‘warn_unused_result’
Scan Properties
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-23.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260420.180315.gd39a405.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | shadow-utils-4.19.3-2.fc45 |
| store-results-to | /tmp/tmp0lok2q8s/shadow-utils-4.19.3-2.fc45.tar.xz |
| time-created | 2026-04-28 19:56:55 |
| time-finished | 2026-04-28 19:59:53 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp0lok2q8s/shadow-utils-4.19.3-2.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp0lok2q8s/shadow-utils-4.19.3-2.fc45.src.rpm' |
| tool-version | csmock-3.8.5-1.el9 |