Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
util-linux-2.40.4/disk-utils/fdformat.c:127:45: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xmalloc((long unsigned int)track_size) + (sizetype)count’
util-linux-2.40.4/disk-utils/fdformat.c:175:5: enter_function: entry to ‘main’
util-linux-2.40.4/disk-utils/fdformat.c:201:16: branch_true: following ‘true’ branch (when ‘ch != -1’)...
util-linux-2.40.4/disk-utils/fdformat.c:202:17: branch_true: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:227:12: branch_false: following ‘false’ branch (when ‘argc > 0’)...
util-linux-2.40.4/disk-utils/fdformat.c:231:13: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:231:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:233:14: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:233:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:236:16: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:237:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:239:13: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:239:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:244:42: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:246:12: branch_false: following ‘false’ branch (when ‘has_user_defined_track_to != 0’)...
util-linux-2.40.4/disk-utils/fdformat.c:249:27: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:249:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:251:12: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:251:12: branch_false: following ‘false’ branch...
util-linux-2.40.4/disk-utils/fdformat.c:253:12: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:253:12: branch_false: following ‘false’ branch (when ‘track_to >= track_from’)...
util-linux-2.40.4/disk-utils/fdformat.c:256:9: branch_false: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:256:9: call_function: calling ‘format_disk’ from ‘main’
util-linux-2.40.4/disk-utils/fdformat.c:256:9: return_function: returning to ‘main’ from ‘format_disk’
util-linux-2.40.4/disk-utils/fdformat.c:258:12: branch_true: following ‘true’ branch (when ‘verify != 0’)...
util-linux-2.40.4/disk-utils/fdformat.c:259:17: branch_true: ...to here
util-linux-2.40.4/disk-utils/fdformat.c:259:17: call_function: calling ‘verify_disk’ from ‘main’
#  125|   				}
#  126|   				for (count = 0; count < track_size; count++)
#  127|-> 					if (data[count] != FD_FILL_BYTE) {
#  128|   						if (retries_left) {
#  129|   							format_begin(ctrl);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
util-linux-2.40.4/misc-utils/cal.c:1016:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208)’
util-linux-2.40.4/misc-utils/cal.c:1047:13: enter_function: entry to ‘yearly’
util-linux-2.40.4/misc-utils/cal.c:1061:9: call_function: calling ‘monthly’ from ‘yearly’
# 1014|   
# 1015|   	for (i = 0; i < ctl->months_in_row - 1; i++)
# 1016|-> 		ms[i].next = &ms[i + 1];
# 1017|   
# 1018|   	rows = (ctl->num_months - 1) / ctl->months_in_row;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
util-linux-2.40.4/misc-utils/waitpid.c:54:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc(n_strings, 4)’
util-linux-2.40.4/misc-utils/waitpid.c:223:5: enter_function: entry to ‘main’
util-linux-2.40.4/misc-utils/waitpid.c:234:12: branch_false: following ‘false’ branch (when ‘n_pids != 0’)...
util-linux-2.40.4/misc-utils/waitpid.c:237:13: branch_false: ...to here
util-linux-2.40.4/misc-utils/waitpid.c:241:23: call_function: calling ‘parse_pids’ from ‘main’
#   52|   
#   53|   	for (size_t i = 0; i < n_strings; i++)
#   54|-> 		pids[i] = strtopid_or_err(strings[i], _("failed to parse pid"));
#   55|   
#   56|   	return pids;

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-220.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.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameutil-linux-2.40.4-7.fc42
diffbase-store-results-to/tmp/tmpsg6uki48/util-linux-2.40.4-7.fc42.tar.xz
diffbase-time-created2025-04-25 15:51:16
diffbase-time-finished2025-04-25 15:57:54
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpsg6uki48/util-linux-2.40.4-7.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsg6uki48/util-linux-2.40.4-7.fc42.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-220.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameutil-linux-2.40.4-7.fc43
store-results-to/tmp/tmpgmeyevn9/util-linux-2.40.4-7.fc43.tar.xz
time-created2025-04-25 15:58:28
time-finished2025-04-25 16:04:44
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpgmeyevn9/util-linux-2.40.4-7.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpgmeyevn9/util-linux-2.40.4-7.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9