skopeo-1.15.1-1.fc41
List of Defects
Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
skopeo-1.15.1-build/skopeo-1.15.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): [#def2]
skopeo-1.15.1-build/skopeo-1.15.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): [#def3]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
skopeo-1.15.1-build/skopeo-1.15.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): [#def4]
skopeo-1.15.1-build/skopeo-1.15.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): [#def5]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘parse_proc_stringlist’
skopeo-1.15.1-build/skopeo-1.15.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): [#def6]
skopeo-1.15.1-build/skopeo-1.15.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): [#def7]
skopeo-1.15.1-build/skopeo-1.15.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: [#def8]
skopeo-1.15.1-build/skopeo-1.15.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): [#def9]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘copy_self_proc_exe’
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c:235:19: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
skopeo-1.15.1-build/skopeo-1.15.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): [#def10]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/containers/storage/pkg/unshare/unshare.c: scope_hint: In function ‘containers_reexec’
skopeo-1.15.1-build/skopeo-1.15.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: [#def11]
skopeo-1.15.1-build/skopeo-1.15.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: [#def12]
skopeo-1.15.1-build/skopeo-1.15.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): [#def13]
skopeo-1.15.1-build/skopeo-1.15.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): [#def14]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function 'New'
skopeo-1.15.1-build/skopeo-1.15.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): [#def15]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘New’
skopeo-1.15.1-build/skopeo-1.15.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): [#def16]
skopeo-1.15.1-build/skopeo-1.15.1/vendor/github.com/miekg/pkcs11/pkcs11.go: scope_hint: In function ‘GetAttributeValue.part.0’
skopeo-1.15.1-build/skopeo-1.15.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);
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-186.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | skopeo-1.15.1-1.fc41 |
store-results-to | /tmp/tmphy07d1xj/skopeo-1.15.1-1.fc41.tar.xz |
time-created | 2024-07-03 18:08:20 |
time-finished | 2024-07-03 18:11:05 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmphy07d1xj/skopeo-1.15.1-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmphy07d1xj/skopeo-1.15.1-1.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |