Newly introduced findings

List of Findings

Error: COMPILER_WARNING: [#def1]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_configure_vm'
crun-HEAD/src/libcrun/handlers/krun.c:247:11: warning[-Wunused-but-set-variable=]: variable 'num_vcpus' set but not used
#  247 |   int32_t num_vcpus, ram_mib;
#      |           ^~~~~~~~~
#  245|     int32_t (*krun_set_vm_config) (uint32_t ctx_id, uint8_t num_vcpus, uint32_t ram_mib);
#  246|     int32_t (*krun_add_net_unixstream) (uint32_t ctx_id, const char *c_path, int fd, uint8_t *const c_mac, uint32_t features, uint32_t flags);
#  247|->   int32_t num_vcpus, ram_mib;
#  248|     int cpus, gpu_flags, ret;
#  249|     cpu_set_t set;

Error: COMPILER_WARNING (CWE-563): [#def2]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_exec'
crun-HEAD/src/libcrun/handlers/krun.c:405:13: warning[-Wunused-variable]: unused variable 'krun_set_vm_config'
#  405 |   int32_t (*krun_set_vm_config) (uint32_t ctx_id, uint8_t num_vcpus, uint32_t ram_mib);
#      |             ^~~~~~~~~~~~~~~~~~
#  403|     int32_t (*krun_set_log_level) (uint32_t level);
#  404|     int (*krun_start_enter) (uint32_t ctx_id);
#  405|->   int32_t (*krun_set_vm_config) (uint32_t ctx_id, uint8_t num_vcpus, uint32_t ram_mib);
#  406|     int32_t (*krun_set_root) (uint32_t ctx_id, const char *root_path);
#  407|     int32_t (*krun_set_root_disk) (uint32_t ctx_id, const char *disk_path);

Error: COMPILER_WARNING (CWE-563): [#def3]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_close_fds'
crun-HEAD/src/libcrun/handlers/krun.c:932:7: warning[-Wunused-variable]: unused variable 'ret'
#  932 |   int ret;
#      |       ^~~
#  930|     int high_passt_fd;
#  931|     int low_passt_fd;
#  932|->   int ret;
#  933|     int i;
#  934|   

Error: CPPCHECK_WARNING (CWE-457): [#def4]
crun-HEAD/src/libcrun/handlers/krun.c:949: warning[uninitvar]: Uninitialized variable: high_passt_fd
#  947|       }
#  948|   
#  949|->   if (first_fd_to_close < high_passt_fd)
#  950|       {
#  951|         for (i = first_fd_to_close; i < high_passt_fd; i++)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def5]
crun-HEAD/src/libcrun/handlers/krun.c: scope_hint: In function 'libkrun_close_fds'
crun-HEAD/src/libcrun/handlers/krun.c:949:6: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'high_passt_fd'
#  947|       }
#  948|   
#  949|->   if (first_fd_to_close < high_passt_fd)
#  950|       {
#  951|         for (i = first_fd_to_close; i < high_passt_fd; i++)

Error: COMPILER_WARNING (CWE-457): [#def6]
crun-HEAD/src/libcrun/handlers/krun.c:949:6: warning[-Wmaybe-uninitialized]: 'high_passt_fd' may be used uninitialized
#  949 |   if (first_fd_to_close < high_passt_fd)
#      |      ^
crun-HEAD/src/libcrun/handlers/krun.c:930:7: note: 'high_passt_fd' was declared here
#  930 |   int high_passt_fd;
#      |       ^~~~~~~~~~~~~
#  947|       }
#  948|   
#  949|->   if (first_fd_to_close < high_passt_fd)
#  950|       {
#  951|         for (i = first_fd_to_close; i < high_passt_fd; i++)

Error: COMPILER_WARNING (CWE-457): [#def7]
crun-HEAD/src/libcrun/handlers/krun.c:953:14: warning[-Wmaybe-uninitialized]: 'low_passt_fd' may be used uninitialized
#  953 |           if (i == low_passt_fd)
#      |              ^
crun-HEAD/src/libcrun/handlers/krun.c:931:7: note: 'low_passt_fd' was declared here
#  931 |   int low_passt_fd;
#      |       ^~~~~~~~~~~~
#  951|         for (i = first_fd_to_close; i < high_passt_fd; i++)
#  952|           {
#  953|->           if (i == low_passt_fd)
#  954|               continue;
#  955|             // If we're closing proc_fd, make sure to invalidate it.

Scan Properties

analyzer-version-clippy1.93.1
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.1
analyzer-version-gcc-analyzer16.0.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.93.1
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.1
diffbase-analyzer-version-gcc-analyzer16.0.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-39.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.20260119.105402.g7a5be1b.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namecrun-1.26-1.20260219103727107411.main.100.ge954750a
diffbase-store-results-to/tmp/tmp9thaerbg/crun-1.26-1.20260219103727107411.main.100.ge954750a.tar.xz
diffbase-time-created2026-02-19 12:59:53
diffbase-time-finished2026-02-19 13:04:17
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmp9thaerbg/crun-1.26-1.20260219103727107411.main.100.ge954750a.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmp9thaerbg/crun-1.26-1.20260219103727107411.main.100.ge954750a.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20260128.181932.g41af877-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-39.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260119.105402.g7a5be1b.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecrun-1.26-1.20260219125406683265.pr1913.105.gcf68ef3b
store-results-to/tmp/tmpbjetd9yr/crun-1.26-1.20260219125406683265.pr1913.105.gcf68ef3b.tar.xz
time-created2026-02-19 13:04:43
time-finished2026-02-19 13:07:54
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,clippy,cppcheck,shellcheck,gcc' '-o' '/tmp/tmpbjetd9yr/crun-1.26-1.20260219125406683265.pr1913.105.gcf68ef3b.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpbjetd9yr/crun-1.26-1.20260219125406683265.pr1913.105.gcf68ef3b.src.rpm'
tool-versioncsmock-3.8.3.20260128.181932.g41af877-1.el9