Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1]
crun-HEAD/src/libcrun/cgroup-resources.c:153:12: warning[-Wanalyzer-null-argument]: use of NULL 'controllers' where non-null expected
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
#  151|         key = xstrdup (name);
#  152|   
#  153|->       it = strchr (key, '.');
#  154|         if (it == NULL)
#  155|           {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def2]
crun-HEAD/src/libcrun/cgroup-systemd.c: scope_hint: In function 'bpfprog_path_from_scope'
crun-HEAD/src/libcrun/cgroup-systemd.c:1378:16: warning[-Wanalyzer-null-argument]: use of NULL 'it' where non-null expected
crun-HEAD/src/libcrun/cgroup-internal.h:22: included_from: Included from here.
crun-HEAD/src/libcrun/cgroup-systemd.c:23: included_from: Included from here.
<built-in>: note: argument 1 of '__builtin_strchr' must be non-null
# 1376|     /* Remove dots as EBPF code don't like them.  */
# 1377|     it = flat_scope;
# 1378|->   while ((it = strchr (it, '.')) != NULL)
# 1379|       *it = '_';
# 1380|   

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

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def4]
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '<unknown>'
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.88.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.1.1
analyzer-version-gcc-analyzer15.1.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.88.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.1.1
diffbase-analyzer-version-gcc-analyzer15.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-43.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.22-1.20250707150928550524.main.27.gd3b2b788
diffbase-store-results-to/tmp/tmpdirdqfkn/crun-1.22-1.20250707150928550524.main.27.gd3b2b788.tar.xz
diffbase-time-created2025-07-07 19:57:45
diffbase-time-finished2025-07-07 20:14:59
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,unicontrol,gcc,clippy,cppcheck' '-o' '/tmp/tmpdirdqfkn/crun-1.22-1.20250707150928550524.main.27.gd3b2b788.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpdirdqfkn/crun-1.22-1.20250707150928550524.main.27.gd3b2b788.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250626.171830.gc374be3-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-43.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.22-1.20250707194527212982.pr1795.31.g9d788ac3
store-results-to/tmp/tmppa20xdq3/crun-1.22-1.20250707194527212982.pr1795.31.g9d788ac3.tar.xz
time-created2025-07-07 20:15:17
time-finished2025-07-07 20:31:00
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,unicontrol,gcc,clippy,cppcheck' '-o' '/tmp/tmppa20xdq3/crun-1.22-1.20250707194527212982.pr1795.31.g9d788ac3.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmppa20xdq3/crun-1.22-1.20250707194527212982.pr1795.31.g9d788ac3.src.rpm'
tool-versioncsmock-3.8.1.20250626.171830.gc374be3-1.el9