Task #130850 - added.err
back to task #130850download
Error: COMPILER_WARNING (CWE-252):
erofs-utils-1.9.2/lib/backends/ublk.c: scope_hint: In function 'ublk_queue_thread'
erofs-utils-1.9.2/lib/backends/ublk.c:758:23: warning[-Wunused-result]: ignoring return value of 'write' declared with attribute 'warn_unused_result'
# 758 | (void)write(q->dev->stop_efd, &val, sizeof(val));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 756| uint64_t val = 1;
# 757|
# 758|-> (void)write(q->dev->stop_efd, &val, sizeof(val));
# 759| }
# 760| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-775):
erofs-utils-1.9.2/lib/backends/ublk.c:1321:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/ublk-control", 2)'
erofs-utils-1.9.2/lib/backends/ublk.c:1316:19: acquire_resource: opened here
erofs-utils-1.9.2/lib/backends/ublk.c:1317:12: branch_false: following 'false' branch...
erofs-utils-1.9.2/lib/backends/ublk.c:1320:15: branch_false: ...to here
erofs-utils-1.9.2/lib/backends/ublk.c:1321:12: danger: 'open("/dev/ublk-control", 2)' leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1319|
# 1320| ret = ublk_ctrl_ring_init(&ring);
# 1321|-> if (ret < 0) {
# 1322| erofs_err("io_uring_queue_init failed: %s", strerror(-ret));
# 1323| return ret;
Error: GCC_ANALYZER_WARNING (CWE-775):
erofs-utils-1.9.2/lib/backends/ublk.c:1325:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open("/dev/ublk-control", 2)'
erofs-utils-1.9.2/lib/backends/ublk.c:1309:5: enter_function: entry to 'erofs_ublk_del_dev_by_id'
erofs-utils-1.9.2/lib/backends/ublk.c:1316:19: acquire_resource: opened here
erofs-utils-1.9.2/lib/backends/ublk.c:1317:12: branch_false: following 'false' branch...
erofs-utils-1.9.2/lib/backends/ublk.c:1320:15: branch_false: ...to here
erofs-utils-1.9.2/lib/backends/ublk.c:1321:12: branch_false: following 'false' branch...
erofs-utils-1.9.2/lib/backends/ublk.c:1325:9: branch_false: ...to here
erofs-utils-1.9.2/lib/backends/ublk.c:1329:15: call_function: calling 'ublk_ctrl_cmd_ring' from 'erofs_ublk_del_dev_by_id'
erofs-utils-1.9.2/lib/backends/ublk.c:1329:15: return_function: returning to 'erofs_ublk_del_dev_by_id' from 'ublk_ctrl_cmd_ring'
erofs-utils-1.9.2/lib/backends/ublk.c:1330:12: branch_true: following 'true' branch...
erofs-utils-1.9.2/lib/backends/ublk.c:1331:17: branch_true: ...to here
erofs-utils-1.9.2/lib/backends/ublk.c:1332:23: call_function: calling 'ublk_ctrl_cmd_ring' from 'erofs_ublk_del_dev_by_id'
erofs-utils-1.9.2/lib/backends/ublk.c:1332:23: return_function: returning to 'erofs_ublk_del_dev_by_id' from 'ublk_ctrl_cmd_ring'
erofs-utils-1.9.2/lib/backends/ublk.c:1325:9: danger: 'open("/dev/ublk-control", 2)' leaks here; was opened at [(2)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/1)
# 1323| return ret;
# 1324| }
# 1325|-> cmd.dev_id = dev_id;
# 1326| cmd.queue_id = (u16)-1;
# 1327| cmd.len = sizeof(dev_info);
Error: GCC_ANALYZER_WARNING (CWE-835):
erofs-utils-1.9.2/lib/inode.c:149:9: warning[-Wanalyzer-infinite-loop]: infinite loop
# 147| return got;
# 148|
# 149|-> list_for_each_entry_safe(d, t, &inode->i_subdirs, d_child)
# 150| free(d);
# 151|
Error: GCC_ANALYZER_WARNING (CWE-415):
erofs-utils-1.9.2/lib/inode.c:150:17: warning[-Wanalyzer-double-free]: double-'free' of 'd'
erofs-utils-1.9.2/lib/inode.c:2471:21: enter_function: entry to 'erofs_make_empty_root_inode'
erofs-utils-1.9.2/lib/inode.c:2474:48: branch_false: following 'false' branch (when 'im' is NULL)...
erofs-utils-1.9.2/lib/inode.c:2477:16: branch_false: ...to here
erofs-utils-1.9.2/lib/inode.c:2477:16: call_function: calling 'erofs_new_inode' from 'erofs_make_empty_root_inode'
erofs-utils-1.9.2/lib/inode.c:2477:16: return_function: returning to 'erofs_make_empty_root_inode' from 'erofs_new_inode'
erofs-utils-1.9.2/lib/inode.c:2478:12: branch_false: following 'false' branch...
erofs-utils-1.9.2/lib/inode.c:2481:27: branch_false: ...to here
erofs-utils-1.9.2/lib/inode.c:2482:12: branch_true: following 'true' branch...
erofs-utils-1.9.2/lib/inode.c:2483:17: branch_true: ...to here
erofs-utils-1.9.2/lib/inode.c:2483:17: call_function: calling 'erofs_iput' from 'erofs_make_empty_root_inode'
# 148|
# 149| list_for_each_entry_safe(d, t, &inode->i_subdirs, d_child)
# 150|-> free(d);
# 151|
# 152| free(inode->compressmeta);
Error: GCC_ANALYZER_WARNING (CWE-401):
erofs-utils-1.9.2/lib/remotes/s3.c:1337:12: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
erofs-utils-1.9.2/lib/remotes/s3.c:1322:12: enter_function: entry to 's3erofs_get_object_size'
erofs-utils-1.9.2/lib/remotes/s3.c:1335:15: call_function: calling 's3erofs_prepare_url' from 's3erofs_get_object_size'
erofs-utils-1.9.2/lib/remotes/s3.c:1335:15: return_function: returning to 's3erofs_get_object_size' from 's3erofs_prepare_url'
erofs-utils-1.9.2/lib/remotes/s3.c:1337:12: danger: '<unknown>' leaks here; was allocated at [(22)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/21)
# 1335| ret = s3erofs_prepare_url(&req, s3->endpoint, s3vf->bucket,
# 1336| s3vf->key, NULL, s3->url_style, s3->sig);
# 1337|-> if (ret < 0)
# 1338| return ret;
# 1339|
Error: GCC_ANALYZER_WARNING (CWE-688):
erofs-utils-1.9.2/mount/main.c:1898:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
erofs-utils-1.9.2/mount/main.c:2279:5: enter_function: entry to ‘erofsmount_umount’
erofs-utils-1.9.2/mount/main.c:2290:12: branch_false: following ‘false’ branch (when ‘target’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2293:15: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2294:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
erofs-utils-1.9.2/mount/main.c:2299:13: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2301:19: branch_true: following ‘true’ branch...
erofs-utils-1.9.2/mount/main.c:2308:18: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2309:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2314:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2314:14: release_memory: ‘s’ is NULL
erofs-utils-1.9.2/mount/main.c:2314:24: branch_true: following ‘true’ branch...
erofs-utils-1.9.2/mount/main.c:2318:17: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2320:20: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2321:25: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2324:20: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2325:25: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2327:28: branch_false: following ‘false’ branch (when ‘end’ is NULL)...
erofs-utils-1.9.2/mount/main.c:2329:28: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2333:28: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2339:25: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2341:28: branch_true: following ‘true’ branch (when ‘mountpoint’ is NULL)...
erofs-utils-1.9.2/mount/main.c:2342:46: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2347:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2352:22: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2352:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2368:18: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2369:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2383:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2387:12: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2387:12: branch_true: following ‘true’ branch (when ‘mountpoint’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2388:23: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2389:20: branch_false: following ‘false’ branch (when ‘err == 0’)...
erofs-utils-1.9.2/mount/main.c:2396:12: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2396:12: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2397:23: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2397:23: call_function: calling ‘erofsmount_cleanup_fanotify_worker’ from ‘erofsmount_umount’
# 1896| goto out;
# 1897| }
# 1898|-> if (strcmp(state.mountpoint, mountpoint) ||
# 1899| strcmp(state.source, source)) {
# 1900| erofsmount_free_fanotify_state(&state);
Error: GCC_ANALYZER_WARNING (CWE-688):
erofs-utils-1.9.2/mount/main.c:1899:21: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
erofs-utils-1.9.2/mount/main.c:2279:5: enter_function: entry to ‘erofsmount_umount’
erofs-utils-1.9.2/mount/main.c:2290:12: branch_false: following ‘false’ branch (when ‘target’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2293:15: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2294:12: branch_false: following ‘false’ branch (when ‘err >= 0’)...
erofs-utils-1.9.2/mount/main.c:2299:13: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2301:19: branch_true: following ‘true’ branch...
erofs-utils-1.9.2/mount/main.c:2308:18: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2309:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2314:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2314:14: release_memory: ‘s’ is NULL
erofs-utils-1.9.2/mount/main.c:2314:24: branch_true: following ‘true’ branch...
erofs-utils-1.9.2/mount/main.c:2318:17: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2320:20: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2321:25: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2324:20: branch_true: following ‘true’ branch (when ‘end’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2325:25: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2327:28: branch_false: following ‘false’ branch (when ‘end’ is NULL)...
erofs-utils-1.9.2/mount/main.c:2329:28: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2333:28: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2339:25: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2341:28: branch_true: following ‘true’ branch (when ‘mountpoint’ is NULL)...
erofs-utils-1.9.2/mount/main.c:2342:46: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2347:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2352:22: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2352:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2368:18: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2369:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2382:14: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2383:12: branch_false: following ‘false’ branch...
erofs-utils-1.9.2/mount/main.c:2387:12: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2387:12: branch_true: following ‘true’ branch (when ‘mountpoint’ is non-NULL)...
erofs-utils-1.9.2/mount/main.c:2388:23: branch_true: ...to here
erofs-utils-1.9.2/mount/main.c:2389:20: branch_false: following ‘false’ branch (when ‘err == 0’)...
erofs-utils-1.9.2/mount/main.c:2396:12: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2396:12: branch_false: following ‘false’ branch (when ‘isblk == 0’)...
erofs-utils-1.9.2/mount/main.c:2397:23: branch_false: ...to here
erofs-utils-1.9.2/mount/main.c:2397:23: call_function: calling ‘erofsmount_cleanup_fanotify_worker’ from ‘erofsmount_umount’
# 1897| }
# 1898| if (strcmp(state.mountpoint, mountpoint) ||
# 1899|-> strcmp(state.source, source)) {
# 1900| erofsmount_free_fanotify_state(&state);
# 1901| free(state_path);
Error: COMPILER_WARNING (CWE-252):
erofs-utils-1.9.2/mount/main.c: scope_hint: In function ‘erofsmount_fanotify_child’
erofs-utils-1.9.2/mount/main.c:2043:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 2043 | write(pipefd, &err, sizeof(err));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2041| err = 0;
# 2042| notify:
# 2043|-> write(pipefd, &err, sizeof(err));
# 2044| close(pipefd);
# 2045|