Task #420 - buildah-1.35.1-1.fc40/scan-results.err
back to task #420download
Error: GCC_ANALYZER_WARNING (CWE-775): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’ buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:117:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’ # 115| new_size = used + BUFSTEP; # 116| new_buf = realloc(buf, new_size); # 117|-> if (new_buf == NULL) { # 118| free(buf); # 119| fprintf(stderr, "realloc(%ld): out of memory\n", (long)(size + BUFSTEP)); Error: GCC_ANALYZER_WARNING (CWE-775): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:124:28: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(list, 0)’ # 122| buf = new_buf; # 123| size = new_size; # 124|-> memset(buf + used, '\0', size - used); # 125| n = read(fd, buf + used, size - used - 1); # 126| if (n < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’ buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:124:28: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’ # 122| buf = new_buf; # 123| size = new_size; # 124|-> memset(buf + used, '\0', size - used); # 125| n = read(fd, buf + used, size - used - 1); # 126| if (n < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): buildah-1.35.1-build/buildah-1.35.1/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): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’ buildah-1.35.1-build/buildah-1.35.1/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): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ # 151| } # 152| } # 153|-> ret[i] = NULL; # 154| return ret; # 155| } Error: GCC_ANALYZER_WARNING (CWE-401): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:153:16: warning[-Wanalyzer-malloc-leak]: leak of ‘new_buf’ # 151| } # 152| } # 153|-> ret[i] = NULL; # 154| return ret; # 155| } Error: CLANG_WARNING: buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:235:12: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 233| return -1; # 234| } # 235|-> exename = basename(argv[0]); # 236| mmfd = syscall(SYS_memfd_create, exename, (long) MFD_ALLOW_SEALING | MFD_CLOEXEC); # 237| if (mmfd == -1) { Error: GCC_ANALYZER_WARNING (CWE-688): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘copy_self_proc_exe’ buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:235:19: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:14: included_from: Included from here. /usr/include/string.h:540:14: note: argument 1 of ‘basename’ must be non-null # 233| return -1; # 234| } # 235|-> exename = basename(argv[0]); # 236| mmfd = syscall(SYS_memfd_create, exename, (long) MFD_ALLOW_SEALING | MFD_CLOEXEC); # 237| if (mmfd == -1) { Error: GCC_ANALYZER_WARNING (CWE-401): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’ buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:290:12: warning[-Wanalyzer-malloc-leak]: leak of ‘parse_proc_stringlist("/proc/self/cmdline")’ # 288| return fd; # 289| # 290|-> if (fexecve(fd, argv, environ) == -1) { # 291| close(fd); # 292| fprintf(stderr, "Error during reexec(...): %m\n"); Error: CLANG_WARNING: buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:295:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'argv' # 293| return -1; # 294| } # 295|-> close(fd); # 296| return 0; # 297| } Error: CPPCHECK_WARNING: buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/mattn/go-sqlite3/sqlite3-binding.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: COMPILER_WARNING (CWE-1164): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/mattn/go-sqlite3/sqlite3.go:85:1: warning[-Wunused-function]: ‘_sqlite3_exec’ defined but not used # 85 | _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes) # | ^~~~~~~~~~~~~ # 83| # 84| static int # 85|-> _sqlite3_exec(sqlite3* db, const char* pcmd, long long* rowid, long long* changes) # 86| { # 87| int rv = sqlite3_exec(db, pcmd, 0, 0, 0); Error: GCC_ANALYZER_WARNING (CWE-476): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New' buildah-1.35.1-build/buildah-1.35.1/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): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’ buildah-1.35.1-build/buildah-1.35.1/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): buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’ buildah-1.35.1-build/buildah-1.35.1/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: CPPCHECK_WARNING: buildah-1.35.1-build/buildah-1.35.1/vendor/github.com/opencontainers/runc/libcontainer/userns/userns_maps.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.