Newly introduced findings

List of Findings

Error: SHELLCHECK_WARNING (CWE-563): [#def1]
/usr/sbin/xfs_property:8:1: warning[SC2034]: OPTS appears unused. Verify use (or export if used externally).
#    6|   #
#    7|   
#    8|-> OPTS=""
#    9|   USAGE="Usage: xfs_property [-V] [mountpoint|device|file] [list [-v]|get name...|set name=value...|remove name...]"
#   10|   

Error: SHELLCHECK_WARNING (CWE-571): [#def2]
/usr/sbin/xfs_property:15:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
#   13|   # the last line and return it if it's actually a block device.
#   14|   try_find_loop_dev_for_file() {
#   15|-> 	local x="$(losetup -O NAME -j "$1" 2> /dev/null | tail -n 1)"
#   16|   	test -b "${x}" && echo "${x}"
#   17|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c: scope_hint: In function ‘scrubv_fill_group’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c:382:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c: scope_hint: In function ‘scrubv_fill_group’
#  380|   
#  381|   		v = xfrog_scrubv_next_vector(scrubv);
#  382|-> 		v->sv_type = i;
#  383|   
#  384|   		if (barrier_interval &&

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c:387:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c: scope_hint: In function ‘scrubv_fill_group’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/io/scrub.c: scope_hint: In function ‘scrubv_fill_group’
#  385|   		    scrubv->head.svh_nr % (barrier_interval + 1) == 0) {
#  386|   			v = xfrog_scrubv_next_vector(scrubv);
#  387|-> 			v->sv_flags = barrier_mask;
#  388|   			v->sv_type = XFS_SCRUB_TYPE_BARRIER;
#  389|   		}

Error: GCC_ANALYZER_WARNING (CWE-122): [#def5]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c: scope_hint: In function 'hist_cdf'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:137:32: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
/usr/include/urcu/assert.h:36: included_from: Included from here.
/usr/include/urcu/debug.h:22: included_from: Included from here.
/usr/include/urcu/static/urcu-memb.h:37: included_from: Included from here.
/usr/include/urcu/urcu-memb.h:61: included_from: Included from here.
/usr/include/urcu/urcu.h:39: included_from: Included from here.
/usr/include/urcu.h:2: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/include/platform_defs.h:26: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:11: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  135|   	}
#  136|   
#  137|-> 	cdf->buckets[i].nr_obs = hs->buckets[i].nr_obs;
#  138|   	cdf->buckets[i].sum = hs->buckets[i].sum;
#  139|   	i--;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def6]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:138:29: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  136|   
#  137|   	cdf->buckets[i].nr_obs = hs->buckets[i].nr_obs;
#  138|-> 	cdf->buckets[i].sum = hs->buckets[i].sum;
#  139|   	i--;
#  140|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def7]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:142:40: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  140|   
#  141|   	while (i >= 0) {
#  142|-> 		cdf->buckets[i].nr_obs = hs->buckets[i].nr_obs +
#  143|   					cdf->buckets[i + 1].nr_obs;
#  144|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def8]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:143:60: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  141|   	while (i >= 0) {
#  142|   		cdf->buckets[i].nr_obs = hs->buckets[i].nr_obs +
#  143|-> 					cdf->buckets[i + 1].nr_obs;
#  144|   
#  145|   		cdf->buckets[i].sum =    hs->buckets[i].sum +

Error: GCC_ANALYZER_WARNING (CWE-122): [#def9]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:145:37: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  143|   					cdf->buckets[i + 1].nr_obs;
#  144|   
#  145|-> 		cdf->buckets[i].sum =    hs->buckets[i].sum +
#  146|   					cdf->buckets[i + 1].sum;
#  147|   		i--;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def10]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:146:60: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  144|   
#  145|   		cdf->buckets[i].sum =    hs->buckets[i].sum +
#  146|-> 					cdf->buckets[i + 1].sum;
#  147|   		i--;
#  148|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c: scope_hint: In function 'hist_print'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:216:48: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/histogram.c:119:9: note: in expansion of macro 'ASSERT'
#  214|   				hs->buckets[i].sum * 100.0 / hs->tot_sum,
#  215|   				cdf->buckets[i].sum * 100.0 / hs->tot_sum,
#  216|-> 				cdf->buckets[i].nr_obs * 100.0 / hs->tot_obs);
#  217|   	}
#  218|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def12]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_bmap.h:152:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'irec1.br_startblock'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c: scope_hint: In function 'xfs_exchmaps_estimate'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c: scope_hint: In function 'xfs_exchmaps_estimate'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c: scope_hint: In function 'xfs_exchmaps_estimate'
#  150|   static inline bool xfs_bmap_is_real_extent(const struct xfs_bmbt_irec *irec)
#  151|   {
#  152|-> 	return irec->br_startblock != HOLESTARTBLOCK &&
#  153|   		irec->br_startblock != DELAYSTARTBLOCK &&
#  154|   		!isnullstartblock(irec->br_startblock);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def13]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c:6: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c: scope_hint: In function 'xmi_ensure_delta_nextents'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c:876:35: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/libxfs_priv.h:259:26: note: in definition of macro 'check_add_overflow'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/xfs_exchmaps.c:14: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/libxfs_priv.h:259:26: note: in definition of macro 'check_add_overflow'
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libxfs/libxfs_priv.h:259:26: note: in definition of macro 'check_add_overflow'
#  874|   	 * coded into the overflow check.
#  875|   	 */
#  876|-> 	if (check_add_overflow(ifp->if_nextents, (uint64_t)delta,
#  877|   				&new_nextents))
#  878|   		return -EFBIG;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def14]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c: scope_hint: In function ‘xfrog_scrubv_add_item’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:280:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
/usr/include/urcu/assert.h:36: included_from: Included from here.
/usr/include/urcu/debug.h:22: included_from: Included from here.
/usr/include/urcu/static/urcu-memb.h:37: included_from: Included from here.
/usr/include/urcu/urcu-memb.h:61: included_from: Included from here.
/usr/include/urcu/urcu.h:39: included_from: Included from here.
/usr/include/urcu.h:2: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/include/platform_defs.h:26: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/libfrog/paths.h:9: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:14: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:20: included_from: Included from here.
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:321:9: note: in expansion of macro ‘foreach_scrub_type’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c: scope_hint: In function ‘xfrog_scrubv_add_item’
#  278|   
#  279|   	v = xfrog_scrubv_next_vector(scrubv);
#  280|-> 	v->sv_type = scrub_type;
#  281|   	if (want_repair)
#  282|   		v->sv_flags |= XFS_SCRUB_IFLAG_REPAIR;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:296:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c: scope_hint: In function ‘scrub_call_kernel’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:321:9: note: in expansion of macro ‘foreach_scrub_type’
xfsprogs-6.11.0-build/xfsprogs-6.11.0/scrub/scrub.c:321:9: note: in expansion of macro ‘foreach_scrub_type’
#  294|   	v = xfrog_scrubv_next_vector(scrubv);
#  295|   
#  296|-> 	v->sv_type = XFS_SCRUB_TYPE_BARRIER;
#  297|   	v->sv_flags = XFS_SCRUB_OFLAG_CORRUPT | XFS_SCRUB_OFLAG_XFAIL |
#  298|   		      XFS_SCRUB_OFLAG_XCORRUPT | XFS_SCRUB_OFLAG_INCOMPLETE;

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
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-203.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namexfsprogs-6.9.0-1.fc41
diffbase-store-results-to/tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.tar.xz
diffbase-time-created2024-11-13 03:34:24
diffbase-time-finished2024-11-13 03:38:18
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmp04dxfguj/xfsprogs-6.9.0-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-203.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namexfsprogs-6.11.0-1.fc42
store-results-to/tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.tar.xz
time-created2024-11-13 03:38:30
time-finished2024-11-13 03:42:09
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpkp4tav67/xfsprogs-6.11.0-1.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9