Newly introduced findings

List of Findings

Error: COMPILER_WARNING (CWE-252): [#def1]
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): [#def2]
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): [#def3]
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): [#def4]
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): [#def5]
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): [#def6]
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): [#def7]
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): [#def8]
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): [#def9]
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|   

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-79.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameerofs-utils-1.9.1-1.fc44
diffbase-store-results-to/tmp/tmpip6nm4h7/erofs-utils-1.9.1-1.fc44.tar.xz
diffbase-time-created2026-08-03 14:00:17
diffbase-time-finished2026-08-03 14:02:56
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpip6nm4h7/erofs-utils-1.9.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpip6nm4h7/erofs-utils-1.9.1-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.HEAD-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-79.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameerofs-utils-1.9.2-3.fc45
store-results-to/tmp/tmppwtrd4kl/erofs-utils-1.9.2-3.fc45.tar.xz
time-created2026-08-03 14:03:22
time-finished2026-08-03 14:05:12
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmppwtrd4kl/erofs-utils-1.9.2-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmppwtrd4kl/erofs-utils-1.9.2-3.fc45.src.rpm'
tool-versioncsmock-3.8.7.HEAD-1.el9