sudo-1.9.15-7.p5.fc43
List of Findings
Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
sudo-1.9.15p5/lib/eventlog/./eventlog.c:303:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'dup3(pipein, 0, 0)'
sudo-1.9.15p5/lib/eventlog/./eventlog.c:1393:1: enter_function: entry to 'eventlog_mail'
sudo-1.9.15p5/lib/eventlog/./eventlog.c:1407:8: branch_true: following 'true' branch...
sudo-1.9.15p5/lib/eventlog/./eventlog.c:1410:8: branch_true: ...to here
sudo-1.9.15p5/lib/eventlog/./eventlog.c:1425:11: call_function: calling 'send_mail' from 'eventlog_mail'
Error: GCC_ANALYZER_WARNING (CWE-416): [#def2]
sudo-1.9.15p5/lib/eventlog/./parse_json.c:594:17: warning[-Wanalyzer-use-after-free]: use after 'free' of 'item'
sudo-1.9.15p5/lib/eventlog/./parse_json.c:801:1: enter_function: entry to 'eventlog_json_read'
sudo-1.9.15p5/lib/eventlog/./parse_json.c:816:8: branch_false: following 'false' branch (when 'root' is non-NULL)...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:819:5: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:823:12: branch_true: following 'true' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:824:20: branch_true: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:850:16: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:853:13: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:885:20: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:891:20: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:891:21: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:896:17: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:898:25: call_function: calling 'json_stack_push' from 'eventlog_json_read'
sudo-1.9.15p5/lib/eventlog/./parse_json.c:898:25: return_function: returning to 'eventlog_json_read' from 'json_stack_push'
sudo-1.9.15p5/lib/eventlog/./parse_json.c:900:20: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:834:18: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:850:16: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:853:13: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:905:20: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:855:20: branch_true: following 'true' branch (when 'name' is NULL)...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:855:37: branch_true: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:855:21: branch_false: following 'false' branch...
sudo-1.9.15p5/lib/eventlog/./parse_json.c:860:20: branch_false: ...to here
sudo-1.9.15p5/lib/eventlog/./parse_json.c:1064:5: call_function: calling 'eventlog_json_free' from 'eventlog_json_read'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
sudo-1.9.15p5/logsrvd/./iolog_writer.c:594:5: warning[-Wanalyzer-malloc-leak]: leak of ‘*evlog.iolog_path’
sudo-1.9.15p5/logsrvd/./iolog_writer.c:546:1: enter_function: entry to ‘create_iolog_path’
sudo-1.9.15p5/logsrvd/./iolog_writer.c:557:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/logsrvd/./iolog_writer.c:564:10: branch_true: ...to here
sudo-1.9.15p5/logsrvd/./iolog_writer.c:564:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/logsrvd/./iolog_writer.c:571:11: call_function: inlined call to ‘snprintf’ from ‘create_iolog_path’
sudo-1.9.15p5/logsrvd/./iolog_writer.c:573:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./iolog_writer.c:583:10: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./iolog_writer.c:583:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/logsrvd/./iolog_writer.c:587:30: branch_true: ...to here
sudo-1.9.15p5/logsrvd/./iolog_writer.c:587:30: acquire_memory: allocated here
sudo-1.9.15p5/logsrvd/./iolog_writer.c:587:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./iolog_writer.c:591:45: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./iolog_writer.c:594:5: danger: ‘*evlog.iolog_path’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-415): [#def4]
sudo-1.9.15p5/logsrvd/./logsrvd.c:152:13: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*buf.data’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1413:1: enter_function: entry to ‘new_connection’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1419:20: call_function: calling ‘connection_closure_alloc’ from ‘new_connection’
Error: GCC_ANALYZER_WARNING (CWE-416): [#def5]
sudo-1.9.15p5/logsrvd/./logsrvd.c:152:18: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘buf’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1413:1: enter_function: entry to ‘new_connection’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1419:20: call_function: calling ‘connection_closure_alloc’ from ‘new_connection’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
sudo-1.9.15p5/logsrvd/./logsrvd.c:313:12: warning[-Wanalyzer-malloc-leak]: leak of ‘*buf.data’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1413:1: enter_function: entry to ‘new_connection’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1419:20: call_function: calling ‘connection_closure_alloc’ from ‘new_connection’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1419:20: return_function: returning to ‘new_connection’ from ‘connection_closure_alloc’
sudo-1.9.15p5/logsrvd/./logsrvd.c:1419:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./logsrvd.c:1423:9: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./logsrvd.c:1441:8: branch_false: following ‘false’ branch (when ‘tls == 0’)...
sudo-1.9.15p5/logsrvd/./logsrvd.c:1479:14: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./logsrvd.c:1483:18: call_function: calling ‘start_protocol’ from ‘new_connection’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
sudo-1.9.15p5/logsrvd/./logsrvd_local.c:416:12: warning[-Wanalyzer-malloc-leak]: leak of ‘*evlog.signal_name’
sudo-1.9.15p5/logsrvd/./logsrvd_local.c:411:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/logsrvd/./logsrvd_local.c:415:30: acquire_memory: allocated here
sudo-1.9.15p5/logsrvd/./logsrvd_local.c:416:12: danger: ‘*evlog.signal_name’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
sudo-1.9.15p5/logsrvd/./sendlog.c:264:13: warning[-Wanalyzer-malloc-leak]: leak of ‘*buf.data’
sudo-1.9.15p5/logsrvd/./sendlog.c:1612:1: enter_function: entry to ‘client_closure_alloc’
sudo-1.9.15p5/logsrvd/./sendlog.c:1620:8: branch_false: following ‘false’ branch (when ‘closure’ is non-NULL)...
sudo-1.9.15p5/logsrvd/./sendlog.c:1623:5: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1644:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./sendlog.c:1647:24: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1649:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./sendlog.c:1652:11: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1652:11: call_function: calling ‘get_free_buf’ from ‘client_closure_alloc’
Error: GCC_ANALYZER_WARNING (CWE-415): [#def9]
sudo-1.9.15p5/logsrvd/./sendlog.c:1597:13: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*buf.data’
sudo-1.9.15p5/logsrvd/./sendlog.c:1612:1: enter_function: entry to ‘client_closure_alloc’
sudo-1.9.15p5/logsrvd/./sendlog.c:1620:8: branch_false: following ‘false’ branch (when ‘closure’ is non-NULL)...
sudo-1.9.15p5/logsrvd/./sendlog.c:1623:5: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1644:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./sendlog.c:1647:24: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1678:5: call_function: calling ‘client_closure_free’ from ‘client_closure_alloc’
Error: GCC_ANALYZER_WARNING (CWE-416): [#def10]
sudo-1.9.15p5/logsrvd/./sendlog.c:1597:18: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘buf’
sudo-1.9.15p5/logsrvd/./sendlog.c:1612:1: enter_function: entry to ‘client_closure_alloc’
sudo-1.9.15p5/logsrvd/./sendlog.c:1620:8: branch_false: following ‘false’ branch (when ‘closure’ is non-NULL)...
sudo-1.9.15p5/logsrvd/./sendlog.c:1623:5: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1644:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/logsrvd/./sendlog.c:1647:24: branch_false: ...to here
sudo-1.9.15p5/logsrvd/./sendlog.c:1678:5: call_function: calling ‘client_closure_free’ from ‘client_closure_alloc’
Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
sudo-1.9.15p5/plugins/group_file/./getgrent.c:171:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
sudo-1.9.15p5/plugins/group_file/./getgrent.c:160:1: enter_function: entry to 'mygetgrnam'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:164:10: call_function: calling 'open_group' from 'mygetgrnam'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:164:10: return_function: returning to 'mygetgrnam' from 'open_group'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:164:8: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:18: call_function: calling 'mygetgrent' from 'mygetgrnam'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:18: return_function: returning to 'mygetgrnam' from 'mygetgrent'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:167:20: branch_true: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:167:12: branch_false: following 'false' branch (when the strings are non-equal)...
branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:18: call_function: calling 'mygetgrent' from 'mygetgrnam'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:18: return_function: returning to 'mygetgrnam' from 'mygetgrent'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:166:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:170:9: branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:170:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:171:9: branch_true: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:171:9: release_memory: '0' is NULL
sudo-1.9.15p5/plugins/group_file/./getgrent.c:171:9: danger: argument 1 ('grf') NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-688): [#def12]
sudo-1.9.15p5/plugins/group_file/./getgrent.c:189:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
sudo-1.9.15p5/plugins/group_file/./getgrent.c:178:1: enter_function: entry to 'mygetgrgid'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:182:10: call_function: calling 'open_group' from 'mygetgrgid'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:182:10: return_function: returning to 'mygetgrgid' from 'open_group'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:182:8: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:18: call_function: calling 'mygetgrent' from 'mygetgrgid'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:18: return_function: returning to 'mygetgrgid' from 'mygetgrent'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:185:13: branch_true: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:185:12: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:18: call_function: calling 'mygetgrent' from 'mygetgrgid'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:18: return_function: returning to 'mygetgrgid' from 'mygetgrent'
sudo-1.9.15p5/plugins/group_file/./getgrent.c:184:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:188:9: branch_false: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:188:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/group_file/./getgrent.c:189:9: branch_true: ...to here
sudo-1.9.15p5/plugins/group_file/./getgrent.c:189:9: release_memory: '0' is NULL
sudo-1.9.15p5/plugins/group_file/./getgrent.c:189:9: danger: argument 1 ('grf') NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-688): [#def13]
sudo-1.9.15p5/plugins/sample/./sample_plugin.c:162:19: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'path' where non-null expected
sudo-1.9.15p5/plugins/sample/./sample_plugin.c:160:20: acquire_memory: this call could return NULL
sudo-1.9.15p5/plugins/sample/./sample_plugin.c:162:19: danger: argument 1 ('path') from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def14]
sudo-1.9.15p5/plugins/sample/sample_plugin.c:162: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: path
Error: CPPCHECK_WARNING (CWE-476): [#def15]
sudo-1.9.15p5/plugins/sample/sample_plugin.c:164: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: path
Error: GCC_ANALYZER_WARNING (CWE-124): [#def16]
sudo-1.9.15p5/plugins/sudoers/./ldap.c:169:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1553:1: enter_function: entry to 'sudo_ldap_open'
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1567:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1571:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1577:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1582:10: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1582:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1583:21: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap.c:1583:21: call_function: calling 'sudo_ldap_join_uri' from 'sudo_ldap_open'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:82:14: warning[-Wanalyzer-null-dereference]: dereference of NULL 'cp'
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:355:1: enter_function: entry to 'sudo_ldap_role_to_priv'
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:368:8: branch_false: following 'false' branch (when 'priv' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:370:5: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:375:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:378:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:378:8: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:385:16: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:394:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:394:9: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:400:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:401:24: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:401:24: call_function: calling 'sudo_ldap_is_negated' from 'sudo_ldap_role_to_priv'
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:401:24: return_function: returning to 'sudo_ldap_role_to_priv' from 'sudo_ldap_is_negated'
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:406:12: branch_false: following 'false' branch (when 'cmndspec' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:408:18: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:408:12: branch_false: following 'false' branch (when 'm' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:412:18: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:412:12: branch_false: following 'false' branch (when 'c' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:417:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:421:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:424:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:433:12: branch_false: following 'false' branch (when 'prev_cmndspec' is NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:455:16: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:455:16: branch_false: following 'false' branch (when 'runasusers' is NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:463:16: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:463:16: branch_false: following 'false' branch (when 'runasgroups' is NULL)...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:471:16: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:477:16: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:480:20: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:480:20: branch_false: following 'false' branch (when 'store_options == 0')...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:492:24: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:496:26: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./ldap_util.c:496:26: call_function: calling 'sudo_ldap_parse_option' from 'sudo_ldap_role_to_priv'
Error: GCC_ANALYZER_WARNING (CWE-415): [#def18]
sudo-1.9.15p5/plugins/sudoers/./log_client.c:667:9: warning[-Wanalyzer-double-free]: double-'free' of '*buf.data'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2013:1: enter_function: entry to 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2020:15: call_function: calling 'client_closure_alloc' from 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2020:15: return_function: returning to 'log_server_open' from 'client_closure_alloc'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2022:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: call_function: calling 'log_server_connect' from 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: return_function: returning to 'log_server_open' from 'log_server_connect'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2028:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2028:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2032:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2040:5: call_function: calling 'client_closure_free' from 'log_server_open'
Error: GCC_ANALYZER_WARNING (CWE-416): [#def19]
sudo-1.9.15p5/plugins/sudoers/./log_client.c:667:14: warning[-Wanalyzer-use-after-free]: use after 'free' of 'buf'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2013:1: enter_function: entry to 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2020:15: call_function: calling 'client_closure_alloc' from 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2020:15: return_function: returning to 'log_server_open' from 'client_closure_alloc'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2022:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: call_function: calling 'log_server_connect' from 'log_server_open'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:10: return_function: returning to 'log_server_open' from 'log_server_connect'
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2026:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2028:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2028:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2032:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./log_client.c:2040:5: call_function: calling 'client_closure_free' from 'log_server_open'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1503:8: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(dir)’
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1575:1: enter_function: entry to ‘list_sessions’
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1583:5: call_function: calling ‘parse_expr’ from ‘list_sessions’
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1583:5: return_function: returning to ‘list_sessions’ from ‘parse_expr’
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1586:8: branch_true: following ‘true’ branch (when ‘pattern’ is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1588:14: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1588:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1594:5: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./sudoreplay.c:1594:5: call_function: calling ‘find_sessions’ from ‘list_sessions’
Error: GCC_ANALYZER_WARNING (CWE-124): [#def21]
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:310:9: warning[-Wanalyzer-out-of-bounds]: heap-based buffer underwrite
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:119:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:121:5: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:127:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:129:10: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:129:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:134:5: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:231:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:263:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:267:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:274:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:276:31: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:281:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:284:43: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:284:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:286:25: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:289:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:293:8: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:293:8: branch_true: following ‘true’ branch (when ‘argc != 0’)...
branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:301:12: branch_false: following ‘false’ branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:303:51: branch_false: following ‘false’ branch (when ‘argc <= i’)...
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:310:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./testsudoers.c:310:9: danger: out-of-bounds write at byte -1 but region starts at byte 0
Error: GCC_ANALYZER_WARNING (CWE-688): [#def22]
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:321:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:310:1: enter_function: entry to ‘testsudoers_getgrnam’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:314:10: call_function: calling ‘open_group’ from ‘testsudoers_getgrnam’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:314:10: return_function: returning to ‘testsudoers_getgrnam’ from ‘open_group’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:314:8: branch_false: following ‘false’ branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:18: call_function: calling ‘testsudoers_getgrent’ from ‘testsudoers_getgrnam’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:18: return_function: returning to ‘testsudoers_getgrnam’ from ‘testsudoers_getgrent’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:317:20: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:317:12: branch_false: following ‘false’ branch (when the strings are non-equal)...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:18: call_function: calling ‘testsudoers_getgrent’ from ‘testsudoers_getgrnam’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:18: return_function: returning to ‘testsudoers_getgrnam’ from ‘testsudoers_getgrent’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:316:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:320:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:320:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:321:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:321:9: release_memory: ‘0’ is NULL
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:321:9: danger: argument 1 (‘grf’) NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-688): [#def23]
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:339:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:328:1: enter_function: entry to ‘testsudoers_getgrgid’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:332:10: call_function: calling ‘open_group’ from ‘testsudoers_getgrgid’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:332:10: return_function: returning to ‘testsudoers_getgrgid’ from ‘open_group’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:332:8: branch_false: following ‘false’ branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:18: call_function: calling ‘testsudoers_getgrent’ from ‘testsudoers_getgrgid’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:18: return_function: returning to ‘testsudoers_getgrgid’ from ‘testsudoers_getgrent’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:335:13: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:335:12: branch_false: following ‘false’ branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:18: call_function: calling ‘testsudoers_getgrent’ from ‘testsudoers_getgrgid’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:18: return_function: returning to ‘testsudoers_getgrgid’ from ‘testsudoers_getgrent’
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:334:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:338:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:338:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:339:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:339:9: release_memory: ‘0’ is NULL
sudo-1.9.15p5/plugins/sudoers/./tsgetgrpw.c:339:9: danger: argument 1 (‘grf’) NULL where non-null expected
Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*sp.tpath, "r+")’
sudo-1.9.15p5/plugins/sudoers/./visudo.c:657:12: branch_true: following ‘true’ branch (when ‘sp’ is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./visudo.c:658:16: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:659:14: acquire_resource: opened here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:660:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:14: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:12: danger: ‘fopen(*sp.tpath, "r+")’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*sp.tpath, "r+")’
sudo-1.9.15p5/plugins/sudoers/./visudo.c:657:12: branch_true: following ‘true’ branch (when ‘sp’ is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/./visudo.c:658:16: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:659:14: acquire_memory: allocated here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:660:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:14: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/./visudo.c:665:12: danger: ‘fopen(*sp.tpath, "r+")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def26]
sudo-1.9.15p5/plugins/sudoers/getdate.c:1151:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
sudo-1.9.15p5/plugins/sudoers/getdate.c:1109:6: branch_true: following ‘true’ branch...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1115:28: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1138:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1140:7: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1149:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1151:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1151:9: danger: use of uninitialized value ‘yyss’ here
Error: GCC_ANALYZER_WARNING (CWE-457): [#def27]
sudo-1.9.15p5/plugins/sudoers/getdate.c:1278:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
sudo-1.9.15p5/plugins/sudoers/getdate.c:1109:6: branch_false: following ‘false’ branch...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1173:6: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1173:6: branch_false: following ‘false’ branch (when ‘yystate != 2’)...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1176:3: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1188:6: branch_true: following ‘true’ branch (when ‘yyn == -12’)...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1189:5: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1258:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
sudo-1.9.15p5/plugins/sudoers/getdate.c:1260:3: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/getdate.c:1278:3: danger: use of uninitialized value ‘*<unknown>’ here
Error: CPPCHECK_WARNING (CWE-457): [#def28]
sudo-1.9.15p5/plugins/sudoers/match.c:320: error[uninitvar]: Uninitialized variable: &m_user.entries
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
sudo-1.9.15p5/plugins/sudoers/toke.c:4918:5: warning[-Wanalyzer-malloc-leak]: leak of '*b.yy_ch_buf'
sudo-1.9.15p5/plugins/sudoers/toke.c:4851:12: enter_function: entry to 'yy_get_next_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:4858:5: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:4862:14: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4862:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:4884:47: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4889:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:4898:18: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4900:11: branch_true: following 'true' branch (when 'num_to_read <= 0')...
sudo-1.9.15p5/plugins/sudoers/toke.c:4904:41: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4920:41: call_function: inlined call to 'sudoersrealloc' from 'yy_get_next_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:4927:56: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:4931:47: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4900:11: branch_true: following 'true' branch (when 'num_to_read <= 0')...
sudo-1.9.15p5/plugins/sudoers/toke.c:4904:41: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4909:28: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:4911:20: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:4920:41: call_function: inlined call to 'sudoersrealloc' from 'yy_get_next_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:4918:5: danger: '*b.yy_ch_buf' leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
sudo-1.9.15p5/plugins/sudoers/toke.c:5156:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
sudo-1.9.15p5/plugins/sudoers/toke.l:1447:1: enter_function: entry to 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1453:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1456:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:27: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:27: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: call_function: calling 'sudoers_delete_buffer' from 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: return_function: returning to 'pop_include' from 'sudoers_delete_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1460:12: branch_true: following 'true' branch (when 'pl' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/toke.l:1461:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1463:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1464:31: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: call_function: calling 'sudoers_create_buffer' from 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: return_function: returning to 'pop_include' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: call_function: calling 'sudoers_switch_to_buffer' from 'pop_include'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
sudo-1.9.15p5/plugins/sudoers/toke.c:5167:16: warning[-Wanalyzer-null-dereference]: dereference of NULL 'yy_buffer_stack'
sudo-1.9.15p5/plugins/sudoers/toke.l:1292:1: enter_function: entry to 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:17: call_function: calling 'expand_include' from 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:17: return_function: returning to 'push_include_int' from 'expand_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1304:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1400:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1411:11: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1414:25: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1414:5: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: call_function: calling 'sudoers_create_buffer' from 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: return_function: returning to 'push_include_int' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: call_function: calling 'sudoers_switch_to_buffer' from 'push_include_int'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
sudo-1.9.15p5/plugins/sudoers/toke.c:5206:12: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(64)'
sudo-1.9.15p5/plugins/sudoers/toke.c:5192:21: enter_function: entry to 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:5196:24: call_function: inlined call to 'sudoersalloc' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:5197:5: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:5200:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:5206:12: danger: 'malloc(64)' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-476): [#def33]
sudo-1.9.15p5/plugins/sudoers/toke.c:5246: warning[nullPointer]: Possible null pointer dereference: b
Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
sudo-1.9.15p5/plugins/sudoers/toke.c:5246:2: warning[-Wanalyzer-null-dereference]: dereference of NULL 'b'
sudo-1.9.15p5/plugins/sudoers/toke.c:5130:10: enter_function: entry to 'sudoersrestart'
sudo-1.9.15p5/plugins/sudoers/toke.c:5134:9: call_function: calling 'sudoersensure_buffer_stack' from 'sudoersrestart'
sudo-1.9.15p5/plugins/sudoers/toke.c:5134:9: return_function: returning to 'sudoersrestart' from 'sudoersensure_buffer_stack'
sudo-1.9.15p5/plugins/sudoers/toke.c:5136:13: call_function: calling 'sudoers_create_buffer' from 'sudoersrestart'
sudo-1.9.15p5/plugins/sudoers/toke.c:5136:13: return_function: returning to 'sudoersrestart' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.c:5139:9: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.c:5139:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:5139:9: call_function: calling 'sudoers_init_buffer' from 'sudoersrestart'
Error: CPPCHECK_WARNING (CWE-476): [#def35]
sudo-1.9.15p5/plugins/sudoers/toke.c:5247: warning[nullPointer]: Possible null pointer dereference: b
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
sudo-1.9.15p5/plugins/sudoers/toke.c:5286:12: warning[-Wanalyzer-malloc-leak]: leak of 'sudoers_create_buffer(open_sudoers(*pl.path, 0, 0, & keepopen), 16384)'
sudo-1.9.15p5/plugins/sudoers/toke.l:1447:1: enter_function: entry to 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1453:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1456:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:27: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:27: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: call_function: calling 'sudoers_delete_buffer' from 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1458:5: return_function: returning to 'pop_include' from 'sudoers_delete_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1460:12: branch_true: following 'true' branch (when 'pl' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/toke.l:1461:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1463:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1464:31: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: call_function: calling 'sudoers_create_buffer' from 'pop_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: return_function: returning to 'pop_include' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1472:13: call_function: calling 'sudoers_switch_to_buffer' from 'pop_include'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def37]
sudo-1.9.15p5/plugins/sudoers/toke.c:5349:6: warning[-Wanalyzer-malloc-leak]: leak of 'sudoers_create_buffer(fp, 16384)'
sudo-1.9.15p5/plugins/sudoers/toke.l:1292:1: enter_function: entry to 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:17: call_function: calling 'expand_include' from 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:17: return_function: returning to 'push_include_int' from 'expand_include'
sudo-1.9.15p5/plugins/sudoers/toke.l:1300:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1304:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1400:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1411:11: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1414:25: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1414:5: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: call_function: calling 'sudoers_create_buffer' from 'push_include_int'
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: return_function: returning to 'push_include_int' from 'sudoers_create_buffer'
sudo-1.9.15p5/plugins/sudoers/toke.l:1421:5: call_function: calling 'sudoers_switch_to_buffer' from 'push_include_int'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
sudo-1.9.15p5/plugins/sudoers/toke.c:5460:32: warning[-Wanalyzer-malloc-leak]: leak of 'malloc(n)'
sudo-1.9.15p5/plugins/sudoers/toke.c:5444:17: enter_function: entry to 'sudoers_scan_bytes'
sudo-1.9.15p5/plugins/sudoers/toke.c:5453:24: call_function: inlined call to 'sudoersalloc' from 'sudoers_scan_bytes'
sudo-1.9.15p5/plugins/sudoers/toke.c:5454:12: branch_false: following 'false' branch...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.c:5462:6: call_function: calling 'sudoers_scan_buffer' from 'sudoers_scan_bytes'
Error: GCC_ANALYZER_WARNING (CWE-416): [#def39]
sudo-1.9.15p5/plugins/sudoers/toke.l:1037:27: warning[-Wanalyzer-use-after-free]: use after 'reallocarray' of 'paths'
sudo-1.9.15p5/plugins/sudoers/toke.l:958:8: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:964:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:964:13: acquire_memory: allocated here
sudo-1.9.15p5/plugins/sudoers/toke.l:965:8: branch_false: following 'false' branch (when 'paths' is non-NULL)...
branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:967:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:968:32: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:976:13: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:991:15: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:992:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:994:36: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:994:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:999:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1004:12: branch_false: following 'false' branch (when 'pl' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/toke.l:1008:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1009:12: branch_false: following 'false' branch (when 'count < max_paths')...
sudo-1.9.15p5/plugins/sudoers/toke.l:1020:15: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:967:12: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:968:32: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:976:13: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:991:15: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:992:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:994:36: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:994:12: branch_false: following 'false' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:999:13: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1004:12: branch_false: following 'false' branch (when 'pl' is non-NULL)...
sudo-1.9.15p5/plugins/sudoers/toke.l:1008:9: branch_false: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1012:19: release_memory: deallocated here
sudo-1.9.15p5/plugins/sudoers/toke.l:1013:16: branch_true: following 'true' branch (when 'tmp' is NULL)...
sudo-1.9.15p5/plugins/sudoers/toke.l:1014:17: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1034:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1035:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1036:17: branch_true: following 'true' branch (when 'i < count')...
sudo-1.9.15p5/plugins/sudoers/toke.l:1037:32: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1037:27: danger: use after 'reallocarray' of 'paths + i * 8'; deallocated at [(31)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/30)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def40]
sudo-1.9.15p5/plugins/sudoers/toke.l:1058:9: warning[-Wanalyzer-null-argument]: use of NULL 'paths' where non-null expected
sudo-1.9.15p5/plugins/sudoers/toke.l:1049:1: enter_function: entry to 'switch_dir'
sudo-1.9.15p5/plugins/sudoers/toke.l:1051:24: release_memory: 'paths' is NULL
sudo-1.9.15p5/plugins/sudoers/toke.l:1055:13: call_function: calling 'read_dir_files' from 'switch_dir'
sudo-1.9.15p5/plugins/sudoers/toke.l:1055:13: return_function: returning to 'switch_dir' from 'read_dir_files'
sudo-1.9.15p5/plugins/sudoers/toke.l:1056:8: branch_true: following 'true' branch...
sudo-1.9.15p5/plugins/sudoers/toke.l:1058:9: branch_true: ...to here
sudo-1.9.15p5/plugins/sudoers/toke.l:1058:9: release_memory: 'paths' is NULL
sudo-1.9.15p5/plugins/sudoers/toke.l:1058:9: danger: argument 1 ('paths') NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-562): [#def41]
sudo-1.9.15p5/plugins/sudoers/visudo.c:542: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
sudo-1.9.15p5/src/./exec_monitor.c:362:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_fds[0], 0, 0)’
sudo-1.9.15p5/src/./exec_monitor.c:362:9: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_monitor.c:362:8: danger: ‘dup3(io_fds[0], 0, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
sudo-1.9.15p5/src/./exec_monitor.c:366:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_fds[1], 1, 0)’
sudo-1.9.15p5/src/./exec_monitor.c:362:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_monitor.c:364:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_monitor.c:366:9: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_monitor.c:366:8: danger: ‘dup3(io_fds[1], 1, 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
sudo-1.9.15p5/src/./exec_monitor.c:370:8: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_fds[2], 2, 0)’
sudo-1.9.15p5/src/./exec_monitor.c:362:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_monitor.c:364:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_monitor.c:366:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_monitor.c:368:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_monitor.c:370:9: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_monitor.c:370:8: danger: ‘dup3(io_fds[2], 2, 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
sudo-1.9.15p5/src/./exec_nopty.c:589:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘errpipe[0]’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:589:9: danger: ‘errpipe[0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
sudo-1.9.15p5/src/./exec_nopty.c:589:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘errpipe[1]’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:589:9: danger: ‘errpipe[1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
sudo-1.9.15p5/src/./exec_nopty.c:589:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘io_pipe[0][0]’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:589:9: danger: ‘io_pipe[0][0]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
sudo-1.9.15p5/src/./exec_nopty.c:589:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘io_pipe[1][1]’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:589:9: danger: ‘io_pipe[1][1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
sudo-1.9.15p5/src/./exec_nopty.c:589:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘io_pipe[2][1]’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:589:9: danger: ‘io_pipe[2][1]’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
sudo-1.9.15p5/src/./exec_nopty.c:615:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_pipe[0][0], 0, 0)’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:587:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:593:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:611:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:614:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:614:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:615:17: branch_true: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:615:17: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_nopty.c:615:16: danger: ‘dup3(io_pipe[0][0], 0, 0)’ leaks here; was opened at [(25)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/24)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
sudo-1.9.15p5/src/./exec_nopty.c:621:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_pipe[1][1], 1, 0)’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:587:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:593:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:611:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:614:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:614:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:620:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:620:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:621:17: branch_true: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:621:17: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_nopty.c:621:16: danger: ‘dup3(io_pipe[1][1], 1, 0)’ leaks here; was opened at [(34)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/33)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
sudo-1.9.15p5/src/./exec_nopty.c:627:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(io_pipe[2][1], 2, 0)’
sudo-1.9.15p5/src/./exec_nopty.c:542:1: enter_function: entry to ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:556:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:562:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:562:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:565:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:577:5: call_function: calling ‘interpose_pipes’ from ‘exec_nopty’
sudo-1.9.15p5/src/./exec_nopty.c:577:5: return_function: returning to ‘exec_nopty’ from ‘interpose_pipes’
sudo-1.9.15p5/src/./exec_nopty.c:587:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:593:9: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:611:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:614:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:614:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:620:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:620:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:626:13: branch_false: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:626:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./exec_nopty.c:627:17: branch_true: ...to here
sudo-1.9.15p5/src/./exec_nopty.c:627:17: acquire_resource: opened here
sudo-1.9.15p5/src/./exec_nopty.c:627:16: danger: ‘dup3(io_pipe[2][1], 2, 0)’ leaks here; was opened at [(36)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/35)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
sudo-1.9.15p5/src/./preserve_fds.c:163:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*pfd.lowfd, *pfd.highfd)’
sudo-1.9.15p5/src/./preserve_fds.c:113:12: branch_false: following ‘false’ branch (when ‘fd == -1’)...
sudo-1.9.15p5/src/./preserve_fds.c:116:13: branch_false: ...to here
sudo-1.9.15p5/src/./preserve_fds.c:120:8: branch_false: following ‘false’ branch (when ‘lastfd != -1’)...
sudo-1.9.15p5/src/./preserve_fds.c:129:29: branch_false: ...to here
sudo-1.9.15p5/src/./preserve_fds.c:130:8: branch_false: following ‘false’ branch (when ‘fdbits’ is non-NULL)...
sudo-1.9.15p5/src/./preserve_fds.c:132:5: branch_false: ...to here
sudo-1.9.15p5/src/./preserve_fds.c:161:5: branch_true: following ‘true’ branch (when ‘pfd’ is non-NULL)...
sudo-1.9.15p5/src/./preserve_fds.c:162:13: branch_true: ...to here
sudo-1.9.15p5/src/./preserve_fds.c:162:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./preserve_fds.c:163:17: branch_true: ...to here
sudo-1.9.15p5/src/./preserve_fds.c:163:17: acquire_resource: opened here
sudo-1.9.15p5/src/./preserve_fds.c:163:16: danger: ‘dup2(*pfd.lowfd, *pfd.highfd)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
sudo-1.9.15p5/src/./selinux.c:256:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(se_state.ttyfd, ptyfd, flags)’
sudo-1.9.15p5/src/./selinux.c:168:1: enter_function: entry to ‘selinux_relabel_tty’
sudo-1.9.15p5/src/./selinux.c:179:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:184:5: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:202:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:207:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:207:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:220:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:220:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:229:8: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:229:8: branch_true: following ‘true’ branch (when ‘ptyfd != -1’)...
sudo-1.9.15p5/src/./selinux.c:233:26: call_function: inlined call to ‘open’ from ‘selinux_relabel_tty’
sudo-1.9.15p5/src/./selinux.c:234:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:238:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:244:23: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:244:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:248:13: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:250:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:254:13: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:256:13: acquire_resource: opened here
sudo-1.9.15p5/src/./selinux.c:256:12: danger: ‘dup3(se_state.ttyfd, ptyfd, flags)’ leaks here; was opened at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
sudo-1.9.15p5/src/./selinux.c:276:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(se_state.ttyfd, fd)’
sudo-1.9.15p5/src/./selinux.c:179:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:184:5: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:189:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:193:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:199:13: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:202:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:207:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:207:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:220:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:220:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:229:8: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:229:8: branch_false: following ‘false’ branch (when ‘ptyfd == -1’)...
sudo-1.9.15p5/src/./selinux.c:262:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:264:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:268:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:274:13: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:275:33: branch_true: following ‘true’ branch (when ‘fd != 3’)...
sudo-1.9.15p5/src/./selinux.c:276:17: branch_true: ...to here
sudo-1.9.15p5/src/./selinux.c:276:16: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./selinux.c:276:41: branch_true: ...to here
sudo-1.9.15p5/src/./selinux.c:276:41: acquire_resource: opened here
sudo-1.9.15p5/src/./selinux.c:276:17: danger: ‘dup2(se_state.ttyfd, fd)’ leaks here; was opened at [(23)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/22)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
sudo-1.9.15p5/src/./selinux.c:497:13: warning[-Wanalyzer-malloc-leak]: leak of ‘nargv’
sudo-1.9.15p5/src/./selinux.c:451:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./selinux.c:458:9: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:458:8: branch_false: following ‘false’ branch...
branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:466:8: branch_false: following ‘false’ branch (when ‘argc != 0’)...
sudo-1.9.15p5/src/./selinux.c:470:32: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:470:13: acquire_memory: allocated here
sudo-1.9.15p5/src/./selinux.c:471:8: branch_false: following ‘false’ branch (when ‘nargv’ is non-NULL)...
sudo-1.9.15p5/src/./selinux.c:475:10: branch_false: ...to here
sudo-1.9.15p5/src/./selinux.c:493:8: branch_true: following ‘true’ branch (when ‘fd != -1’)...
sudo-1.9.15p5/src/./selinux.c:494:31: branch_true: ...to here
sudo-1.9.15p5/src/./selinux.c:495:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./selinux.c:496:13: branch_true: ...to here
sudo-1.9.15p5/src/./selinux.c:497:13: danger: ‘nargv’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def57]
sudo-1.9.15p5/src/./sudo.c:376:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(__open_alias("/dev/null", 2, 420), 0)’
sudo-1.9.15p5/src/./sudo.c:374:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./sudo.c:376:12: branch_false: ...to here
sudo-1.9.15p5/src/./sudo.c:376:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./sudo.c:376:35: branch_true: ...to here
sudo-1.9.15p5/src/./sudo.c:376:35: acquire_resource: opened here
sudo-1.9.15p5/src/./sudo.c:376:13: danger: ‘dup2(__open_alias("/dev/null", 2, 420), 0)’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def58]
sudo-1.9.15p5/src/./sudo.c:378:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(__open_alias("/dev/null", 2, 420), 1)’
sudo-1.9.15p5/src/./sudo.c:374:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./sudo.c:376:12: branch_false: ...to here
sudo-1.9.15p5/src/./sudo.c:378:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./sudo.c:378:36: branch_true: ...to here
sudo-1.9.15p5/src/./sudo.c:378:36: acquire_resource: opened here
sudo-1.9.15p5/src/./sudo.c:378:13: danger: ‘dup2(__open_alias("/dev/null", 2, 420), 1)’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def59]
sudo-1.9.15p5/src/./sudo.c:380:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(__open_alias("/dev/null", 2, 420), 2)’
sudo-1.9.15p5/src/./sudo.c:374:12: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./sudo.c:376:12: branch_false: ...to here
sudo-1.9.15p5/src/./sudo.c:376:13: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./sudo.c:378:12: branch_false: ...to here
sudo-1.9.15p5/src/./sudo.c:380:12: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./sudo.c:380:36: branch_true: ...to here
sudo-1.9.15p5/src/./sudo.c:380:36: acquire_resource: opened here
sudo-1.9.15p5/src/./sudo.c:380:13: danger: ‘dup2(__open_alias("/dev/null", 2, 420), 2)’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
sudo-1.9.15p5/src/./tgetpass.c:314:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup3(pfd[1], 1, 0)’
sudo-1.9.15p5/src/./tgetpass.c:305:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./tgetpass.c:308:13: branch_false: ...to here
sudo-1.9.15p5/src/./tgetpass.c:309:8: branch_false: following ‘false’ branch...
sudo-1.9.15p5/src/./tgetpass.c:312:8: branch_false: ...to here
sudo-1.9.15p5/src/./tgetpass.c:312:8: branch_true: following ‘true’ branch...
sudo-1.9.15p5/src/./tgetpass.c:314:13: branch_true: ...to here
sudo-1.9.15p5/src/./tgetpass.c:314:13: acquire_resource: opened here
sudo-1.9.15p5/src/./tgetpass.c:314:12: danger: ‘dup3(pfd[1], 1, 0)’ leaks here; was opened at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
Scan Properties
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-156.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | sudo-1.9.15-7.p5.fc43 |
store-results-to | /tmp/tmpk0pvy52a/sudo-1.9.15-7.p5.fc43.tar.xz |
time-created | 2025-04-25 15:47:36 |
time-finished | 2025-04-25 15:51:44 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpk0pvy52a/sudo-1.9.15-7.p5.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpk0pvy52a/sudo-1.9.15-7.p5.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |