Task #90360 - fixed.err
back to task #90360download
Error: SHELLCHECK_WARNING (CWE-477):
/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):
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):
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):
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):
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):
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):
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):
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| {