|
List of Defects
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def1]
|
|
addr2line.c:593: alloc_fn: Storage is returned from allocation function "dlopen".
|
|
addr2line.c:593: var_assign: Assigning: "h" = storage returned from "dlopen(NULL, 2)".
|
|
addr2line.c:595: noescape: Resource "h" is not freed or pointed-to in "dlsym".
|
|
addr2line.c:596: leaked_storage: Variable "h" going out of scope leaks the storage it points to.
|
|
# 594| if (!h) continue;
|
|
# 595| s = dlsym(h, strtab + sym->st_name);
|
|
# 596|-> if (!s) continue;
|
|
# 597| if (dladdr(s, &info)) {
|
|
# 598| dladdr_fbase = (uintptr_t)info.dli_fbase;
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def2]
|
|
addr2line.c:593: alloc_fn: Storage is returned from allocation function "dlopen".
|
|
addr2line.c:593: var_assign: Assigning: "h" = storage returned from "dlopen(NULL, 2)".
|
|
addr2line.c:595: noescape: Resource "h" is not freed or pointed-to in "dlsym".
|
|
addr2line.c:599: leaked_storage: Variable "h" going out of scope leaks the storage it points to.
|
|
# 597| if (dladdr(s, &info)) {
|
|
# 598| dladdr_fbase = (uintptr_t)info.dli_fbase;
|
|
# 599|-> break;
|
|
# 600| }
|
|
# 601| }
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def3]
|
|
addr2line.c:593: alloc_fn: Storage is returned from allocation function "dlopen".
|
|
addr2line.c:593: var_assign: Assigning: "h" = storage returned from "dlopen(NULL, 2)".
|
|
addr2line.c:595: noescape: Resource "h" is not freed or pointed-to in "dlsym".
|
|
addr2line.c:601: leaked_storage: Variable "h" going out of scope leaks the storage it points to.
|
|
# 599| break;
|
|
# 600| }
|
|
# 601|-> }
|
|
# 602| if (ehdr->e_type == ET_EXEC) {
|
|
# 603| obj->base_addr = 0;
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def4]
|
|
addr2line.c:521: alloc_fn: Storage is returned from allocation function "mmap".
|
|
addr2line.c:521: var_assign: Assigning: "file" = storage returned from "mmap(NULL, (size_t)filesize, 1, 1, fd, 0L)".
|
|
addr2line.c:529: var_assign: Assigning: "ehdr" = "file".
|
|
addr2line.c:658: leaked_storage: Variable "file" going out of scope leaks the storage it points to.
|
|
addr2line.c:658: leaked_storage: Variable "ehdr" going out of scope leaks the storage it points to.
|
|
# 656| return dladdr_fbase;
|
|
# 657| fail:
|
|
# 658|-> return (uintptr_t)-1;
|
|
# 659| }
|
|
# 660|
|
|
|
|
Error: USE_AFTER_FREE (CWE-825): [#def5]
|
|
gc.c:7981: freed_arg: "free" frees "ptr".
|
|
gc.c:7983: pass_freed_arg: Passing freed pointer "ptr" as an argument to "objspace_malloc_increase".
|
|
# 7981| free(ptr);
|
|
# 7982|
|
|
# 7983|-> objspace_malloc_increase(objspace, ptr, 0, old_size, MEMOP_TYPE_FREE);
|
|
# 7984| }
|
|
# 7985|
|
|
|
|
Error: COPY_PASTE_ERROR (CWE-398): [#def6]
|
|
gems/net-telnet-0.1.1/lib/net/telnet.rb:482: original: "IAC + DONT" looks like the original copy.
|
|
gems/net-telnet-0.1.1/lib/net/telnet.rb:472: copy_paste_error: "DONT" in "IAC + DONT" looks like a copy-paste error.
|
|
gems/net-telnet-0.1.1/lib/net/telnet.rb:472: remediation: Should it say "DO" instead?
|
|
# 470| self.write(IAC + DO + OPT_SGA)
|
|
# 471| else
|
|
# 472|-> self.write(IAC + DONT + $1[1..1])
|
|
# 473| end
|
|
# 474| ''
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def7]
|
|
process.c:6066: open_fn: Returning handle opened by "rb_cloexec_open".
|
|
io.c:261:5: open_fn: Returning handle opened by "open". [Note: The source code implementation of the function has been overridden by a user model.]
|
|
io.c:261:5: var_assign: Assigning: "ret" = "open(pathname, flags, mode)".
|
|
io.c:264:2: noescape: Resource "ret" is not freed or pointed-to in function "rb_maygvl_fd_fix_cloexec".
|
|
io.c:203:30: noescape: "rb_maygvl_fd_fix_cloexec(int)" does not free or save its parameter "fd".
|
|
io.c:272:5: return_handle: Returning opened handle "ret".
|
|
process.c:6066: var_assign: Assigning: "n" = handle returned from "rb_cloexec_open("/dev/null", 2, 0U)".
|
|
process.c:6067: noescape: Resource "n" is not freed or pointed-to in "rb_update_max_fd".
|
|
io.c:184:22: noescape: "rb_update_max_fd(int)" does not free or save its parameter "fd".
|
|
process.c:6068: noescape: Resource "n" is not freed or pointed-to in "dup2".
|
|
process.c:6069: noescape: Resource "n" is not freed or pointed-to in "dup2".
|
|
process.c:6070: noescape: Resource "n" is not freed or pointed-to in "dup2".
|
|
process.c:6075: leaked_handle: Handle variable "n" going out of scope leaks the handle.
|
|
# 6073| }
|
|
# 6074| #endif
|
|
# 6075|-> return err;
|
|
# 6076| }
|
|
# 6077| #else
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def8]
|
|
regcomp.c:3630: alloc_fn: Storage is returned from allocation function "onig_node_list_add".
|
|
regparse.c:1196:3: alloc_fn: Storage is returned from allocation function "onig_node_new_list".
|
|
regparse.c:1188:3: alloc_fn: Storage is returned from allocation function "node_new_list".
|
|
regparse.c:1176:14: alloc_fn: Storage is returned from allocation function "node_new".
|
|
regparse.c:1125:3: alloc_fn: Storage is returned from allocation function "malloc".
|
|
regparse.c:1125:3: var_assign: Assigning: "node" = "malloc(56UL)".
|
|
regparse.c:1127:3: return_alloc: Returning allocated memory "node".
|
|
regparse.c:1176:14: var_assign: Assigning: "node" = "node_new()".
|
|
regparse.c:1182:3: return_alloc: Returning allocated memory "node".
|
|
regparse.c:1188:3: return_alloc_fn: Directly returning storage allocated by "node_new_list".
|
|
regparse.c:1196:3: var_assign: Assigning: "n" = "onig_node_new_list(x, NULL)".
|
|
regparse.c:1206:3: return_alloc: Returning allocated memory "n".
|
|
regcomp.c:3630: var_assign: Assigning: "root" = storage returned from "onig_node_list_add(NULL, prev_node)".
|
|
regcomp.c:3630: var_assign: Assigning: "top_root" = "root".
|
|
regcomp.c:3644: noescape: Resource "root" is not freed or pointed-to in "onig_node_list_add".
|
|
regparse.c:1192:26: noescape: "onig_node_list_add(Node *, Node *)" does not free or save its parameter "list".
|
|
regcomp.c:3599: overwrite_var: Overwriting "top_root" in "top_root = root = onig_node_list_add(NULL, prev_node)" leaks the storage that "top_root" points to.
|
|
# 3597| if (IS_NULL(snode)) {
|
|
# 3598| if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
|
|
# 3599|-> top_root = root = onig_node_list_add(NULL_NODE, prev_node);
|
|
# 3600| if (IS_NULL(root)) {
|
|
# 3601| onig_node_free(prev_node);
|
|
|
|
Error: RESOURCE_LEAK (CWE-772): [#def9]
|
|
regcomp.c:3630: alloc_fn: Storage is returned from allocation function "onig_node_list_add".
|
|
regparse.c:1196:3: alloc_fn: Storage is returned from allocation function "onig_node_new_list".
|
|
regparse.c:1188:3: alloc_fn: Storage is returned from allocation function "node_new_list".
|
|
regparse.c:1176:14: alloc_fn: Storage is returned from allocation function "node_new".
|
|
regparse.c:1125:3: alloc_fn: Storage is returned from allocation function "malloc".
|
|
regparse.c:1125:3: var_assign: Assigning: "node" = "malloc(56UL)".
|
|
regparse.c:1127:3: return_alloc: Returning allocated memory "node".
|
|
regparse.c:1176:14: var_assign: Assigning: "node" = "node_new()".
|
|
regparse.c:1182:3: return_alloc: Returning allocated memory "node".
|
|
regparse.c:1188:3: return_alloc_fn: Directly returning storage allocated by "node_new_list".
|
|
regparse.c:1196:3: var_assign: Assigning: "n" = "onig_node_new_list(x, NULL)".
|
|
regparse.c:1206:3: return_alloc: Returning allocated memory "n".
|
|
regcomp.c:3630: var_assign: Assigning: "root" = storage returned from "onig_node_list_add(NULL, prev_node)".
|
|
regcomp.c:3630: var_assign: Assigning: "top_root" = "root".
|
|
regcomp.c:3644: noescape: Resource "root" is not freed or pointed-to in "onig_node_list_add".
|
|
regparse.c:1192:26: noescape: "onig_node_list_add(Node *, Node *)" does not free or save its parameter "list".
|
|
regcomp.c:3630: overwrite_var: Overwriting "top_root" in "top_root = root = onig_node_list_add(NULL, prev_node)" leaks the storage that "top_root" points to.
|
|
# 3628| }
|
|
# 3629| if (IS_NULL(root) && IS_NOT_NULL(prev_node)) {
|
|
# 3630|-> top_root = root = onig_node_list_add(NULL_NODE, prev_node);
|
|
# 3631| if (IS_NULL(root)) {
|
|
# 3632| onig_node_free(prev_node);
|
|
|