Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def1]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def2]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def3]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'seccomp_fd'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'libcrun_container_exec_with_options'
crun-HEAD/src/libcrun/utils.h:228:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_74->process.selinux_label)'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
#  226|   
#  227|     ret = strdup (str);
#  228|->   if (ret == NULL)
#  229|       OOM ();
#  230|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
crun-HEAD/src/libcrun/utils.h:228:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_79->process.apparmor_profile)'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
#  226|   
#  227|     ret = strdup (str);
#  228|->   if (ret == NULL)
#  229|       OOM ();
#  230|   

Scan Properties

analyzer-version-clippy1.89.0
analyzer-version-cppcheck2.18.0
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer15.2.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.89.0
diffbase-analyzer-version-cppcheck2.18.0
diffbase-analyzer-version-gcc15.2.1
diffbase-analyzer-version-gcc-analyzer15.2.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-200.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namecrun-1.23.1-1.20250818052141531210.pr1852.15.g6f7e65cd
diffbase-store-results-to/tmp/tmpmb27gt85/crun-1.23.1-1.20250818052141531210.pr1852.15.g6f7e65cd.tar.xz
diffbase-time-created2025-08-18 05:37:15
diffbase-time-finished2025-08-18 05:42:13
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmpmb27gt85/crun-1.23.1-1.20250818052141531210.pr1852.15.g6f7e65cd.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpmb27gt85/crun-1.23.1-1.20250818052141531210.pr1852.15.g6f7e65cd.src.rpm'
diffbase-tool-versioncsmock-3.8.2.20250811.215846.gf3b3dbf-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-200.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecrun-1.23.1-1.20250807065119329973.main.9.gca8e5c74
store-results-to/tmp/tmpknyzkq7t/crun-1.23.1-1.20250807065119329973.main.9.gca8e5c74.tar.xz
time-created2025-08-18 05:31:25
time-finished2025-08-18 05:36:53
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmpknyzkq7t/crun-1.23.1-1.20250807065119329973.main.9.gca8e5c74.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpknyzkq7t/crun-1.23.1-1.20250807065119329973.main.9.gca8e5c74.src.rpm'
tool-versioncsmock-3.8.2.20250811.215846.gf3b3dbf-1.el9