Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'get_cgroup_scope_path'
crun-HEAD/src/libcrun/cgroup-systemd.c:2088:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 2086|     path_to_scope = xstrdup (cgroup_path);
# 2087|   
# 2088|->   cur = strchr (path_to_scope, '/');
# 2089|     while (cur)
# 2090|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'libcrun_destroy_cgroup_systemd'
crun-HEAD/src/libcrun/cgroup-systemd.c:2089:10: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)'
# 2087|   
# 2088|     cur = strchr (path_to_scope, '/');
# 2089|->   while (cur)
# 2090|       {
# 2091|         char *next = strchr (cur + 1, '/');

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
crun-HEAD/src/libcrun/cgroup-systemd.c:2091:32: warning[-Wanalyzer-malloc-leak]: leak of 'get_cgroup_scope_path(*cgroup_status.path, *cgroup_status.scope)'
# 2089|     while (cur)
# 2090|       {
# 2091|->       char *next = strchr (cur + 1, '/');
# 2092|         if (next == NULL)
# 2093|           break;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
crun-HEAD/src/libcrun/ebpf.c: scope_hint: In function 'libcrun_ebpf_query_cgroup_progs'
crun-HEAD/src/libcrun/ebpf.c:621:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(cgroup_path, 524288)'
#  619|     cleanup_close int cgroup_fd = -1;
#  620|   
#  621|->   cgroup_fd = open (cgroup_path, O_RDONLY | O_CLOEXEC);
#  622|     if (UNLIKELY (cgroup_fd < 0))
#  623|       return crun_make_error (err, errno, "open cgroup path `%s`", cgroup_path);

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def5]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'cgroup_fd'
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|   

Scan Properties

analyzer-version-clippy1.89.0
analyzer-version-cppcheck2.18.2
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.2
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-53.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.20250901085205635666.main.26.gf5f267c6
diffbase-store-results-to/tmp/tmp_zfxkn8c/crun-1.23.1-1.20250901085205635666.main.26.gf5f267c6.tar.xz
diffbase-time-created2025-09-01 13:51:23
diffbase-time-finished2025-09-01 13:56:46
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmp_zfxkn8c/crun-1.23.1-1.20250901085205635666.main.26.gf5f267c6.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp_zfxkn8c/crun-1.23.1-1.20250901085205635666.main.26.gf5f267c6.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-53.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.20250901133616783327.pr1865.27.ga1119953
store-results-to/tmp/tmpmz6hgzxe/crun-1.23.1-1.20250901133616783327.pr1865.27.ga1119953.tar.xz
time-created2025-09-01 13:57:13
time-finished2025-09-01 14:02:36
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,shellcheck,gcc,clippy,cppcheck' '-o' '/tmp/tmpmz6hgzxe/crun-1.23.1-1.20250901133616783327.pr1865.27.ga1119953.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpmz6hgzxe/crun-1.23.1-1.20250901133616783327.pr1865.27.ga1119953.src.rpm'
tool-versioncsmock-3.8.2.20250811.215846.gf3b3dbf-1.el9