Task #9201 - podman-bootc-v0.1.1~108~gbab3e89-1.20240822124631695194.main.108.bab3e89/scan-results.err
back to task #9201download
Error: GCC_ANALYZER_WARNING (CWE-1341):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/podman/v5/pkg/rootless/rootless_linux.c:4: included_from: Included from here.
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/podman/v5/pkg/rootless/rootless_linux.c: scope_hint: In function ‘cleanup_closep.part.0’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/podman/v5/pkg/rootless/rootless_linux.c:51:25: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*(void *)p’
# 49| int *pp = p;
# 50| if (*pp >= 0)
# 51|-> TEMP_FAILURE_RETRY (close (*pp));
# 52| }
# 53|
Error: GCC_ANALYZER_WARNING (CWE-1341):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/podman/v5/pkg/rootless/rootless_linux.c:51:25: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/podman/v5/pkg/rootless/rootless_linux.c: scope_hint: In function ‘cleanup_closep.part.0’
# 49| int *pp = p;
# 50| if (*pp >= 0)
# 51|-> TEMP_FAILURE_RETRY (close (*pp));
# 52| }
# 53|
Error: GCC_ANALYZER_WARNING (CWE-775):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:119:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 117| if (new_buf == NULL) {
# 118| free(buf);
# 119|-> fprintf(stderr, "realloc(%ld): out of memory\n", (long)(size + BUFSTEP));
# 120| return NULL;
# 121| }
Error: GCC_ANALYZER_WARNING (CWE-775):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:127:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 125| n = read(fd, buf + used, size - used - 1);
# 126| if (n < 0) {
# 127|-> fprintf(stderr, "read(): %m\n");
# 128| return NULL;
# 129| }
Error: GCC_ANALYZER_WARNING (CWE-401):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:127:25: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
# 125| n = read(fd, buf + used, size - used - 1);
# 126| if (n < 0) {
# 127|-> fprintf(stderr, "read(): %m\n");
# 128| return NULL;
# 129| }
Error: GCC_ANALYZER_WARNING (CWE-401):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:127:25: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
# 125| n = read(fd, buf + used, size - used - 1);
# 126| if (n < 0) {
# 127|-> fprintf(stderr, "read(): %m\n");
# 128| return NULL;
# 129| }
Error: GCC_ANALYZER_WARNING (CWE-401):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:144:17: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’
# 142| ret = calloc(n_strings + 1, sizeof(char *));
# 143| if (ret == NULL) {
# 144|-> fprintf(stderr, "calloc(): out of memory\n");
# 145| return NULL;
# 146| }
Error: GCC_ANALYZER_WARNING (CWE-401):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/containers/storage/pkg/unshare/unshare.c:287:12: warning[-Wanalyzer-malloc-leak]: leak of ‘argv’
# 285| if (fd < 0)
# 286| fd = copy_self_proc_exe(argv);
# 287|-> if (fd < 0)
# 288| return fd;
# 289|
Error: GCC_ANALYZER_WARNING (CWE-476):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New'
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/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):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/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):
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’
podman-bootc-v0.1.1_108_gbab3e89-build/podman-bootc-v0.1.1~108~gbab3e89/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);