Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’ image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:120:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ # 118| if (new_buf == NULL) { # 119| free(buf); # 120|-> fprintf(stderr, "realloc(%ld): out of memory\n", (long)(size + BUFSTEP)); # 121| return NULL; # 122| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ # 126| n = read(fd, buf + used, size - used - 1); # 127| if (n < 0) { # 128|-> fprintf(stderr, "read(): %m\n"); # 129| return NULL; # 130| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ # 126| n = read(fd, buf + used, size - used - 1); # 127| if (n < 0) { # 128|-> fprintf(stderr, "read(): %m\n"); # 129| return NULL; # 130| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:128:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’ # 126| n = read(fd, buf + used, size - used - 1); # 127| if (n < 0) { # 128|-> fprintf(stderr, "read(): %m\n"); # 129| return NULL; # 130| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:145:17: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’ # 143| ret = calloc(n_strings + 1, sizeof(char *)); # 144| if (ret == NULL) { # 145|-> fprintf(stderr, "calloc(): out of memory\n"); # 146| return NULL; # 147| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’ image-builder-7-build/image-builder-cli-7/vendor/github.com/containers/storage/pkg/unshare/unshare.c:288:12: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’ # 286| if (fd < 0) # 287| fd = copy_self_proc_exe(argv); # 288|-> if (fd < 0) # 289| return fd; # 290| Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New' image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'c' # 75| CK_C_GetFunctionList list; # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77|-> c->handle = dlopen(module, RTLD_LAZY); # 78| if (c->handle == NULL) { # 79| free(c); Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’ image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go:77:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘c’ # 75| CK_C_GetFunctionList list; # 76| struct ctx *c = calloc(1, sizeof(struct ctx)); # 77|-> c->handle = dlopen(module, RTLD_LAZY); # 78| if (c->handle == NULL) { # 79| free(c); Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’ image-builder-7-build/image-builder-cli-7/vendor/github.com/miekg/pkcs11/pkcs11.go:316:32: warning[-Wanalyzer-malloc-leak]: leak of ‘*((CK_ATTRIBUTE *)temp).pValue’ # 314| continue; # 315| } # 316|-> temp[i].pValue = calloc(temp[i].ulValueLen, sizeof(CK_BYTE)); # 317| } # 318| return c->sym->C_GetAttributeValue(session, object, temp, templen); Error: GCC_ANALYZER_WARNING (CWE-688): [#def10] image-builder-7-build/image-builder-cli-7/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function 'gnu_ext_crypt' image-builder-7-build/image-builder-cli-7/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ret' where non-null expected <built-in>: note: argument 1 of '__builtin_strcpy' must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62| Error: GCC_ANALYZER_WARNING (CWE-688): [#def11] image-builder-7-build/image-builder-cli-7/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go: scope_hint: In function ‘gnu_ext_crypt’ image-builder-7-build/image-builder-cli-7/vendor/github.com/osbuild/images/pkg/crypt/crypt_impl.go:60:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘ret’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_strcpy’ must be non-null # 58| # 59| ret = (char *)malloc((strlen(enc)+1) * sizeof(char)); // for trailing null # 60|-> strcpy(ret, enc); # 61| ret[strlen(enc)]= '\0'; # 62|
analyzer-version-clippy | 1.84.0 |
analyzer-version-cppcheck | 2.16.2 |
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 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-229.us-west-2.compute.internal |
mock-config | fedora-rawhide-x86_64 |
project-name | image-builder-7-1.20250129205314699702.main.26.g0f0815d |
store-results-to | /tmp/tmp_6azxwqd/image-builder-7-1.20250129205314699702.main.26.g0f0815d.tar.xz |
time-created | 2025-01-29 22:03:15 |
time-finished | 2025-01-29 22:07:04 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,unicontrol,clippy,cppcheck,gcc' '-o' '/tmp/tmp_6azxwqd/image-builder-7-1.20250129205314699702.main.26.g0f0815d.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '/tmp/tmp_6azxwqd/image-builder-7-1.20250129205314699702.main.26.g0f0815d.src.rpm' |
tool-version | csmock-3.8.0-1.el9 |