Error: GCC_ANALYZER_WARNING (CWE-476): [#def1] libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘((virDomainIothreadMappingDef)*(void *)((void *)ioth)).queues’ libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2834:8: branch_false: following ‘false’ branch (when ‘iothreads’ is non-NULL)... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2837:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2839:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2858:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2858:25: branch_true: following ‘true’ branch (when ‘n’ is non-NULL)... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2859:38: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2863:12: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2869:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2871:12: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2878:13: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2878:12: branch_false: following ‘false’ branch... branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2884:21: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: danger: dereference of NULL ‘*ioth.queues + i * 4’ # 2885| bool hasMapping; # 2886| # 2887|-> if (virBitmapGetBit(queueMap, ioth->queues[i], &hasMapping) < 0) { # 2888| virReportError(VIR_ERR_CONFIG_UNSUPPORTED, # 2889| _("iothread queue '%1$u' mapping out of range"), Error: GCC_ANALYZER_WARNING (CWE-476): [#def2] libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:2887:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘((virDomainIothreadMappingDef)*(void *)*n.data).queues’ libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3659:1: enter_function: entry to ‘qemuValidateCheckSCSIControllerIOThreads’ libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3666:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3674:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3674:8: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3675:14: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3675:12: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3682:47: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/qemu/qemu_validate.c:3681:13: call_function: calling ‘qemuDomainValidateIothreadMapping’ from ‘qemuValidateCheckSCSIControllerIOThreads’ # 2885| bool hasMapping; # 2886| # 2887|-> if (virBitmapGetBit(queueMap, ioth->queues[i], &hasMapping) < 0) { # 2888| virReportError(VIR_ERR_CONFIG_UNSUPPORTED, # 2889| _("iothread queue '%1$u' mapping out of range"), Error: GCC_ANALYZER_WARNING (CWE-476): [#def3] libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3392:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3356:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3359:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3361:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3365:8: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3365:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3369:8: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3369:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3371:15: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3373:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3379:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3379:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3385:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3388:17: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3390:43: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3390:43: release_memory: ‘0’ is NULL libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3392:43: danger: dereference of NULL ‘params + i * 88’ # 3390| ret->params.params_val[i].field = g_strdup(params[i].field); # 3391| # 3392|-> ret->params.params_val[i].value = params[i].value; # 3393| } # 3394| Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3458:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3422:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3425:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3427:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3431:8: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3431:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3435:8: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3435:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3437:15: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3439:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3445:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3445:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3451:5: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3454:17: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3456:43: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3456:43: release_memory: ‘0’ is NULL libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:3458:43: danger: dereference of NULL ‘params + i * 88’ # 3456| ret->params.params_val[i].field = g_strdup(params[i].field); # 3457| # 3458|-> ret->params.params_val[i].value = params[i].value; # 3459| } # 3460| Error: GCC_ANALYZER_WARNING (CWE-476): [#def5] libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5222:1: enter_function: entry to ‘remoteDispatchDomainGetCPUStats’ libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5235:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5238:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5238:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5242:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5242:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5247:8: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5247:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5250:17: call_function: inlined call to ‘get_nonnull_domain’ from ‘remoteDispatchDomainGetCPUStats’ libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5250:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5255:39: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5256:8: branch_false: following ‘false’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5259:9: branch_false: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5272:8: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5275:21: branch_true: following ‘true’ branch... libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:23: branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:23: release_memory: ‘0’ is NULL libvirt-11.2.0/redhat-linux-build/../src/remote/remote_daemon_dispatch.c:5276:17: danger: dereference of NULL ‘params + i * 96’ # 5274| # 5275| for (i = 0; i < percpu_len; i++) { # 5276|-> if (params[i].type == VIR_TYPED_PARAM_STRING) # 5277| ret->nparams--; # 5278| } Error: GCC_ANALYZER_WARNING (CWE-688): [#def6] libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:73:5: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ where non-null expected libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_memory: allocated here libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:8: release_memory: assuming ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ is NULL libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:8: branch_true: following ‘true’ branch... branch_true: ...to here libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:348:34: call_function: inlined call to ‘cleanupFile’ from ‘main’ # 71| { # 72| FILE *file = *ptr; # 73|-> fclose(file); # 74| } # 75| Error: GCC_ANALYZER_WARNING (CWE-775): [#def7] libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_resource: opened here libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: danger: ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ leaks here; was opened at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 348| cleanup(FILE *, cleanupFile) log = NULL; # 349| # 350|-> if (!(log = fopen(abs_builddir "/commandhelper.log", "w"))) # 351| return EXIT_FAILURE; # 352| Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: acquire_memory: allocated here libvirt-11.2.0/redhat-linux-build/../tests/commandhelper.c:350:17: danger: ‘fopen("/builddir/build/BUILD/libvirt-11.2.0/redhat-linux-build/tests/commandhelper.log", "w")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0) # 348| cleanup(FILE *, cleanupFile) log = NULL; # 349| # 350|-> if (!(log = fopen(abs_builddir "/commandhelper.log", "w"))) # 351| return EXIT_FAILURE; # 352| Error: GCC_ANALYZER_WARNING (CWE-775): [#def9] libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: acquire_resource: opened here libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: danger: ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 105| testname); # 106| # 107|-> if (!(fp = fopen(path, "r"))) # 108| return -1; # 109| Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: acquire_memory: allocated here libvirt-11.2.0/redhat-linux-build/../tests/securityselinuxlabeltest.c:107:16: danger: ‘fopen(g_strdup_printf("%s/securityselinuxlabeldata/%s.txt", "/builddir/build/BUILD/libvirt-11.2.0/tests", testname), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 105| testname); # 106| # 107|-> if (!(fp = fopen(path, "r"))) # 108| return -1; # 109| Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: acquire_resource: opened here libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: danger: ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) # 191| abs_srcdir, arch, data->testName); # 192| # 193|-> if (!(f = fopen(cpuinfo, "r"))) { # 194| virReportSystemError(errno, # 195| "Failed to open cpuinfo file '%s'", cpuinfo); Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: acquire_memory: allocated here libvirt-11.2.0/redhat-linux-build/../tests/virhostcputest.c:193:15: danger: ‘fopen(g_strdup_printf("%s/virhostcpudata/linux-%s-%s.cpuinfo", "/builddir/build/BUILD/libvirt-11.2.0/tests", virArchToString(*(const struct linuxTestHostCPUData *)opaque.arch), *(const struct linuxTestHostCPUData *)opaque.testName), "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 191| abs_srcdir, arch, data->testName); # 192| # 193|-> if (!(f = fopen(cpuinfo, "r"))) { # 194| virReportSystemError(errno, # 195| "Failed to open cpuinfo file '%s'", cpuinfo);
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.0 |
diffbase-analyzer-version-unicontrol | 0.0.2 |
diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
diffbase-exit-code | 0 |
diffbase-host | ip-172-16-1-250.us-west-2.compute.internal |
diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | libvirt-11.0.0-1.fc42 |
diffbase-store-results-to | /tmp/tmpsqhpbjye/libvirt-11.0.0-1.fc42.tar.xz |
diffbase-time-created | 2025-04-25 14:21:06 |
diffbase-time-finished | 2025-04-25 14:33:23 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpsqhpbjye/libvirt-11.0.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsqhpbjye/libvirt-11.0.0-1.fc42.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-250.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libvirt-11.2.0-1.fc43 |
store-results-to | /tmp/tmp1qxhibt3/libvirt-11.2.0-1.fc43.tar.xz |
time-created | 2025-04-25 14:33:49 |
time-finished | 2025-04-25 14:45:40 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp1qxhibt3/libvirt-11.2.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp1qxhibt3/libvirt-11.2.0-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |