Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libselinux-3.11/src/label_media.c:140:28: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*data.nspec, 80)’
libselinux-3.11/src/label_media.c:70:12: enter_function: entry to ‘init’
libselinux-3.11/src/label_media.c:100:12: branch_true: following ‘true’ branch (when ‘path’ is NULL)...
libselinux-3.11/src/label_media.c:101:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:102:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:104:9: branch_false: ...to here
libselinux-3.11/src/label_media.c:106:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:108:14: branch_false: ...to here
libselinux-3.11/src/label_media.c:108:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:112:26: branch_false: ...to here
libselinux-3.11/src/label_media.c:123:24: branch_true: following ‘true’ branch (when ‘pass != 2’)...
libselinux-3.11/src/label_media.c:125:17: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:127:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:128:28: branch_true: ...to here
libselinux-3.11/src/label_media.c:128:29: call_function: calling ‘process_line’ from ‘init’
libselinux-3.11/src/label_media.c:128:29: return_function: returning to ‘init’ from ‘process_line’
libselinux-3.11/src/label_media.c:126:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_media.c:127:24: branch_true: ...to here
libselinux-3.11/src/label_media.c:126:24: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:134:20: branch_false: ...to here
libselinux-3.11/src/label_media.c:134:20: branch_true: following ‘true’ branch (when ‘pass == 0’)...
libselinux-3.11/src/label_media.c:135:29: branch_true: ...to here
libselinux-3.11/src/label_media.c:135:28: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_media.c:139:42: branch_false: ...to here
libselinux-3.11/src/label_media.c:139:42: acquire_memory: allocated here
libselinux-3.11/src/label_media.c:140:28: danger: ‘calloc((long unsigned int)*data.nspec, 80)’ leaks here; was allocated at [(31)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/30)
#  138|   			}
#  139|   			data->spec_arr = calloc(data->nspec, sizeof(spec_t));
#  140|-> 			if (data->spec_arr == NULL) {
#  141|   				status = -1;
#  142|   				goto finish;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libselinux-3.11/src/label_x.c:170:28: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc((long unsigned int)*data.nspec, 80)’
libselinux-3.11/src/label_x.c:100:12: enter_function: entry to ‘init’
libselinux-3.11/src/label_x.c:130:12: branch_true: following ‘true’ branch (when ‘path’ is NULL)...
libselinux-3.11/src/label_x.c:131:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:132:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:134:9: branch_false: ...to here
libselinux-3.11/src/label_x.c:136:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:138:14: branch_false: ...to here
libselinux-3.11/src/label_x.c:138:12: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:142:26: branch_false: ...to here
libselinux-3.11/src/label_x.c:153:24: branch_true: following ‘true’ branch (when ‘pass != 2’)...
libselinux-3.11/src/label_x.c:155:17: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:157:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:158:28: branch_true: ...to here
libselinux-3.11/src/label_x.c:158:29: call_function: calling ‘process_line’ from ‘init’
libselinux-3.11/src/label_x.c:158:29: return_function: returning to ‘init’ from ‘process_line’
libselinux-3.11/src/label_x.c:156:24: branch_true: following ‘true’ branch...
libselinux-3.11/src/label_x.c:157:24: branch_true: ...to here
libselinux-3.11/src/label_x.c:156:24: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:164:20: branch_false: ...to here
libselinux-3.11/src/label_x.c:164:20: branch_true: following ‘true’ branch (when ‘pass == 0’)...
libselinux-3.11/src/label_x.c:165:29: branch_true: ...to here
libselinux-3.11/src/label_x.c:165:28: branch_false: following ‘false’ branch...
libselinux-3.11/src/label_x.c:169:42: branch_false: ...to here
libselinux-3.11/src/label_x.c:169:42: acquire_memory: allocated here
libselinux-3.11/src/label_x.c:170:28: danger: ‘calloc((long unsigned int)*data.nspec, 80)’ leaks here; was allocated at [(31)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/30)
#  168|   			}
#  169|   			data->spec_arr = calloc(data->nspec, sizeof(spec_t));
#  170|-> 			if (data->spec_arr == NULL) {
#  171|   				status = -1;
#  172|   				goto finish;

Error: GCC_ANALYZER_WARNING (CWE-415): [#def3]
libselinux-3.11/src/selinux_restorecon.c:230:20: warning[-Wanalyzer-double-free]: double-‘reallocarray’ of ‘exclude_lst’
libselinux-3.11/src/selinux_restorecon.c:1889:6: enter_function: entry to ‘selinux_restorecon_set_exclude_list’
libselinux-3.11/src/selinux_restorecon.c:1894:21: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:56: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: call_function: calling ‘add_exclude’ from ‘selinux_restorecon_set_exclude_list’
libselinux-3.11/src/selinux_restorecon.c:1902:21: return_function: returning to ‘selinux_restorecon_set_exclude_list’ from ‘add_exclude’
libselinux-3.11/src/selinux_restorecon.c:1902:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1903:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1894:38: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1894:21: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:20: branch_true: following ‘true’ branch...
libselinux-3.11/src/selinux_restorecon.c:1895:56: branch_true: ...to here
libselinux-3.11/src/selinux_restorecon.c:1895:21: branch_false: following ‘false’ branch...
libselinux-3.11/src/selinux_restorecon.c:1902:21: branch_false: ...to here
libselinux-3.11/src/selinux_restorecon.c:1902:21: call_function: calling ‘add_exclude’ from ‘selinux_restorecon_set_exclude_list’
#  228|   	}
#  229|   
#  230|-> 	tmp_list = reallocarray(exclude_lst, exclude_count + 1,
#  231|   				sizeof(struct edir));
#  232|   	if (!tmp_list)

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-56.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-namelibselinux-3.10-1.fc44
diffbase-store-results-to/tmp/tmpmr_ao70w/libselinux-3.10-1.fc44.tar.xz
diffbase-time-created2026-08-03 17:50:41
diffbase-time-finished2026-08-03 17:53:21
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpmr_ao70w/libselinux-3.10-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpmr_ao70w/libselinux-3.10-1.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-56.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-namelibselinux-3.11-3.fc45
store-results-to/tmp/tmpaw8sce34/libselinux-3.11-3.fc45.tar.xz
time-created2026-08-03 17:53:46
time-finished2026-08-03 17:55:37
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpaw8sce34/libselinux-3.11-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpaw8sce34/libselinux-3.11-3.fc45.src.rpm'
tool-versioncsmock-3.8.7.20260803.142340.gb75b18e-1.el9