composefs-1.0.3-1.fc40
List of Defects
Error: CLANG_WARNING: [#def1]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:25: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-erofs-internal.h:24: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/erofs_fs_wrapper.h:150: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/erofs_fs.h:435:15: warning[deadcode.DeadStores]: Value stored to 'fmh' during its initialization is never read
# 433| static inline void erofs_check_ondisk_layout_definitions(void)
# 434| {
# 435|-> const __le64 fmh = *(__le64 *)&(struct z_erofs_map_header) {
# 436| .h_clusterbits = 1 << Z_EROFS_FRAGMENT_INODE_BIT
# 437| };
Error: CPPCHECK_WARNING: [#def2]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/hash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-internal.h:203:17: warning[-Wanalyzer-malloc-leak]: leak of 'new_ht_entry'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-internal.h:29: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1851:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1856:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1863:13: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1870:17: note: in expansion of macro 'lcfs_u32_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:25: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-erofs-internal.h:44:29: note: in expansion of macro 'lcfs_u16_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1482:32: note: in expansion of macro 'lcfs_u64_from_file'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: scope_hint: In function 'lcfs_build_node_from_image'
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-utils.h:23: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:22: included_from: Included from here.
# 201| {
# 202| if (*nodep != NULL) {
# 203|-> lcfs_node_unref(*nodep);
# 204| *nodep = NULL;
# 205| }
Error: CPPCHECK_WARNING: [#def4]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-mount.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def5]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-mount.c:422:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'opt'
# 420| strcat(opt, objdir);
# 421|
# 422|-> res = syscall_fsconfig(fd_fs, FSCONFIG_SET_STRING, "lowerdir",
# 423| opt, 0);
# 424| if (res < 0) {
Error: CPPCHECK_WARNING: [#def6]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def7]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:356:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_ent'
# 354| }
# 355| new_ent->xattr = &node->xattrs[i];
# 356|-> ent = hash_insert(xattr_hash, new_ent);
# 357| if (ent == NULL) {
# 358| goto fail;
Error: CLANG_WARNING: [#def8]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1091:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'renamed'
# 1089| colliding xattr */
# 1090| if (lcfs_node_rename_xattr(node, i, renamed) < 0)
# 1091|-> return -1;
# 1092| }
# 1093| }
Error: CLANG_WARNING: [#def9]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1531:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'name'
# 1529|
# 1530| if (strcmp(name, OVERLAY_XATTR_REDIRECT) == 0) {
# 1531|-> if ((node->inode.st_mode & S_IFMT) == S_IFREG) {
# 1532| if (value_size > 1 && value[0] == '/') {
# 1533| value_size++;
Error: CLANG_WARNING: [#def10]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer-erofs.c:1634:6: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_ht_entry'
# 1632| }
# 1633|
# 1634|-> if (erofs_inode_is_compact(cino)) {
# 1635| const struct erofs_inode_compact *c = &cino->compact;
# 1636|
Error: CPPCHECK_WARNING: [#def11]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def12]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:434:10: warning[unix.Malloc]: Potential leak of memory pointed to by 'list'
# 432| list_size = listxattr(path, list, list_size);
# 433| if (list_size < 0) {
# 434|-> return list_size;
# 435| }
# 436|
Error: CLANG_WARNING: [#def13]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:464:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'it'
# 462| }
# 463| }
# 464|-> return r;
# 465| }
# 466|
Error: CLANG_WARNING: [#def14]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:694:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'ret'
# 692| r = readlinkat(dirfd, fname, target, sizeof(target));
# 693| if (r < 0)
# 694|-> return NULL;
# 695|
# 696| target[r] = '\0';
Error: CLANG_WARNING: [#def15]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:1132:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'new'
# 1130| new->payload = strdup(node->payload);
# 1131| if (new->payload == NULL)
# 1132|-> return NULL;
# 1133| ;
# 1134| }
Error: CLANG_WARNING: [#def16]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:1492:11: warning[unix.Malloc]: Potential leak of memory pointed to by 'dup'
# 1490|
# 1491| if (index >= node->n_xattrs) {
# 1492|-> errno = EINVAL;
# 1493| return -1;
# 1494| }
Error: CPPCHECK_WARNING (CWE-401): [#def17]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:1493: error[memleak]: Memory leak: dup
# 1491| if (index >= node->n_xattrs) {
# 1492| errno = EINVAL;
# 1493|-> return -1;
# 1494| }
# 1495|
Error: CPPCHECK_WARNING (CWE-401): [#def18]
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-writer.c:1499: error[memleak]: Memory leak: dup
# 1497| free(xattr->key);
# 1498| xattr->key = steal_pointer(&dup);
# 1499|-> return 0;
# 1500| }
Error: CPPCHECK_WARNING: [#def19]
composefs-1.0.3-build/composefs-1.0.3/tools/cfs-fuse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def20]
composefs-1.0.3-build/composefs-1.0.3/tools/cfs-fuse.c:1055:3: warning[deadcode.DeadStores]: Value stored to 'size' is never read
# 1053| iov[i].iov_base = (uint8_t *)tail_data;
# 1054| iov[i++].iov_len = tail_send;
# 1055|-> size -= tail_send;
# 1056| }
# 1057|
Error: CPPCHECK_WARNING: [#def21]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-dump.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def22]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-457): [#def23]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c: scope_hint: In function ‘print_escaped’
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:60:23: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*val’
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:33: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/libcomposefs/lcfs-utils.h:22: included_from: Included from here.
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:23: included_from: Included from here.
/usr/include/string.h:407:15: note: argument 1 of ‘strlen’ must be a pointer to a null-terminated string
# 58|
# 59| if (len < 0)
# 60|-> len = strlen(val);
# 61|
# 62| if (escape_lone_dash && len == 1 && val[0] == '-') {
Error: CLANG_WARNING: [#def24]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:222:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'hardlink_path'
# 220| print_escaped_optional(hardlink_path ? hardlink_path : payload, -1,
# 221| ESCAPE_LONE_DASH);
# 222|-> printf(" ");
# 223| print_escaped_optional((char *)content, size, ESCAPE_LONE_DASH);
# 224|
Error: CLANG_WARNING: [#def25]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:292:18: warning[unix.Malloc]: Potential leak of memory pointed to by 'dup'
# 290| }
# 291|
# 292|-> for (size_t i = 0; i < lcfs_node_get_n_children(node); i++) {
# 293| struct lcfs_node_s *child = lcfs_node_get_child(node, i);
# 294| get_objects(child, data, basedir_fd);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c: scope_hint: In function ‘get_objects’
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:296:1: warning[-Wanalyzer-malloc-leak]: leak of ‘dup’
# 294| get_objects(child, data, basedir_fd);
# 295| }
# 296|-> }
# 297|
# 298| static size_t str_ht_hash(const void *entry, size_t table_size)
Error: CLANG_WARNING: [#def27]
composefs-1.0.3-build/composefs-1.0.3/tools/composefs-info.c:445:28: warning[deadcode.DeadStores]: Although the value stored to 'image_path' is used in the enclosing expression, the value is never actually read from 'image_path'
# 443|
# 444| for (int i = 2; i < argc; i++) {
# 445|-> const char *image_path = image_path = argv[i];
# 446|
# 447| cleanup_fd int fd = open(image_path, O_RDONLY | O_CLOEXEC);
Error: CPPCHECK_WARNING: [#def28]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def29]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c:110:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'p'
# 108| } while (p);
# 109|
# 110|-> return 0;
# 111| }
# 112|
Error: CLANG_WARNING: [#def30]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c:485:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'name'
# 483| cleanup_free char *name = strndup(start, path - start);
# 484|
# 485|-> struct lcfs_node_s *child = lcfs_node_lookup_child(node, name);
# 486| if (child == NULL)
# 487| return NULL;
Error: CLANG_WARNING: [#def31]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c:506:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'name'
# 504| cleanup_free char *name = strndup(start, path - start);
# 505|
# 506|-> struct lcfs_node_s *child = lcfs_node_lookup_child(node, name);
# 507| if (child == NULL)
# 508| return NULL;
Error: CLANG_WARNING: [#def32]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c:524:19: warning[unix.Malloc]: Potential leak of memory pointed to by 's'
# 522| errx(EXIT_FAILURE, "Invalid integer %s\n", s);
# 523|
# 524|-> return (uint64_t)v;
# 525| }
# 526|
Error: CLANG_WARNING: [#def33]
composefs-1.0.3-build/composefs-1.0.3/tools/mkcomposefs.c:785:2: warning[unix.Malloc]: Use of memory after it is freed
# 783|
# 784| /* memmove, as src may be in the buf */
# 785|-> memmove(buf->buf + buf->size, src, len);
# 786| buf->size += len;
# 787| }
Error: CPPCHECK_WARNING: [#def34]
composefs-1.0.3-build/composefs-1.0.3/tools/mountcomposefs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
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-40.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | composefs-1.0.3-1.fc40 |
store-results-to | /tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.tar.xz |
time-created | 2024-07-03 12:07:34 |
time-finished | 2024-07-03 12:09:09 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpee0gs7gi/composefs-1.0.3-1.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |