Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
criu-4.2/criu/cr-check.c:141:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ns.<Ue820>.net.nlsk’
criu-4.2/criu/cr-check.c:135:23: acquire_resource: socket created here
criu-4.2/criu/cr-check.c:136:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-check.c:141:15: branch_false: ...to here
criu-4.2/criu/cr-check.c:141:15: throw: if ‘collect_sockets’ throws an exception...
criu-4.2/criu/cr-check.c:141:15: danger: ‘ns.<Ue820>.net.nlsk’ leaks here
#  139|   	}
#  140|   
#  141|-> 	ret = collect_sockets(&ns);
#  142|   	if (!ret)
#  143|   		return 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
criu-4.2/criu/cr-dump.c:1416:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
criu-4.2/criu/cr-dump.c:1395:9: branch_true: following ‘true’ branch (when ‘item’ is non-NULL)...
criu-4.2/criu/cr-dump.c:1396:21: branch_true: ...to here
criu-4.2/criu/cr-dump.c:1410:20: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-dump.c:1413:29: branch_false: ...to here
criu-4.2/criu/cr-dump.c:1416:17: branch_true: following ‘true’ branch...
criu-4.2/criu/cr-dump.c:1416:17: branch_true: ...to here
criu-4.2/criu/cr-dump.c:1416:17: danger: dereference of NULL ‘0’
# 1414|   		item->pgid = pps_buf.pgid;
# 1415|   
# 1416|-> 		BUG_ON(has_children(item));
# 1417|   
# 1418|   		if (!item->sid) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def3]
criu-4.2/criu/cr-service.c:442:13: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_pipe[1]’
criu-4.2/criu/cr-service.c:1037:12: enter_function: entry to ‘start_page_server_req’
criu-4.2/criu/cr-service.c:1046:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1051:13: branch_false: ...to here
criu-4.2/criu/cr-service.c:1051:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1056:15: branch_false: ...to here
criu-4.2/criu/cr-service.c:1057:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
criu-4.2/criu/cr-service.c:1058:17: branch_true: ...to here
criu-4.2/criu/cr-service.c:1061:21: call_function: calling ‘setup_opts_from_req’ from ‘start_page_server_req’
#  440|   		opts.unprivileged = req->unprivileged;
#  441|   
#  442|-> 	if (log_keep_err()) {
#  443|   		pr_perror("Can't tune log");
#  444|   		goto err;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
criu-4.2/criu/cr-service.c:443:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_pipe[1]’
criu-4.2/criu/cr-service.c:1037:12: enter_function: entry to ‘start_page_server_req’
criu-4.2/criu/cr-service.c:1046:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1051:13: branch_false: ...to here
criu-4.2/criu/cr-service.c:1051:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1056:15: branch_false: ...to here
criu-4.2/criu/cr-service.c:1057:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
criu-4.2/criu/cr-service.c:1058:17: branch_true: ...to here
criu-4.2/criu/cr-service.c:1061:21: call_function: calling ‘setup_opts_from_req’ from ‘start_page_server_req’
#  441|   
#  442|   	if (log_keep_err()) {
#  443|-> 		pr_perror("Can't tune log");
#  444|   		goto err;
#  445|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def5]
criu-4.2/criu/cr-service.c:462:29: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_pipe[1]’
criu-4.2/criu/cr-service.c:1037:12: enter_function: entry to ‘start_page_server_req’
criu-4.2/criu/cr-service.c:1046:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1051:13: branch_false: ...to here
criu-4.2/criu/cr-service.c:1051:12: branch_false: following ‘false’ branch...
criu-4.2/criu/cr-service.c:1056:15: branch_false: ...to here
criu-4.2/criu/cr-service.c:1057:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
criu-4.2/criu/cr-service.c:1058:17: branch_true: ...to here
criu-4.2/criu/cr-service.c:1061:21: call_function: calling ‘setup_opts_from_req’ from ‘start_page_server_req’
#  460|   		opts.ext_unix_sk = req->ext_unix_sk;
#  461|   		for (i = 0; i < req->n_unix_sk_ino; i++) {
#  462|-> 			if (unix_sk_id_add((unsigned int)req->unix_sk_ino[i]->inode) < 0)
#  463|   				goto err;
#  464|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
criu-4.2/criu/mem.c:1588:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
criu-4.2/criu/mem.c:1562:12: branch_true: following ‘true’ branch...
criu-4.2/criu/mem.c:1567:22: branch_true: ...to here
criu-4.2/criu/mem.c:1567:22: branch_false: following ‘false’ branch...
criu-4.2/criu/mem.c:1571:16: branch_false: ...to here
criu-4.2/criu/mem.c:1571:16: branch_false: following ‘false’ branch (when ‘___p’ is non-NULL)...
criu-4.2/criu/mem.c:1574:20: branch_false: ...to here
criu-4.2/criu/mem.c:1580:20: branch_false: following ‘false’ branch...
criu-4.2/criu/mem.c:1580:20: branch_false: ...to here
criu-4.2/criu/mem.c:1588:25: branch_false: following ‘false’ branch...
criu-4.2/criu/mem.c:1590:31: branch_false: ...to here
criu-4.2/criu/mem.c:1591:28: branch_false: following ‘false’ branch...
criu-4.2/criu/mem.c:1594:25: branch_false: ...to here
criu-4.2/criu/mem.c:1601:18: branch_true: following ‘true’ branch...
criu-4.2/criu/mem.c:1601:18: branch_true: ...to here
criu-4.2/criu/mem.c:1580:20: branch_false: following ‘false’ branch...
criu-4.2/criu/mem.c:1580:20: branch_false: ...to here
criu-4.2/criu/mem.c:1588:25: danger: dereference of NULL ‘0’
# 1586|   			struct vma_area *vma;
# 1587|   
# 1588|-> 			BUG_ON(!(regs[i].categories & PAGE_IS_GUARD));
# 1589|   
# 1590|   			vma = alloc_vma_area();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
criu-4.2/criu/mount.c:3297:30: warning[-Wanalyzer-malloc-leak]: leak of ‘head’
criu-4.2/criu/mount.c:3378:5: enter_function: entry to ‘read_mnt_ns_img’
criu-4.2/criu/mount.c:3383:12: branch_false: following ‘false’ branch...
criu-4.2/criu/mount.c:3388:14: branch_false: ...to here
criu-4.2/criu/mount.c:3388:29: branch_true: following ‘true’ branch (when ‘nsid’ is non-NULL)...
criu-4.2/criu/mount.c:3389:36: branch_true: ...to here
criu-4.2/criu/mount.c:3394:21: call_function: calling ‘collect_mnt_from_image’ from ‘read_mnt_ns_img’
# 3295|   			pm->internal_sharing = me->internal_sharing;
# 3296|   
# 3297|-> 		pm->source = xstrdup(me->source);
# 3298|   		if (!pm->source)
# 3299|   			goto err;

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
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-134.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.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namecriu-4.1.1-2.fc43
diffbase-store-results-to/tmp/tmppj9wavkw/criu-4.1.1-2.fc43.tar.xz
diffbase-time-created2026-01-08 15:48:47
diffbase-time-finished2026-01-08 15:52:53
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmppj9wavkw/criu-4.1.1-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmppj9wavkw/criu-4.1.1-2.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-134.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namecriu-4.2-11.fc44
store-results-to/tmp/tmpwiv_zemz/criu-4.2-11.fc44.tar.xz
time-created2026-01-08 15:53:33
time-finished2026-01-08 15:57:08
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpwiv_zemz/criu-4.2-11.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpwiv_zemz/criu-4.2-11.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9