cockpit-354-1.fc44
List of Findings
Error: SHELLCHECK_WARNING (CWE-569): [#def1]
/usr/libexec/cockpit-desktop:122:12: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
Error: SHELLCHECK_WARNING (CWE-569): [#def2]
/usr/libexec/cockpit-desktop:122:30: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
cockpit-354/src/common/cockpitauthorize.c:72:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nonce’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:551:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:551:6: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitauthorize.c:553:7: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:553:7: call_function: calling ‘message’ from ‘cockpit_authorize_build_x_conversation’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
cockpit-354/src/common/cockpitauthorize.c:72:7: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
cockpit-354/src/common/cockpitauthorize.c:224:1: enter_function: entry to ‘cockpit_authorize_parse_basic’
cockpit-354/src/common/cockpitauthorize.c:234:15: call_function: calling ‘cockpit_authorize_type’ from ‘cockpit_authorize_parse_basic’
cockpit-354/src/common/cockpitauthorize.c:234:15: return_function: returning to ‘cockpit_authorize_parse_basic’ from ‘cockpit_authorize_type’
cockpit-354/src/common/cockpitauthorize.c:235:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:238:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:238:6: branch_true: following ‘true’ branch (when the strings are non-equal)...
cockpit-354/src/common/cockpitauthorize.c:240:7: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:240:7: call_function: calling ‘message’ from ‘cockpit_authorize_parse_basic’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
cockpit-354/src/common/cockpitauthorize.c:82:7: warning[-Wanalyzer-malloc-leak]: leak of ‘nonce’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:551:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:551:6: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitauthorize.c:553:7: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:553:7: call_function: calling ‘message’ from ‘cockpit_authorize_build_x_conversation’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
cockpit-354/src/common/cockpitauthorize.c:82:7: warning[-Wanalyzer-malloc-leak]: leak of ‘type’
cockpit-354/src/common/cockpitauthorize.c:224:1: enter_function: entry to ‘cockpit_authorize_parse_basic’
cockpit-354/src/common/cockpitauthorize.c:234:15: call_function: calling ‘cockpit_authorize_type’ from ‘cockpit_authorize_parse_basic’
cockpit-354/src/common/cockpitauthorize.c:234:15: return_function: returning to ‘cockpit_authorize_parse_basic’ from ‘cockpit_authorize_type’
cockpit-354/src/common/cockpitauthorize.c:235:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:238:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:238:6: branch_true: following ‘true’ branch (when the strings are non-equal)...
cockpit-354/src/common/cockpitauthorize.c:240:7: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:240:7: call_function: calling ‘message’ from ‘cockpit_authorize_parse_basic’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
cockpit-354/src/common/cockpitauthorize.c:86:3: warning[-Wanalyzer-malloc-leak]: leak of ‘nonce’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:551:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:551:6: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitauthorize.c:553:7: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:553:7: call_function: calling ‘message’ from ‘cockpit_authorize_build_x_conversation’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
cockpit-354/src/common/cockpitauthorize.c:124:21: warning[-Wanalyzer-malloc-leak]: leak of ‘cockpit_authorize_nonce(128)’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:11: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:124:21: danger: ‘cockpit_authorize_nonce(128)’ leaks here; was allocated at [(6)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/5)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
cockpit-354/src/common/cockpitauthorize.c:135:3: warning[-Wanalyzer-malloc-leak]: leak of ‘key’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
cockpit-354/src/common/cockpitauthorize.c:337:7: warning[-Wanalyzer-malloc-leak]: leak of ‘encoded’
cockpit-354/src/common/cockpitauthorize.c:321:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:328:10: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:330:13: acquire_memory: allocated here
cockpit-354/src/common/cockpitauthorize.c:331:6: branch_false: following ‘false’ branch (when ‘encoded’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:337:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:337:7: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:337:7: danger: ‘encoded’ leaks here; was allocated at [(3)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def11]
cockpit-354/src/common/cockpitauthorize.c:396:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
cockpit-354/src/common/cockpitauthorize.c:363:1: enter_function: entry to ‘cockpit_authorize_parse_negotiate’
cockpit-354/src/common/cockpitauthorize.c:372:15: call_function: calling ‘cockpit_authorize_type’ from ‘cockpit_authorize_parse_negotiate’
cockpit-354/src/common/cockpitauthorize.c:372:15: return_function: returning to ‘cockpit_authorize_parse_negotiate’ from ‘cockpit_authorize_type’
cockpit-354/src/common/cockpitauthorize.c:373:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:376:15: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:379:6: branch_false: following ‘false’ branch (when the strings are equal)...
cockpit-354/src/common/cockpitauthorize.c:386:9: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:387:9: acquire_memory: allocated here
cockpit-354/src/common/cockpitauthorize.c:388:6: branch_false: following ‘false’ branch (when ‘buf’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:396:9: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:396:9: throw: if ‘cockpit_base64_pton’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:396:9: danger: ‘buf’ leaks here; was allocated at [(19)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/18)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
cockpit-354/src/common/cockpitauthorize.c:432:11: warning[-Wanalyzer-malloc-leak]: leak of ‘encoded’
cockpit-354/src/common/cockpitauthorize.c:419:6: branch_false: following ‘false’ branch (when ‘input’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:422:6: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:422:6: branch_true: following ‘true’ branch (when ‘length != 0’)...
cockpit-354/src/common/cockpitauthorize.c:424:14: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:425:17: acquire_memory: allocated here
cockpit-354/src/common/cockpitauthorize.c:426:10: branch_false: following ‘false’ branch (when ‘encoded’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:432:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:432:11: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:432:11: danger: ‘encoded’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
cockpit-354/src/common/cockpitauthorize.c:543:11: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:536:22: acquire_memory: allocated here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:11: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:543:11: danger: ‘alloc’ leaks here; was allocated at [(15)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/14)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
cockpit-354/src/common/cockpitauthorize.c:569:11: warning[-Wanalyzer-malloc-leak]: leak of ‘encoded’
cockpit-354/src/common/cockpitauthorize.c:522:6: branch_true: following ‘true’ branch (when ‘conversation’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:523:5: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:525:6: branch_false: following ‘false’ branch (when ‘conv’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:551:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:551:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:558:10: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:559:6: branch_true: following ‘true’ branch (when ‘plen != 0’)...
cockpit-354/src/common/cockpitauthorize.c:561:14: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:562:17: acquire_memory: allocated here
cockpit-354/src/common/cockpitauthorize.c:563:10: branch_false: following ‘false’ branch (when ‘encoded’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:569:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:569:11: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:569:11: danger: ‘encoded’ leaks here; was allocated at [(9)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
cockpit-354/src/common/cockpitauthorize.c:569:11: warning[-Wanalyzer-malloc-leak]: leak of ‘nonce’
cockpit-354/src/common/cockpitauthorize.c:506:1: enter_function: entry to ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: call_function: calling ‘cockpit_authorize_nonce’ from ‘cockpit_authorize_build_x_conversation’
cockpit-354/src/common/cockpitauthorize.c:527:15: return_function: returning to ‘cockpit_authorize_build_x_conversation’ from ‘cockpit_authorize_nonce’
cockpit-354/src/common/cockpitauthorize.c:528:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:536:22: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:537:10: branch_false: following ‘false’ branch (when ‘alloc’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:543:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:543:10: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:551:7: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:551:6: branch_false: following ‘false’ branch...
cockpit-354/src/common/cockpitauthorize.c:558:10: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:559:6: branch_true: following ‘true’ branch (when ‘plen != 0’)...
cockpit-354/src/common/cockpitauthorize.c:561:14: branch_true: ...to here
cockpit-354/src/common/cockpitauthorize.c:563:10: branch_false: following ‘false’ branch (when ‘encoded’ is non-NULL)...
cockpit-354/src/common/cockpitauthorize.c:569:11: branch_false: ...to here
cockpit-354/src/common/cockpitauthorize.c:569:11: throw: if ‘cockpit_base64_ntop’ throws an exception...
cockpit-354/src/common/cockpitauthorize.c:569:11: danger: ‘nonce’ leaks here; was allocated at [(6)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/5)
Error: COMPILER_WARNING (CWE-704): [#def16]
cockpit-354/src/common/cockpitbase64.c: scope_hint: In function ‘cockpit_base64_pton’
cockpit-354/src/common/cockpitbase64.c:90:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def17]
cockpit-354/src/common/cockpitbase64.c:90:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: GCC_ANALYZER_WARNING (CWE-404): [#def18]
cockpit-354/src/common/cockpitchannel.c:838:13: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/common/cockpitchannel.c:834:3: branch_true: following ‘true’ branch (when ‘problem’ is non-NULL)...
cockpit-354/src/common/cockpitchannel.c:835:3: branch_true: ...to here
cockpit-354/src/common/cockpitchannel.c:835:3: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitchannel.c:837:3: branch_true: ...to here
cockpit-354/src/common/cockpitchannel.c:837:3: acquire_resource: ‘va_start’ called here
cockpit-354/src/common/cockpitchannel.c:838:13: throw: if ‘g_strdup_vprintf’ throws an exception...
cockpit-354/src/common/cockpitchannel.c:838:13: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def19]
cockpit-354/src/common/cockpitconf.c:66:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file_path, "r")’
cockpit-354/src/common/cockpitconf.c:359:1: enter_function: entry to ‘cockpit_conf_uint’
cockpit-354/src/common/cockpitconf.c:369:22: call_function: inlined call to ‘cockpit_conf_string’ from ‘cockpit_conf_uint’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
cockpit-354/src/common/cockpitconf.c:66:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file_path, "r")’
cockpit-354/src/common/cockpitconf.c:359:1: enter_function: entry to ‘cockpit_conf_uint’
cockpit-354/src/common/cockpitconf.c:369:22: call_function: inlined call to ‘cockpit_conf_string’ from ‘cockpit_conf_uint’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def21]
cockpit-354/src/common/cockpitconf.c:70:7: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file_path, "r")’
cockpit-354/src/common/cockpitconf.c:359:1: enter_function: entry to ‘cockpit_conf_uint’
cockpit-354/src/common/cockpitconf.c:369:22: call_function: inlined call to ‘cockpit_conf_string’ from ‘cockpit_conf_uint’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
cockpit-354/src/common/cockpitconf.c:70:7: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file_path, "r")’
cockpit-354/src/common/cockpitconf.c:359:1: enter_function: entry to ‘cockpit_conf_uint’
cockpit-354/src/common/cockpitconf.c:369:22: call_function: inlined call to ‘cockpit_conf_string’ from ‘cockpit_conf_uint’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def23]
cockpit-354/src/common/cockpitpipe.c:1193:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sock’
cockpit-354/src/common/cockpitpipe.c:1184:3: branch_false: following ‘false’ branch (when ‘address’ is non-NULL)...
cockpit-354/src/common/cockpitpipe.c:1184:3: branch_false: ...to here
cockpit-354/src/common/cockpitpipe.c:1186:10: acquire_resource: stream socket created here
cockpit-354/src/common/cockpitpipe.c:1187:6: branch_false: following ‘false’ branch (when ‘sock >= 0’)...
cockpit-354/src/common/cockpitpipe.c:1193:12: branch_false: ...to here
cockpit-354/src/common/cockpitpipe.c:1193:12: throw: if ‘g_unix_set_fd_nonblocking’ throws an exception...
cockpit-354/src/common/cockpitpipe.c:1193:12: danger: ‘sock’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
cockpit-354/src/common/cockpitpipe.c:1277:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘r’
cockpit-354/src/common/cockpitpipe.c:1266:1: enter_function: entry to ‘spawn_setup’
cockpit-354/src/common/cockpitpipe.c:1275:6: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitpipe.c:1276:13: branch_true: ...to here
cockpit-354/src/common/cockpitpipe.c:1276:13: acquire_resource: opened here
cockpit-354/src/common/cockpitpipe.c:1277:5: branch_false: following ‘false’ branch (when ‘r != 2’)...
branch_false: ...to here
call_function: calling ‘spawn_setup’ from ‘spawn_setup’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def25]
cockpit-354/src/common/cockpitpipe.c:1279:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘r’
cockpit-354/src/common/cockpitpipe.c:1275:6: branch_true: following ‘true’ branch...
cockpit-354/src/common/cockpitpipe.c:1276:13: branch_true: ...to here
cockpit-354/src/common/cockpitpipe.c:1276:13: acquire_resource: opened here
cockpit-354/src/common/cockpitpipe.c:1277:5: branch_true: following ‘true’ branch (when ‘r == 2’)...
cockpit-354/src/common/cockpitpipe.c:1279:1: branch_true: ...to here
cockpit-354/src/common/cockpitpipe.c:1279:1: danger: ‘r’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: COMPILER_WARNING (CWE-704): [#def26]
cockpit-354/src/common/cockpitpipe.c: scope_hint: In function ‘environ_find’
cockpit-354/src/common/cockpitpipe.c:1716:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def27]
cockpit-354/src/common/cockpitpipe.c:1716:7: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: GCC_ANALYZER_WARNING (CWE-457): [#def28]
cockpit-354/src/common/cockpitpipe.h:35:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipe’
cockpit-354/src/ws/main.c:140:6: branch_false: following ‘false’ branch...
cockpit-354/src/ws/main.c:144:7: branch_false: ...to here
cockpit-354/src/ws/main.c:150:6: branch_false: following ‘false’ branch...
cockpit-354/src/ws/main.c:157:6: branch_false: ...to here
cockpit-354/src/ws/main.c:220:10: branch_false: following ‘false’ branch...
cockpit-354/src/ws/main.c:227:7: branch_false: ...to here
cockpit-354/src/ws/main.c:262:6: branch_true: following ‘true’ branch...
cockpit-354/src/ws/main.c:267:11: branch_true: ...to here
cockpit-354/src/ws/main.c:283:13: throw: if ‘getpwuid’ throws an exception...
cockpit-354/src/ws/main.c:264:30: call_function: inlined call to ‘glib_autoptr_cleanup_CockpitPipe’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-404): [#def29]
cockpit-354/src/common/cockpittransport.c:478:12: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/common/cockpittransport.c:506:1: enter_function: entry to ‘cockpit_transport_build_control’
cockpit-354/src/common/cockpittransport.c:513:3: acquire_resource: ‘va_start’ called here
cockpit-354/src/common/cockpittransport.c:514:12: call_function: calling ‘build_json_va’ from ‘cockpit_transport_build_control’
Error: GCC_ANALYZER_WARNING (CWE-404): [#def30]
cockpit-354/src/common/cockpittransport.c:484:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/common/cockpittransport.c:506:1: enter_function: entry to ‘cockpit_transport_build_control’
cockpit-354/src/common/cockpittransport.c:513:3: acquire_resource: ‘va_start’ called here
cockpit-354/src/common/cockpittransport.c:514:12: call_function: calling ‘build_json_va’ from ‘cockpit_transport_build_control’
Error: COMPILER_WARNING (CWE-704): [#def31]
cockpit-354/src/common/cockpitwebserver.c: scope_hint: In function ‘cockpit_web_server_parse_accept_list’
cockpit-354/src/common/cockpitwebserver.c:529:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def32]
cockpit-354/src/common/cockpitwebserver.c:529:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def33]
cockpit-354/src/common/cockpitwebserver.c:539:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def34]
cockpit-354/src/common/cockpitwebserver.c:539:11: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def35]
cockpit-354/src/common/cockpitwebserver.c:576:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def36]
cockpit-354/src/common/cockpitwebserver.c:576:15: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
Error: GCC_ANALYZER_WARNING (CWE-457): [#def37]
cockpit-354/src/common/cockpitwebserver.h:80:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘server’
cockpit-354/src/ws/main.c:140:6: branch_false: following ‘false’ branch...
cockpit-354/src/ws/main.c:144:7: branch_false: ...to here
cockpit-354/src/ws/main.c:150:6: branch_false: following ‘false’ branch...
cockpit-354/src/ws/main.c:157:6: branch_false: ...to here
cockpit-354/src/ws/main.c:206:29: throw: if ‘sd_listen_fds’ throws an exception...
cockpit-354/src/ws/main.c:124:31: call_function: inlined call to ‘glib_autoptr_cleanup_CockpitWebServer’ from ‘main’
Error: GCC_ANALYZER_WARNING (CWE-404): [#def38]
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:143:7: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:844:1: enter_function: entry to ‘start_agent’
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:852:13: call_function: calling ‘pam_ssh_add_start_agent’ from ‘start_agent’
Error: GCC_ANALYZER_WARNING (CWE-404): [#def39]
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:152:5: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:844:1: enter_function: entry to ‘start_agent’
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:852:13: call_function: calling ‘pam_ssh_add_start_agent’ from ‘start_agent’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:831:7: warning[-Wanalyzer-malloc-leak]: leak of ‘strdupx(password)’
/usr/include/security/pam_modules.h:34:5: enter_function: entry to ‘pam_sm_authenticate’
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:1019:6: branch_true: following ‘true’ branch...
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:1020:5: branch_true: ...to here
cockpit-354/src/pam-ssh-add/pam-ssh-add.c:1020:5: call_function: calling ‘stash_password_for_session’ from ‘pam_sm_authenticate’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
cockpit-354/src/session/client-certificate.c:55:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_proc_pid(pid)’
cockpit-354/src/session/client-certificate.c:178:1: enter_function: entry to ‘get_ws_proc_fd’
cockpit-354/src/session/client-certificate.c:184:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/client-certificate.c:196:7: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:196:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/client-certificate.c:200:15: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:201:6: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
cockpit-354/src/session/client-certificate.c:210:23: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:210:23: call_function: calling ‘open_proc_pid’ from ‘get_ws_proc_fd’
cockpit-354/src/session/client-certificate.c:210:23: return_function: returning to ‘get_ws_proc_fd’ from ‘open_proc_pid’
cockpit-354/src/session/client-certificate.c:55:13: danger: ‘open_proc_pid(pid)’ leaks here; was opened at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
cockpit-354/src/session/client-certificate.c:55:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open_proc_pid(ucred.pid)’
cockpit-354/src/session/client-certificate.c:137:1: enter_function: entry to ‘get_ws_proc_fd_pid_time’
cockpit-354/src/session/client-certificate.c:141:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/client-certificate.c:143:7: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:141:7: branch_false: following ‘false’ branch...
cockpit-354/src/session/client-certificate.c:151:23: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:151:23: call_function: calling ‘open_proc_pid’ from ‘get_ws_proc_fd_pid_time’
cockpit-354/src/session/client-certificate.c:151:23: return_function: returning to ‘get_ws_proc_fd_pid_time’ from ‘open_proc_pid’
cockpit-354/src/session/client-certificate.c:152:38: call_function: calling ‘get_proc_pid_start_time’ from ‘get_ws_proc_fd_pid_time’
Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
cockpit-354/src/session/client-certificate.c:280:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/run/cockpit/tls/clients", 2293760)’
cockpit-354/src/session/client-certificate.c:267:6: branch_true: following ‘true’ branch...
cockpit-354/src/session/client-certificate.c:273:11: branch_true: ...to here
cockpit-354/src/session/client-certificate.c:273:11: acquire_resource: opened here
cockpit-354/src/session/client-certificate.c:274:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/client-certificate.c:280:12: branch_false: ...to here
cockpit-354/src/session/client-certificate.c:280:12: throw: if ‘openat’ throws an exception...
cockpit-354/src/session/client-certificate.c:280:12: danger: ‘open("/run/cockpit/tls/clients", 2293760)’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def44]
cockpit-354/src/session/session-utils.c:222:40: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/lastlog", 2)’
cockpit-354/src/session/session-utils.c:215:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:216:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:222:40: branch_false: ...to here
cockpit-354/src/session/session-utils.c:222:7: throw: if ‘pread’ throws an exception...
cockpit-354/src/session/session-utils.c:222:40: danger: ‘open("/var/log/lastlog", 2)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
cockpit-354/src/session/session-utils.c:354:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 524288)’
cockpit-354/src/session/session-utils.c:326:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:327:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:327:6: branch_false: ...to here
cockpit-354/src/session/session-utils.c:349:10: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:352:10: branch_false: ...to here
cockpit-354/src/session/session-utils.c:354:11: throw: if ‘warn’ throws an exception...
cockpit-354/src/session/session-utils.c:354:11: danger: ‘open("/var/log/btmp", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def46]
cockpit-354/src/session/session-utils.c:359:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 524288)’
cockpit-354/src/session/session-utils.c:326:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:327:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:327:6: branch_false: ...to here
cockpit-354/src/session/session-utils.c:349:10: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:352:10: branch_false: ...to here
cockpit-354/src/session/session-utils.c:352:10: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:357:10: branch_false: ...to here
cockpit-354/src/session/session-utils.c:359:11: throw: if ‘warnx’ throws an exception...
cockpit-354/src/session/session-utils.c:359:11: danger: ‘open("/var/log/btmp", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def47]
cockpit-354/src/session/session-utils.c:364:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 524288)’
cockpit-354/src/session/session-utils.c:326:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:327:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:327:6: branch_false: ...to here
cockpit-354/src/session/session-utils.c:352:10: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:357:10: branch_false: ...to here
cockpit-354/src/session/session-utils.c:357:10: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:364:11: branch_false: ...to here
cockpit-354/src/session/session-utils.c:372:6: branch_false: following ‘false’ branch (when ‘fail_count != 0’)...
cockpit-354/src/session/session-utils.c:379:13: branch_false: ...to here
cockpit-354/src/session/session-utils.c:379:13: throw: if ‘cockpit_json_print_integer_property’ throws an exception...
cockpit-354/src/session/session-utils.c:364:11: danger: ‘open("/var/log/btmp", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def48]
cockpit-354/src/session/session-utils.c:385:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 524288)’
cockpit-354/src/session/session-utils.c:326:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:327:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:327:6: branch_false: ...to here
cockpit-354/src/session/session-utils.c:372:6: branch_true: following ‘true’ branch (when ‘fail_count == 0’)...
cockpit-354/src/session/session-utils.c:375:7: branch_true: ...to here
cockpit-354/src/session/session-utils.c:385:6: danger: ‘open("/var/log/btmp", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def49]
cockpit-354/src/session/session-utils.c:386:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 524288)’
cockpit-354/src/session/session-utils.c:326:8: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:327:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:327:6: branch_false: ...to here
cockpit-354/src/session/session-utils.c:372:6: branch_true: following ‘true’ branch (when ‘fail_count == 0’)...
cockpit-354/src/session/session-utils.c:375:7: branch_true: ...to here
cockpit-354/src/session/session-utils.c:385:6: branch_true: following ‘true’ branch...
cockpit-354/src/session/session-utils.c:386:5: branch_true: ...to here
cockpit-354/src/session/session-utils.c:386:5: danger: ‘open("/var/log/btmp", 524288)’ leaks here; was opened at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def50]
cockpit-354/src/session/session-utils.c:479:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 1025)’
cockpit-354/src/session/session-utils.c:472:12: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:473:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:479:15: branch_false: ...to here
cockpit-354/src/session/session-utils.c:479:15: throw: if ‘write’ throws an exception...
cockpit-354/src/session/session-utils.c:479:15: danger: ‘open("/var/log/btmp", 1025)’ leaks here; was opened at [(3)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def51]
cockpit-354/src/session/session-utils.c:482:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 1025)’
cockpit-354/src/session/session-utils.c:472:12: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:473:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:479:15: branch_false: ...to here
cockpit-354/src/session/session-utils.c:480:6: branch_true: following ‘true’ branch...
cockpit-354/src/session/session-utils.c:482:7: branch_true: ...to here
cockpit-354/src/session/session-utils.c:482:7: throw: if ‘warn’ throws an exception...
cockpit-354/src/session/session-utils.c:482:7: danger: ‘open("/var/log/btmp", 1025)’ leaks here; was opened at [(3)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def52]
cockpit-354/src/session/session-utils.c:487:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 1025)’
cockpit-354/src/session/session-utils.c:472:12: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:473:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:479:15: branch_false: ...to here
cockpit-354/src/session/session-utils.c:480:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:485:11: branch_false: ...to here
cockpit-354/src/session/session-utils.c:485:11: branch_true: following ‘true’ branch...
cockpit-354/src/session/session-utils.c:487:7: branch_true: ...to here
cockpit-354/src/session/session-utils.c:487:7: throw: if ‘warnx’ throws an exception...
cockpit-354/src/session/session-utils.c:487:7: danger: ‘open("/var/log/btmp", 1025)’ leaks here; was opened at [(3)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
cockpit-354/src/session/session-utils.c:494:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/var/log/btmp", 1025)’
cockpit-354/src/session/session-utils.c:472:12: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:473:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:479:15: branch_false: ...to here
cockpit-354/src/session/session-utils.c:493:6: branch_true: following ‘true’ branch...
cockpit-354/src/session/session-utils.c:494:5: branch_true: ...to here
cockpit-354/src/session/session-utils.c:494:5: danger: ‘open("/var/log/btmp", 1025)’ leaks here; was opened at [(3)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def54]
cockpit-354/src/session/session-utils.c:571:10: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*<unknown>, i)’
cockpit-354/src/session/session-utils.c:545:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session-utils.c:548:14: branch_false: ...to here
cockpit-354/src/session/session-utils.c:569:19: branch_true: following ‘true’ branch (when ‘i < n_remap_fds’)...
cockpit-354/src/session/session-utils.c:570:12: branch_true: ...to here
cockpit-354/src/session/session-utils.c:570:8: branch_true: following ‘true’ branch...
cockpit-354/src/session/session-utils.c:571:11: branch_true: ...to here
cockpit-354/src/session/session-utils.c:571:11: acquire_resource: opened here
cockpit-354/src/session/session-utils.c:571:10: danger: ‘dup2(*<unknown>, i)’ leaks here; was opened at [(7)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def55]
cockpit-354/src/session/session.c:871:71: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 0)’
cockpit-354/src/session/session.c:862:3: branch_true: following ‘true’ branch...
cockpit-354/src/session/session.c:864:17: branch_true: ...to here
cockpit-354/src/session/session.c:864:17: acquire_resource: opened here
cockpit-354/src/session/session.c:865:6: branch_false: following ‘false’ branch...
cockpit-354/src/session/session.c:868:13: branch_false: ...to here
cockpit-354/src/session/session.c:871:13: throw: if ‘spawn_and_wait’ throws an exception...
cockpit-354/src/session/session.c:871:71: danger: ‘open("/dev/null", 0)’ leaks here; was opened at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: COMPILER_WARNING (CWE-704): [#def56]
cockpit-354/src/tls/cockpit-certificate-ensure.c: scope_hint: In function ‘certificate_and_key_split’
cockpit-354/src/tls/cockpit-certificate-ensure.c:251:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def57]
cockpit-354/src/tls/cockpit-certificate-ensure.c:251:21: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def58]
cockpit-354/src/tls/cockpit-certificate-ensure.c:256:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def59]
cockpit-354/src/tls/cockpit-certificate-ensure.c:256:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
cockpit-354/src/tls/connection.c:398:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
cockpit-354/src/tls/connection.c:390:8: acquire_resource: socket created here
cockpit-354/src/tls/connection.c:391:6: branch_false: following ‘false’ branch (when ‘fd != -1’)...
cockpit-354/src/tls/connection.c:398:7: branch_false: ...to here
cockpit-354/src/tls/connection.c:398:7: throw: if ‘af_unix_connectat’ throws an exception...
cockpit-354/src/tls/connection.c:398:7: danger: ‘fd’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def61]
cockpit-354/src/tls/server.c:243:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘server.first_listener’
cockpit-354/src/tls/server.c:201:3: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:202:3: branch_false: ...to here
cockpit-354/src/tls/server.c:229:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:231:7: branch_false: ...to here
cockpit-354/src/tls/server.c:238:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:240:11: branch_false: ...to here
cockpit-354/src/tls/server.c:240:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:242:11: branch_false: ...to here
cockpit-354/src/tls/server.c:242:10: branch_true: following ‘true’ branch...
cockpit-354/src/tls/server.c:243:9: branch_true: ...to here
cockpit-354/src/tls/server.c:243:9: danger: ‘server.first_listener’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def62]
cockpit-354/src/tls/server.c:248:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘server.first_listener’
cockpit-354/src/tls/server.c:201:3: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:202:3: branch_false: ...to here
cockpit-354/src/tls/server.c:229:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:231:7: branch_false: ...to here
cockpit-354/src/tls/server.c:238:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:240:11: branch_false: ...to here
cockpit-354/src/tls/server.c:240:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:242:11: branch_false: ...to here
cockpit-354/src/tls/server.c:242:10: branch_false: following ‘false’ branch...
cockpit-354/src/tls/server.c:273:1: branch_false: ...to here
cockpit-354/src/tls/server.c:248:20: danger: ‘server.first_listener’ leaks here
Error: GCC_ANALYZER_WARNING (CWE-775): [#def63]
cockpit-354/src/ws/cockpitauth.c:464:6: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*(ChildData *)data.io, 0)’
cockpit-354/src/ws/cockpitauth.c:464:7: acquire_resource: opened here
cockpit-354/src/ws/cockpitauth.c:464:6: danger: ‘dup2(*(ChildData *)data.io, 0)’ leaks here; was opened at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def64]
cockpit-354/src/ws/cockpitauth.c:464:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(*(ChildData *)data.io, 1)’
cockpit-354/src/ws/cockpitauth.c:464:6: branch_false: following ‘false’ branch...
cockpit-354/src/ws/cockpitauth.c:464:34: branch_false: ...to here
cockpit-354/src/ws/cockpitauth.c:464:34: acquire_resource: opened here
cockpit-354/src/ws/cockpitauth.c:464:7: danger: ‘dup2(*(ChildData *)data.io, 1)’ leaks here; was opened at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def65]
cockpit-354/src/ws/cockpitcreds.c:112:9: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/ws/cockpitcreds.c:88:3: branch_true: following ‘true’ branch (when ‘application’ is non-NULL)...
cockpit-354/src/ws/cockpitcreds.c:89:3: branch_true: ...to here
cockpit-354/src/ws/cockpitcreds.c:89:3: branch_true: following ‘true’ branch...
cockpit-354/src/ws/cockpitcreds.c:91:11: branch_true: ...to here
cockpit-354/src/ws/cockpitcreds.c:95:3: acquire_resource: ‘va_start’ called here
cockpit-354/src/ws/cockpitcreds.c:99:10: branch_false: following ‘false’ branch (when ‘type’ is non-NULL)...
cockpit-354/src/ws/cockpitcreds.c:101:16: branch_false: ...to here
cockpit-354/src/ws/cockpitcreds.c:105:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
cockpit-354/src/ws/cockpitcreds.c:107:16: branch_false: ...to here
cockpit-354/src/ws/cockpitcreds.c:107:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
cockpit-354/src/ws/cockpitcreds.c:109:16: branch_false: ...to here
cockpit-354/src/ws/cockpitcreds.c:109:15: branch_false: following ‘false’ branch (when the strings are non-equal)...
cockpit-354/src/ws/cockpitcreds.c:112:9: branch_false: ...to here
cockpit-354/src/ws/cockpitcreds.c:112:9: throw: if ‘g_assertion_message_expr’ throws an exception...
cockpit-354/src/ws/cockpitcreds.c:112:9: danger: missing call to ‘va_end’ to match ‘va_start’ at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def66]
cockpit-354/src/ws/cockpitcreds.c:163:7: warning[-Wanalyzer-va-list-leak]: missing call to ‘va_end’
cockpit-354/src/ws/cockpitcreds.c:80:1: enter_function: entry to ‘cockpit_creds_new’
cockpit-354/src/ws/cockpitcreds.c:88:3: branch_true: following ‘true’ branch (when ‘application’ is non-NULL)...
cockpit-354/src/ws/cockpitcreds.c:89:3: branch_true: ...to here
cockpit-354/src/ws/cockpitcreds.c:89:3: branch_true: following ‘true’ branch...
cockpit-354/src/ws/cockpitcreds.c:91:11: branch_true: ...to here
cockpit-354/src/ws/cockpitcreds.c:95:3: acquire_resource: ‘va_start’ called here
cockpit-354/src/ws/cockpitcreds.c:99:10: branch_false: following ‘false’ branch (when ‘type’ is non-NULL)...
cockpit-354/src/ws/cockpitcreds.c:101:16: branch_false: ...to here
cockpit-354/src/ws/cockpitcreds.c:101:15: branch_true: following ‘true’ branch (when the strings are equal)...
cockpit-354/src/ws/cockpitcreds.c:102:40: branch_true: ...to here
cockpit-354/src/ws/cockpitcreds.c:102:9: call_function: calling ‘cockpit_creds_set_user’ from ‘cockpit_creds_new’
Scan Properties
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| 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-160.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.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | cockpit-354-1.fc44 |
| store-results-to | /tmp/tmpkm6w1tk3/cockpit-354-1.fc44.tar.xz |
| time-created | 2026-01-08 15:42:28 |
| time-finished | 2026-01-08 15:45:17 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpkm6w1tk3/cockpit-354-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpkm6w1tk3/cockpit-354-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |