Fixed findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
criu-4.1.1/criu/cr-service.c:1015:17: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘start_pipe[(int)ps.pid]’
criu-4.1.1/criu/cr-service.c:1008:12: branch_false: following ‘false’ branch...
criu-4.1.1/criu/cr-service.c:1013:15: branch_false: ...to here
criu-4.1.1/criu/cr-service.c:1014:12: branch_true: following ‘true’ branch (when ‘pid == 0’)...
criu-4.1.1/criu/cr-service.c:1015:17: branch_true: ...to here
criu-4.1.1/criu/cr-service.c:1015:17: danger: ‘start_pipe[(int)ps.pid]’ leaks here
# 1013|   	pid = fork();
# 1014|   	if (pid == 0) {
# 1015|-> 		close(start_pipe[0]);
# 1016|   
# 1017|   		opts.mode = CR_PAGE_SERVER;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
criu-4.1.1/criu/include/util.h:408:9: warning[-Wanalyzer-malloc-leak]: leak of ‘head’
criu-4.1.1/criu/mount.c:3367:5: enter_function: entry to ‘read_mnt_ns_img’
criu-4.1.1/criu/mount.c:3372:12: branch_false: following ‘false’ branch...
criu-4.1.1/criu/mount.c:3377:14: branch_false: ...to here
criu-4.1.1/criu/mount.c:3377:29: branch_true: following ‘true’ branch (when ‘nsid’ is non-NULL)...
criu-4.1.1/criu/mount.c:3378:36: branch_true: ...to here
criu-4.1.1/criu/mount.c:3380:20: branch_false: following ‘false’ branch...
criu-4.1.1/criu/mount.c:3383:21: branch_false: ...to here
criu-4.1.1/criu/mount.c:3383:21: call_function: calling ‘collect_mnt_from_image’ from ‘read_mnt_ns_img’
#  406|   {
#  407|   	void **pp = (void **)p;
#  408|-> 	free(*pp);
#  409|   }
#  410|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
criu-4.1.1/criu/mount.c:3286:30: warning[-Wanalyzer-malloc-leak]: leak of ‘head’
criu-4.1.1/criu/mount.c:3367:5: enter_function: entry to ‘read_mnt_ns_img’
criu-4.1.1/criu/mount.c:3372:12: branch_false: following ‘false’ branch...
criu-4.1.1/criu/mount.c:3377:14: branch_false: ...to here
criu-4.1.1/criu/mount.c:3377:29: branch_true: following ‘true’ branch (when ‘nsid’ is non-NULL)...
criu-4.1.1/criu/mount.c:3378:36: branch_true: ...to here
criu-4.1.1/criu/mount.c:3380:20: branch_false: following ‘false’ branch...
criu-4.1.1/criu/mount.c:3383:21: branch_false: ...to here
criu-4.1.1/criu/mount.c:3383:21: call_function: calling ‘collect_mnt_from_image’ from ‘read_mnt_ns_img’
# 3284|   			pm->internal_sharing = me->internal_sharing;
# 3285|   
# 3286|-> 		pm->source = xstrdup(me->source);
# 3287|   		if (!pm->source)
# 3288|   			goto err;

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.90.0
diffbase-analyzer-version-cppcheck2.18.3
diffbase-analyzer-version-gcc15.2.1
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-251.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-gcc-latest-x86_64
diffbase-project-namecriu-4.1.1-4.fc44
diffbase-store-results-to/tmp/tmpi4lfaxvm/criu-4.1.1-4.fc44.tar.xz
diffbase-time-created2025-10-28 17:38:12
diffbase-time-finished2025-10-28 17:42:43
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpi4lfaxvm/criu-4.1.1-4.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpi4lfaxvm/criu-4.1.1-4.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-251.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-gcc-latest-x86_64
project-namecriu-4.1.1-2.fc43
store-results-to/tmp/tmptyc18cvo/criu-4.1.1-2.fc43.tar.xz
time-created2025-10-28 17:32:22
time-finished2025-10-28 17:37:24
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmptyc18cvo/criu-4.1.1-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmptyc18cvo/criu-4.1.1-2.fc43.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9