Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:130:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&name, extra | 524546)’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:97:3: branch_true: following ‘true’ branch (when ‘consumer_fd != -1’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:99:7: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:99:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:102:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:102:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:110:20: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:114:6: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:117:11: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:117:10: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:119:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:130:13: acquire_resource: opened here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:130:13: danger: ‘open(&name, extra | 524546)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10) # 128| #endif # 129| # 130|-> ret = open (name, O_NOCTTY | O_RDWR | O_CLOEXEC | extra); # 131| } # 132| Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:196:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(g_build_filename("/run/host", &tty_name, 0), extra | 524546)’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:97:3: branch_true: following ‘true’ branch (when ‘consumer_fd != -1’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:99:7: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:99:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:102:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:102:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:110:20: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:117:10: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:119:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:185:8: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:189:13: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:189:12: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:191:37: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:196:22: acquire_resource: opened here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-agent-util.c:196:22: danger: ‘open(g_build_filename("/run/host", &tty_name, 0), extra | 524546)’ leaks here; was opened at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12) # 194| guint64 old_st_ino, new_st_ino; # 195| # 196|-> alt_fd = open (path, O_NOCTTY | O_RDWR | O_CLOEXEC | extra); # 197| # 198| if (alt_fd != -1 && Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:528:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pair[0]’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:467:1: enter_function: entry to ‘ptyxis_unix_fd_map_create_stream’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:478:3: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:479:3: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:479:3: branch_true: following ‘true’ branch (when ‘dest_read_fd >= 0’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:480:3: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:480:3: branch_true: following ‘true’ branch (when ‘dest_write_fd >= 0’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:7: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:484:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:7: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:486:19: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:518:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:520:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:520:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:522:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:522:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:524:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:524:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:474:28: call_function: inlined call to ‘glib_autoptr_cleanup_GOutputStream’ from ‘ptyxis_unix_fd_map_create_stream’ branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:473:27: call_function: inlined call to ‘glib_autoptr_cleanup_GInputStream’ from ‘ptyxis_unix_fd_map_create_stream’ branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:528:1: danger: ‘stdin_pair[0]’ leaks here # 526| # 527| return g_steal_pointer (&ret); # 528|-> } # 529| # 530| gboolean Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:528:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pair[1]’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:467:1: enter_function: entry to ‘ptyxis_unix_fd_map_create_stream’ ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:478:3: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:479:3: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:479:3: branch_true: following ‘true’ branch (when ‘dest_read_fd >= 0’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:480:3: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:480:3: branch_true: following ‘true’ branch (when ‘dest_write_fd >= 0’)... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:7: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:484:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:483:7: branch_true: following ‘true’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:486:19: branch_true: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:518:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:520:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:520:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:522:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:522:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:524:7: branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:524:6: branch_false: following ‘false’ branch... ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:474:28: call_function: inlined call to ‘glib_autoptr_cleanup_GOutputStream’ from ‘ptyxis_unix_fd_map_create_stream’ branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:473:27: call_function: inlined call to ‘glib_autoptr_cleanup_GInputStream’ from ‘ptyxis_unix_fd_map_create_stream’ branch_false: ...to here ptyxis-48.1/redhat-linux-build/../agent/ptyxis-unix-fd-map.c:528:1: danger: ‘stdin_pair[1]’ leaks here # 526| # 527| return g_steal_pointer (&ret); # 528|-> } # 529| # 530| gboolean
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-83.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 | ptyxis-48.1-1.fc43 |
store-results-to | /tmp/tmpgnwbapn_/ptyxis-48.1-1.fc43.tar.xz |
time-created | 2025-04-25 15:06:58 |
time-finished | 2025-04-25 15:09:32 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpgnwbapn_/ptyxis-48.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgnwbapn_/ptyxis-48.1-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |