Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'clone_runtime_spec_schema_config_freebsd_jail' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:445:28: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_freebsd_jail_allow(*src.allow)' # 443| if (ret == NULL) # 444| return NULL; # 445|-> ret->set_hostname = src->set_hostname; # 446| ret->set_hostname_present = src->set_hostname_present; # 447| ret->raw_sockets = src->raw_sockets; Error: CPPCHECK_WARNING (CWE-401): [#def2] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:456: error[memleak]: Memory leak: ret # 454| ret->mount = calloc (src->mount_len + 1, sizeof (*ret->mount)); # 455| if (ret->mount == NULL) # 456|-> return NULL; # 457| for (size_t i = 0; i < src->mount_len; i++) # 458| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:476:24: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 474| ret->reserved_ports_present = src->reserved_ports_present; # 475| ret->suser = src->suser; # 476|-> ret->suser_present = src->suser_present; # 477| return move_ptr (ret); # 478| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'clone_runtime_spec_schema_config_freebsd' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1077:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_freebsd_jail(*src.jail)' # 1075| if (ret == NULL) # 1076| return NULL; # 1077|-> if (src->parent) # 1078| { # 1079| ret->parent = strdup (src->parent); Error: CPPCHECK_WARNING (CWE-401): [#def5] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1081: error[memleak]: Memory leak: ret # 1079| ret->parent = strdup (src->parent); # 1080| if (ret->parent == NULL) # 1081|-> return NULL; # 1082| } # 1083| if (src->host) Error: CPPCHECK_WARNING (CWE-401): [#def6] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1087: error[memleak]: Memory leak: ret # 1085| ret->host = strdup (src->host); # 1086| if (ret->host == NULL) # 1087|-> return NULL; # 1088| } # 1089| if (src->ip4) Error: CPPCHECK_WARNING (CWE-401): [#def7] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1093: error[memleak]: Memory leak: ret # 1091| ret->ip4 = strdup (src->ip4); # 1092| if (ret->ip4 == NULL) # 1093|-> return NULL; # 1094| } # 1095| if (src->ip4addr) Error: CPPCHECK_WARNING (CWE-401): [#def8] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1100: error[memleak]: Memory leak: ret # 1098| ret->ip4addr = calloc (src->ip4addr_len + 1, sizeof (*ret->ip4addr)); # 1099| if (ret->ip4addr == NULL) # 1100|-> return NULL; # 1101| for (size_t i = 0; i < src->ip4addr_len; i++) # 1102| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1181:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 1179| ret->enforce_statfs = src->enforce_statfs; # 1180| ret->enforce_statfs_present = src->enforce_statfs_present; # 1181|-> if (src->allow) # 1182| { # 1183| ret->allow = clone_runtime_spec_schema_config_freebsd_jail_allow (src->allow); Error: CPPCHECK_WARNING (CWE-401): [#def10] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:1377: error[memleak]: Memory leak: ret # 1375| ret->devices = calloc (src->devices_len + 1, sizeof (*ret->devices)); # 1376| if (ret->devices == NULL) # 1377|-> return NULL; # 1378| for (size_t i = 0; i < src->devices_len; i++) # 1379| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1075:12: warning[-Wanalyzer-malloc-leak]: leak of 'clone_runtime_spec_schema_config_vm_hw_config(*src.hw_config)' # 1073| if (ret == NULL) # 1074| return NULL; # 1075|-> if (src->device_tree) # 1076| { # 1077| ret->device_tree = strdup (src->device_tree); Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1114:8: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' # 1112| } # 1113| } # 1114|-> if (src->irqs) # 1115| { # 1116| ret->irqs_len = src->irqs_len; Error: CPPCHECK_WARNING (CWE-401): [#def13] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1313: error[memleak]: Memory leak: ret # 1311| ret->hypervisor = clone_runtime_spec_schema_config_vm_hypervisor (src->hypervisor); # 1312| if (ret->hypervisor == NULL) # 1313|-> return NULL; # 1314| } # 1315| if (src->kernel) Error: CPPCHECK_WARNING (CWE-401): [#def14] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1319: error[memleak]: Memory leak: ret # 1317| ret->kernel = clone_runtime_spec_schema_config_vm_kernel (src->kernel); # 1318| if (ret->kernel == NULL) # 1319|-> return NULL; # 1320| } # 1321| if (src->image) Error: CPPCHECK_WARNING (CWE-401): [#def15] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1325: error[memleak]: Memory leak: ret # 1323| ret->image = clone_runtime_spec_schema_config_vm_image (src->image); # 1324| if (ret->image == NULL) # 1325|-> return NULL; # 1326| } # 1327| if (src->hw_config) Error: CPPCHECK_WARNING (CWE-401): [#def16] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_vm.c:1331: error[memleak]: Memory leak: ret # 1329| ret->hw_config = clone_runtime_spec_schema_config_vm_hw_config (src->hw_config); # 1330| if (ret->hw_config == NULL) # 1331|-> return NULL; # 1332| } # 1333| return move_ptr (ret); Error: CPPCHECK_WARNING (CWE-401): [#def17] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_freebsd.c:181: error[memleak]: Memory leak: ret # 179| ret->path = strdup (src->path); # 180| if (ret->path == NULL) # 181|-> return NULL; # 182| } # 183| ret->mode = src->mode; Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_vm.c: scope_hint: In function 'make_runtime_spec_schema_defs_vm_io_mem_entry_format' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_defs_vm.c:139:12: warning[-Wanalyzer-malloc-leak]: leak of 'resi' # 137| (void) fprintf (ctx->errfile, "WARNING: unknown key found\n"); # 138| # 139|-> if (ctx->options & OPT_PARSE_FULLKEY) # 140| ret->_residual = resi; # 141| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] crun-HEAD/libocispec/src/ocispec/json_common.h:9: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.h:7: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:8: included_from: Included from here. crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c: scope_hint: In function 'make_runtime_spec_schema_config_freebsd_jail' crun-HEAD/libocispec/yajl/src/api/yajl_tree.h:156:49: warning[-Wanalyzer-malloc-leak]: leak of 'make_runtime_spec_schema_config_freebsd_jail_allow(get_val(tree, "allow", 3), ctx, err)' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29:33: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:48:32: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:67:28: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:112:27: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:131:30: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:150:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:169:35: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:188:26: note: in expansion of macro 'YAJL_IS_TRUE' crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_freebsd.c:29:33: note: in expansion of macro 'YAJL_IS_TRUE' # 154| #define YAJL_IS_OBJECT(v) (((v) != NULL) && ((v)->type == yajl_t_object)) # 155| #define YAJL_IS_ARRAY(v) (((v) != NULL) && ((v)->type == yajl_t_array )) # 156|-> #define YAJL_IS_TRUE(v) (((v) != NULL) && ((v)->type == yajl_t_true )) # 157| #define YAJL_IS_FALSE(v) (((v) != NULL) && ((v)->type == yajl_t_false )) # 158| #define YAJL_IS_NULL(v) (((v) != NULL) && ((v)->type == yajl_t_null )) Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] crun-HEAD/src/libcrun/utils.h:74:21: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc0(128)' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_update' crun-HEAD/src/libcrun/utils.h:57:40: note: in definition of macro 'UNLIKELY' # 72| { # 73| void *res = calloc (1, size); # 74|-> if (UNLIKELY (res == NULL)) # 75| OOM (); # 76| return res;
| analyzer-version-clippy | 1.91.1 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 15.2.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.91.1 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| diffbase-analyzer-version-gcc-analyzer | 15.2.1 |
| diffbase-analyzer-version-shellcheck | 0.11.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-116.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.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | crun-1.25.1-1.20251211092552174958.main.9.gd139e083 |
| diffbase-store-results-to | /tmp/tmpjpeb7pcv/crun-1.25.1-1.20251211092552174958.main.9.gd139e083.tar.xz |
| diffbase-time-created | 2025-12-11 13:59:06 |
| diffbase-time-finished | 2025-12-11 14:05:38 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,gcc,shellcheck,clippy' '-o' '/tmp/tmpjpeb7pcv/crun-1.25.1-1.20251211092552174958.main.9.gd139e083.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpjpeb7pcv/crun-1.25.1-1.20251211092552174958.main.9.gd139e083.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251124.152119.g92ed7a6-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-116.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.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | crun-1.25.1-1.20251211135027049171.pr1923.10.gbaec9675 |
| store-results-to | /tmp/tmpjuqonvz0/crun-1.25.1-1.20251211135027049171.pr1923.10.gbaec9675.tar.xz |
| time-created | 2025-12-11 14:06:01 |
| time-finished | 2025-12-11 14:11:23 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,unicontrol,gcc,shellcheck,clippy' '-o' '/tmp/tmpjuqonvz0/crun-1.25.1-1.20251211135027049171.pr1923.10.gbaec9675.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '/tmp/tmpjuqonvz0/crun-1.25.1-1.20251211135027049171.pr1923.10.gbaec9675.src.rpm' |
| tool-version | csmock-3.8.3.20251124.152119.g92ed7a6-1.el9 |