Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def1]
crun-HEAD/src/libcrun/container.c:3891:23: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'pipefd1'
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'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
# 3889|       }
# 3890|   
# 3891|->   TEMP_FAILURE_RETRY (close (pipefd1));
# 3892|     pipefd1 = -1;
# 3893|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
crun-HEAD/src/libcrun/criu.c: scope_hint: In function 'checkpoint_cgroup_v1_mount'
crun-HEAD/src/libcrun/criu.c:439:22: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  437|         subsystem = strchr (from, ':') + 1;
#  438|         subpath = strchr (subsystem, ':') + 1;
#  439|->       *(subpath - 1) = '\0';
#  440|   
#  441|         if (subsystem[0] == '\0')

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
crun-HEAD/src/libcrun/criu.c:441:20: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
#  439|         *(subpath - 1) = '\0';
#  440|   
#  441|->       if (subsystem[0] == '\0')
#  442|           continue;
#  443|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c:602:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '**ctx.container.context'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
#  600|   
#  601|     /* relative path to dirfd.  */
#  602|->   ret = append_paths (&src_path, err, container->context->id, "seccomp.bpf", NULL);
#  603|     if (UNLIKELY (ret < 0))
#  604|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
crun-HEAD/src/libcrun/seccomp.c:602:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '*container.context'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
#  600|   
#  601|     /* relative path to dirfd.  */
#  602|->   ret = append_paths (&src_path, err, container->context->id, "seccomp.bpf", NULL);
#  603|     if (UNLIKELY (ret < 0))
#  604|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def6]
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'own_seccomp_receiver_fd'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/container.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'close_and_reset.part.0'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.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-191.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.20260813.215201.gc98a3c4.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namecrun-1.29.1-1.20260817233053331575.pr2186.43.gb07c93dc
diffbase-store-results-to/tmp/tmpq9s21uw6/crun-1.29.1-1.20260817233053331575.pr2186.43.gb07c93dc.tar.xz
diffbase-time-created2026-08-17 23:42:01
diffbase-time-finished2026-08-17 23:45:23
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpq9s21uw6/crun-1.29.1-1.20260817233053331575.pr2186.43.gb07c93dc.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpq9s21uw6/crun-1.29.1-1.20260817233053331575.pr2186.43.gb07c93dc.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260810.142351.gef180f1-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-191.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260813.215201.gc98a3c4.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecrun-1.29.1-1.20260816231134416535.main.13.g5ff51777
store-results-to/tmp/tmp2t94uqw3/crun-1.29.1-1.20260816231134416535.main.13.g5ff51777.tar.xz
time-created2026-08-17 23:36:46
time-finished2026-08-17 23:41:32
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmp2t94uqw3/crun-1.29.1-1.20260816231134416535.main.13.g5ff51777.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp2t94uqw3/crun-1.29.1-1.20260816231134416535.main.13.g5ff51777.src.rpm'
tool-versioncsmock-3.8.7.20260810.142351.gef180f1-1.el9