Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
selinux-3.10/sandbox/seunshare.c:753:20: warning[-Wanalyzer-malloc-leak]: leak of ‘new_pid_table’
selinux-3.10/sandbox/seunshare.c:726:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:730:21: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:731:12: branch_false: following ‘false’ branch (when ‘pid_table’ is non-NULL)...
selinux-3.10/sandbox/seunshare.c:736:25: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:737:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:742:33: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:744:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:750:13: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:756:20: branch_false: following ‘false’ branch (when ‘pids != max_pids’)...
selinux-3.10/sandbox/seunshare.c:772:27: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:756:20: branch_true: following ‘true’ branch (when ‘pids == max_pids’)...
selinux-3.10/sandbox/seunshare.c:757:25: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:758:28: branch_false: following ‘false’ branch (when ‘pids < max_pids’)...
selinux-3.10/sandbox/seunshare.c:764:48: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:764:48: acquire_memory: allocated here
selinux-3.10/sandbox/seunshare.c:765:28: branch_false: following ‘false’ branch (when ‘new_pid_table’ is non-NULL)...
selinux-3.10/sandbox/seunshare.c:772:27: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:753:20: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:756:20: branch_true: following ‘true’ branch (when ‘pids == max_pids’)...
selinux-3.10/sandbox/seunshare.c:757:25: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:758:28: branch_false: following ‘false’ branch (when ‘pids < max_pids’)...
selinux-3.10/sandbox/seunshare.c:764:48: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:765:28: branch_true: following ‘true’ branch (when ‘new_pid_table’ is NULL)...
selinux-3.10/sandbox/seunshare.c:766:33: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:753:20: danger: ‘new_pid_table’ leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
#  751|   		printf("mcs=%s type=%s\n", mcs, type);
#  752|   	while ((de = readdir (dir)) != NULL) {
#  753|-> 		if (!(pid = (pid_t)atoi(de->d_name)) || pid == self)
#  754|   			continue;
#  755|   

Error: GCC_ANALYZER_WARNING (CWE-762): [#def2]
selinux-3.10/sandbox/seunshare.c:764:48: warning[-Wanalyzer-mismatching-deallocation]: ‘pid_table’ should have been deallocated with ‘free’ but was deallocated with ‘reallocarray’
selinux-3.10/sandbox/seunshare.c:726:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:730:21: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:730:21: acquire_memory: allocated here (expects deallocation with ‘free’)
selinux-3.10/sandbox/seunshare.c:731:12: branch_false: following ‘false’ branch (when ‘pid_table’ is non-NULL)...
selinux-3.10/sandbox/seunshare.c:736:25: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:737:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:742:33: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:744:12: branch_false: following ‘false’ branch...
selinux-3.10/sandbox/seunshare.c:750:13: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:756:20: branch_false: following ‘false’ branch (when ‘pids != max_pids’)...
selinux-3.10/sandbox/seunshare.c:772:27: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:752:16: branch_true: following ‘true’ branch...
selinux-3.10/sandbox/seunshare.c:753:41: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:756:20: branch_true: following ‘true’ branch (when ‘pids == max_pids’)...
selinux-3.10/sandbox/seunshare.c:757:25: branch_true: ...to here
selinux-3.10/sandbox/seunshare.c:758:28: branch_false: following ‘false’ branch (when ‘pids < max_pids’)...
selinux-3.10/sandbox/seunshare.c:764:48: branch_false: ...to here
selinux-3.10/sandbox/seunshare.c:764:48: danger: deallocated with ‘reallocarray’ here; allocation at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) expects deallocation with ‘free’
#  762|   				return -1;
#  763|   			}
#  764|-> 			pid_t *new_pid_table = reallocarray(pid_table, max_pids, sizeof(pid_t));
#  765|   			if (!new_pid_table) {
#  766|   				free(pid_table);

Scan Properties

analyzer-version-clippy1.95.0
analyzer-version-cppcheck2.20.0
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.95.0
diffbase-analyzer-version-cppcheck2.20.0
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-90.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-namepolicycoreutils-3.10-1.fc44
diffbase-store-results-to/tmp/tmpoflhj_xj/policycoreutils-3.10-1.fc44.tar.xz
diffbase-time-created2026-06-01 15:51:51
diffbase-time-finished2026-06-01 15:53:54
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpoflhj_xj/policycoreutils-3.10-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpoflhj_xj/policycoreutils-3.10-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-90.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-namepolicycoreutils-3.10-4.fc45
store-results-to/tmp/tmp31ss2m5t/policycoreutils-3.10-4.fc45.tar.xz
time-created2026-06-01 15:54:15
time-finished2026-06-01 15:55:46
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmp31ss2m5t/policycoreutils-3.10-4.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp31ss2m5t/policycoreutils-3.10-4.fc45.src.rpm'
tool-versioncsmock-3.8.5.20260529.133039.g6f3b5c6-1.el9