Error: SHELLCHECK_WARNING (CWE-477): [#def1] /usr/lib/udev/kpartx_id:28:18: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. # 26| UUID=$3 # 27| # 28|-> if [ -z "$MAJOR" -o -z "$MINOR" ]; then # 29| echo "usage: $0 major minor UUID" # 30| exit 1; Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] multipath-tools-0.11.1/kpartx/kpartx.c:417:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’ multipath-tools-0.11.1/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’ multipath-tools-0.11.1/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’ multipath-tools-0.11.1/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’ multipath-tools-0.11.1/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)... multipath-tools-0.11.1/kpartx/kpartx.c:272:19: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)... multipath-tools-0.11.1/kpartx/kpartx.c:334:30: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:349:13: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:349:12: branch_true: following ‘true’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:352:21: branch_true: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:352:20: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:357:27: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:359:20: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:362:20: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:363:28: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:369:17: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:371:20: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:682:1: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:384:58: branch_true: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:386:32: branch_true: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:398:12: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)... multipath-tools-0.11.1/kpartx/kpartx.c:401:12: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:401:12: branch_true: following ‘true’ branch (when ‘delim’ is NULL)... multipath-tools-0.11.1/kpartx/kpartx.c:402:25: branch_true: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:402:25: call_function: calling ‘xmalloc’ from ‘main’ multipath-tools-0.11.1/kpartx/kpartx.c:402:25: return_function: returning to ‘main’ from ‘xmalloc’ multipath-tools-0.11.1/kpartx/kpartx.c:407:14: acquire_resource: opened here multipath-tools-0.11.1/kpartx/kpartx.c:409:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/kpartx/kpartx.c:417:12: branch_false: ...to here multipath-tools-0.11.1/kpartx/kpartx.c:417:12: danger: ‘open(device, 16384)’ leaks here; was opened at [(83)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/82) # 415| int r = 0; # 416| # 417|-> if (what == DELETE) { # 418| r = dm_remove_partmaps(mapname, uuid, buf.st_rdev, # 419| verbose); Error: GCC_ANALYZER_WARNING (CWE-122): [#def3] multipath-tools-0.11.1/libmpathutil/vector.c:128:28: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow multipath-tools-0.11.1/libmpathutil/vector.c:137:1: enter_function: entry to ‘vector_repack’ multipath-tools-0.11.1/libmpathutil/vector.c:141:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_false: following ‘false’ branch (when ‘i <= 0’)... multipath-tools-0.11.1/libmpathutil/vector.c:144:41: branch_false: ...to here multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:146:25: call_function: calling ‘vector_del_slot’ from ‘vector_repack’ multipath-tools-0.11.1/libmpathutil/vector.c:146:25: return_function: returning to ‘vector_repack’ from ‘vector_del_slot’ multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmpathutil/vector.c:146:25: call_function: calling ‘vector_del_slot’ from ‘vector_repack’ # 126| void *new_slot; # 127| # 128|-> new_slot = realloc(v->slot, sizeof (void *) * v->allocated); # 129| if (!new_slot) # 130| v->allocated += VECTOR_DEFAULT_SIZE; Error: GCC_ANALYZER_WARNING (CWE-457): [#def4] multipath-tools-0.11.1/libmultipath/configure.c:431:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bf’ multipath-tools-0.11.1/libmultipath/configure.c:443:12: branch_false: following ‘false’ branch (when ‘mpp’ is non-NULL)... multipath-tools-0.11.1/libmultipath/configure.c:446:13: branch_false: ...to here multipath-tools-0.11.1/libmultipath/configure.c:446:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/libmultipath/configure.c:449:14: branch_false: ...to here multipath-tools-0.11.1/libmultipath/configure.c:449:14: throw: if ‘alloc_bitfield’ throws an exception... multipath-tools-0.11.1/libmultipath/configure.c:441:26: call_function: inlined call to ‘cleanup_bitfield’ from ‘pgcmp’ # 429| static void cleanup_bitfield(struct bitfield **p) # 430| { # 431|-> free(*p); # 432| } # 433| Error: CPPCHECK_WARNING (CWE-758): [#def5] multipath-tools-0.11.1/libmultipath/nvme-ioctl.c:572: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 570| bool save, __u32 data_len, void *data, __u32 *result) # 571| { # 572|-> __u32 cdw10 = fid | (save ? 1 << 31 : 0); # 573| # 574| return nvme_feature(fd, nvme_admin_set_features, nsid, cdw10, value, Error: GCC_ANALYZER_WARNING (CWE-688): [#def6] multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:106:39: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir(&fullpath)’ where non-null expected multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:82:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)... multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:87:13: branch_false: ...to here multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:87:12: branch_true: following ‘true’ branch... multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:93:13: branch_true: ...to here multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:93:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:102:14: branch_false: ...to here multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:103:17: acquire_memory: this call could return NULL multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:106:39: danger: argument 1 (‘opendir(&fullpath)’) from [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected # 104| # 105| // loop to find device in /dev/disk/by-path # 106|-> while( NULL != (dir_entry_p = readdir(dir_p))) { # 107| if (dir_entry_p->d_name[0] != '.') { # 108| char path[BUFFERSIZE] = "/dev/disk/by-path/"; Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] multipath-tools-0.11.1/multipathd/main.c:4200:9: warning[-Wanalyzer-malloc-leak]: leak of ‘param’ multipath-tools-0.11.1/multipathd/main.c:4149:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4154:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4156:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4162:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4165:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4170:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4174:21: branch_true: following ‘true’ branch... multipath-tools-0.11.1/multipathd/main.c:4176:17: branch_true: ...to here multipath-tools-0.11.1/multipathd/main.c:4192:50: acquire_memory: allocated here multipath-tools-0.11.1/multipathd/main.c:4193:12: branch_false: following ‘false’ branch (when ‘param’ is non-NULL)... multipath-tools-0.11.1/multipathd/main.c:4196:27: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4200:9: branch_true: following ‘true’ branch... multipath-tools-0.11.1/multipathd/main.c:4200:9: branch_true: ...to here multipath-tools-0.11.1/multipathd/main.c:4200:9: throw: if ‘dlog’ throws an exception... multipath-tools-0.11.1/multipathd/main.c:4200:9: danger: ‘param’ leaks here; was allocated at [(9)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/8) # 4198| param->num_transportid = 0; # 4199| # 4200|-> condlog(3, "device %s:%s", pp->dev, pp->mpp->wwid); # 4201| # 4202| ret = prout_do_scsi_ioctl(pp->dev, MPATH_PROUT_REG_IGN_SA, 0, 0, param, 0); Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] multipath-tools-0.11.1/multipathd/main.c:4202:15: warning[-Wanalyzer-malloc-leak]: leak of ‘param’ multipath-tools-0.11.1/multipathd/main.c:4149:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4154:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4156:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4162:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4165:12: branch_false: following ‘false’ branch... multipath-tools-0.11.1/multipathd/main.c:4170:9: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4174:21: branch_true: following ‘true’ branch... multipath-tools-0.11.1/multipathd/main.c:4176:17: branch_true: ...to here multipath-tools-0.11.1/multipathd/main.c:4192:50: acquire_memory: allocated here multipath-tools-0.11.1/multipathd/main.c:4193:12: branch_false: following ‘false’ branch (when ‘param’ is non-NULL)... multipath-tools-0.11.1/multipathd/main.c:4196:27: branch_false: ...to here multipath-tools-0.11.1/multipathd/main.c:4202:15: throw: if ‘prout_do_scsi_ioctl’ throws an exception... multipath-tools-0.11.1/multipathd/main.c:4202:15: danger: ‘param’ leaks here; was allocated at [(9)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/8) # 4200| condlog(3, "device %s:%s", pp->dev, pp->mpp->wwid); # 4201| # 4202|-> ret = prout_do_scsi_ioctl(pp->dev, MPATH_PROUT_REG_IGN_SA, 0, 0, param, 0); # 4203| if (ret != MPATH_PR_SUCCESS ) # 4204| {
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-83.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | device-mapper-multipath-0.13.0-1.fc44 |
| diffbase-store-results-to | /tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.tar.xz |
| diffbase-time-created | 2026-01-08 15:54:35 |
| diffbase-time-finished | 2026-01-08 15:56:13 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpn6xz970i/device-mapper-multipath-0.13.0-1.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-83.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | device-mapper-multipath-0.11.1-2.fc43 |
| store-results-to | /tmp/tmp0dtjy9sa/device-mapper-multipath-0.11.1-2.fc43.tar.xz |
| time-created | 2026-01-08 15:52:11 |
| time-finished | 2026-01-08 15:54:15 |
| title | Fixed findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp0dtjy9sa/device-mapper-multipath-0.11.1-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp0dtjy9sa/device-mapper-multipath-0.11.1-2.fc43.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |