Task #119510 - added.err
back to task #119510download
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:861:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:703:5: enter_function: entry to ‘main’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:795:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:799:23: branch_false: ...to here
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:813:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:815:14: branch_false: ...to here
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:816:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:819:13: branch_false: ...to here
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:819:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:822:22: branch_false: ...to here
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:822:22: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:822:22: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:827:28: call_function: calling ‘parse_directory’ from ‘main’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:827:28: return_function: returning to ‘main’ from ‘parse_directory’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:830:9: call_function: calling ‘eliminate_doubles’ from ‘main’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:830:9: return_function: returning to ‘main’ from ‘eliminate_doubles’
util-linux-2.42.1/disk-utils/mkfs.cramfs.c:861:12: danger: ‘<unknown>’ leaks here; was allocated at [(30)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/29)
# 859| -1, 0);
# 860|
# 861|-> if (MAP_FAILED == rom_image)
# 862| err(MKFS_EX_ERROR, _("ROM image map"));
# 863|
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.1/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 72)’
util-linux-2.42.1/sys-utils/zramctl.c:788:5: enter_function: entry to ‘main’
util-linux-2.42.1/sys-utils/zramctl.c:881:12: branch_false: following ‘false’ branch (when ‘find == 0’)...
util-linux-2.42.1/sys-utils/zramctl.c:884:12: branch_false: ...to here
util-linux-2.42.1/sys-utils/zramctl.c:887:13: branch_false: following ‘false’ branch...
util-linux-2.42.1/sys-utils/zramctl.c:890:14: branch_false: ...to here
util-linux-2.42.1/sys-utils/zramctl.c:890:13: branch_false: following ‘false’ branch...
util-linux-2.42.1/sys-utils/zramctl.c:899:20: branch_true: following ‘true’ branch...
util-linux-2.42.1/sys-utils/zramctl.c:900:25: branch_true: ...to here
util-linux-2.42.1/sys-utils/zramctl.c:910:20: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)...
util-linux-2.42.1/sys-utils/zramctl.c:915:21: branch_false: ...to here
util-linux-2.42.1/sys-utils/zramctl.c:915:20: branch_false: following ‘false’ branch...
util-linux-2.42.1/sys-utils/zramctl.c:920:17: branch_false: ...to here
util-linux-2.42.1/sys-utils/zramctl.c:920:17: call_function: calling ‘status’ from ‘main’
# 66| void *ret = calloc(nelems, size);
# 67|
# 68|-> if (!ret && size && nelems)
# 69| err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
# 70| return ret;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.1/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(n_args, 8)’
util-linux-2.42.1/login-utils/su-common.c:793:13: enter_function: entry to ‘run_shell’
util-linux-2.42.1/login-utils/su-common.c:799:29: call_function: calling ‘xcalloc’ from ‘run_shell’
util-linux-2.42.1/login-utils/su-common.c:799:29: return_function: returning to ‘run_shell’ from ‘xcalloc’
util-linux-2.42.1/login-utils/su-common.c:807:15: call_function: calling ‘xstrdup’ from ‘run_shell’
util-linux-2.42.1/login-utils/su-common.c:807:15: return_function: returning to ‘run_shell’ from ‘xstrdup’
util-linux-2.42.1/login-utils/su-common.c:809:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/login-utils/su-common.c:819:27: branch_false: ...to here
util-linux-2.42.1/include/xalloc.h:68:13: danger: ‘xcalloc(n_args, 8)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
# 66| void *ret = calloc(nelems, size);
# 67|
# 68|-> if (!ret && size && nelems)
# 69| err(XALLOC_EXIT_CODE, "cannot allocate %zu bytes", size);
# 70| return ret;
Error: GCC_ANALYZER_WARNING (CWE-465):
util-linux-2.42.1/lib/pidutils.c:56:12: warning[-Wanalyzer-deref-before-check]: check of 'end' for NULL after already dereferencing it
util-linux-2.42.1/lib/pidutils.c:34:12: branch_false: following 'false' branch...
util-linux-2.42.1/lib/pidutils.c:41:12: branch_false: following 'false' branch...
util-linux-2.42.1/lib/pidutils.c:56:12: danger: pointer 'end' is checked for NULL here but it was already dereferenced at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 54| }
# 55|
# 56|-> if (end && *end != '\0')
# 57| return -(errno = EINVAL);
# 58| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
util-linux-2.42.1/libblkid/src/devname.c:80:33: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(devname)'
util-linux-2.42.1/libblkid/src/devname.c:611:5: enter_function: entry to 'blkid_probe_all_removable'
util-linux-2.42.1/libblkid/src/devname.c:616:15: call_function: calling 'sysfs_probe_all' from 'blkid_probe_all_removable'
# 78| /* update name returned by blkid_dev_devname() */
# 79| free(dev->bid_xname);
# 80|-> dev->bid_xname = strdup(devname);
# 81| break;
# 82| }
Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:546:1: enter_function: entry to 'll2_rename_user'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:557:12: branch_false: following 'false' branch...
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: branch_false: ...to here
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:561:12: branch_false: following 'false' branch...
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: branch_false: ...to here
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: danger: use of uninitialized value 'pam_service' here
# 564| }
# 565|
# 566|-> retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error);
# 567| if (retval != 0) {
# 568| sqlite3_close(db);
Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:546:1: enter_function: entry to 'll2_rename_user'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:557:12: branch_false: following 'false' branch...
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: branch_false: ...to here
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: call_function: calling 'read_entry' from 'll2_rename_user'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:560:18: return_function: returning to 'll2_rename_user' from 'read_entry'
util-linux-2.42.1/liblastlog2/src/lastlog2.c:561:12: branch_false: following 'false' branch...
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: branch_false: ...to here
util-linux-2.42.1/liblastlog2/src/lastlog2.c:566:18: danger: use of uninitialized value 'rhost' here
# 564| }
# 565|
# 566|-> retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error);
# 567| if (retval != 0) {
# 568| sqlite3_close(db);
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.1/libmount/src/monitor.c:444:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0'
util-linux-2.42.1/libmount/src/monitor.c:425:5: enter_function: entry to 'mnt_monitor_next_change'
util-linux-2.42.1/libmount/src/monitor.c:432:12: branch_false: following 'false' branch...
util-linux-2.42.1/libmount/src/monitor.c:435:9: release_memory: '*mn.last' is NULL
util-linux-2.42.1/libmount/src/monitor.c:437:14: call_function: calling 'get_active' from 'mnt_monitor_next_change'
util-linux-2.42.1/libmount/src/monitor.c:437:14: return_function: returning to 'mnt_monitor_next_change' from 'get_active'
util-linux-2.42.1/libmount/src/monitor.c:437:9: release_memory: 'me' is NULL
util-linux-2.42.1/libmount/src/monitor.c:438:12: branch_true: following 'true' branch...
util-linux-2.42.1/libmount/src/monitor.c:439:22: branch_true: ...to here
util-linux-2.42.1/libmount/src/monitor.c:439:22: call_function: calling 'read_epoll_events' from 'mnt_monitor_next_change'
util-linux-2.42.1/libmount/src/monitor.c:439:22: return_function: returning to 'mnt_monitor_next_change' from 'read_epoll_events'
util-linux-2.42.1/libmount/src/monitor.c:440:20: branch_false: following 'false' branch...
util-linux-2.42.1/libmount/src/monitor.c:444:11: branch_false: ...to here
util-linux-2.42.1/libmount/src/monitor.c:444:11: release_memory: 'me' is NULL
util-linux-2.42.1/libmount/src/monitor.c:444:9: danger: dereference of NULL 'me'
# 442| }
# 443|
# 444|-> me->active = 0;
# 445| mn->last = me;
# 446|
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.1/lsfd-cmd/lsfd.c:768:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *error_class.size)’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2071:13: enter_function: entry to ‘read_process’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2080:16: call_function: calling ‘new_proc’ from ‘read_process’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2080:16: return_function: returning to ‘read_process’ from ‘new_proc’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2082:25: call_function: calling ‘xstrdup’ from ‘read_process’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2082:25: return_function: returning to ‘read_process’ from ‘xstrdup’
util-linux-2.42.1/lsfd-cmd/lsfd.c:2085:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/lsfd-cmd/lsfd.c:2103:13: branch_false: ...to here
util-linux-2.42.1/lsfd-cmd/lsfd.c:2109:9: call_function: calling ‘collect_execve_file’ from ‘read_process’
# 766|
# 767| file = xcalloc(1, error_class->size);
# 768|-> file->class = error_class;
# 769|
# 770| file->proc = proc;
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.1/misc-utils/blkid.c:882:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8)’
util-linux-2.42.1/misc-utils/blkid.c:682:5: enter_function: entry to ‘main’
util-linux-2.42.1/misc-utils/blkid.c:855:12: branch_false: following ‘false’ branch...
util-linux-2.42.1/misc-utils/blkid.c:859:12: branch_true: following ‘true’ branch...
util-linux-2.42.1/misc-utils/blkid.c:860:35: branch_true: ...to here
util-linux-2.42.1/misc-utils/blkid.c:860:27: call_function: calling ‘xcalloc’ from ‘main’
util-linux-2.42.1/misc-utils/blkid.c:860:27: return_function: returning to ‘main’ from ‘xcalloc’
util-linux-2.42.1/misc-utils/blkid.c:861:24: branch_true: following ‘true’ branch...
util-linux-2.42.1/misc-utils/blkid.c:862:42: branch_true: ...to here
util-linux-2.42.1/misc-utils/blkid.c:865:28: branch_false: following ‘false’ branch...
util-linux-2.42.1/misc-utils/blkid.c:867:34: branch_false: ...to here
util-linux-2.42.1/misc-utils/blkid.c:882:25: danger: dereference of NULL ‘xcalloc((long unsigned int)(argc - optind), 8) + (long unsigned int)numdev * 8’
# 880| continue;
# 881|
# 882|-> devices[numdev++] = dev;
# 883| }
# 884|
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.1/misc-utils/cal.c:1099:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘xcalloc((long unsigned int)*ctl.months_in_row, 208) + (sizetype)i * 208’
util-linux-2.42.1/misc-utils/cal.c:1130:13: enter_function: entry to ‘yearly’
util-linux-2.42.1/misc-utils/cal.c:1144:9: call_function: calling ‘monthly’ from ‘yearly’
# 1097|
# 1098| for (i = 0; i < ctl->months_in_row - 1; i++)
# 1099|-> ms[i].next = &ms[i + 1];
# 1100|
# 1101| rows = (ctl->num_months - 1) / ctl->months_in_row;
Error: GCC_ANALYZER_WARNING (CWE-476):
util-linux-2.42.1/misc-utils/copyfilerange.c:224:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘range_files’
util-linux-2.42.1/misc-utils/copyfilerange.c:198:5: enter_function: entry to ‘main’
util-linux-2.42.1/misc-utils/copyfilerange.c:219:16: branch_true: following ‘true’ branch (when ‘c != -1’)...
util-linux-2.42.1/misc-utils/copyfilerange.c:220:17: branch_true: ...to here
util-linux-2.42.1/misc-utils/copyfilerange.c:222:28: branch_true: following ‘true’ branch (when ‘range_files’ is NULL)...
util-linux-2.42.1/misc-utils/copyfilerange.c:223:47: branch_true: ...to here
util-linux-2.42.1/misc-utils/copyfilerange.c:223:47: call_function: calling ‘xmalloc’ from ‘main’
util-linux-2.42.1/misc-utils/copyfilerange.c:223:47: return_function: returning to ‘main’ from ‘xmalloc’
util-linux-2.42.1/misc-utils/copyfilerange.c:224:55: call_function: calling ‘xstrdup’ from ‘main’
util-linux-2.42.1/misc-utils/copyfilerange.c:224:55: return_function: returning to ‘main’ from ‘xstrdup’
util-linux-2.42.1/misc-utils/copyfilerange.c:224:25: danger: ‘range_files + nrange_files * 8’ could be NULL: unchecked value from [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
# 222| if (!range_files)
# 223| range_files = xmalloc(sizeof(char *) * argc);
# 224|-> range_files[nrange_files++] = xstrdup(optarg);
# 225| break;
# 226| case 'v':
Error: CPPCHECK_WARNING (CWE-476):
util-linux-2.42.1/sys-utils/lscpu-arm.c:562: warning[nullPointer]: Possible null pointer dereference: parts
# 560| tb = arm_mktable(cxt, "arm-models");
# 561|
# 562|-> for (i = 0; parts[i].id != -1; i++) {
# 563| struct libscols_line *ln;
# 564| ln = scols_table_new_line(tb, NULL);
Error: CPPCHECK_WARNING (CWE-476):
util-linux-2.42.1/sys-utils/lscpu-arm.c:592: warning[nullPointer]: Possible null pointer dereference: parts
# 590| errx(EXIT_FAILURE, _("implementer not found"));
# 591|
# 592|-> for (i = 0; parts[i].id != -1; i++) {
# 593| if (parts[i].id == model) {
# 594| printf("%s\n", parts[i].name);
Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.42.1/sys-utils/swapoff.c:89:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘path’
util-linux-2.42.1/sys-utils/swapoff.c:240:5: enter_function: entry to ‘main’
util-linux-2.42.1/sys-utils/swapoff.c:295:21: branch_true: following ‘true’ branch...
util-linux-2.42.1/sys-utils/swapoff.c:296:27: branch_true: ...to here
util-linux-2.42.1/sys-utils/swapoff.c:296:27: call_function: calling ‘swapoff_by’ from ‘main’
# 87|
# 88| blkid_free_probe(pr);
# 89|-> if (path)
# 90| break;
# 91| }
Error: CPPCHECK_WARNING (CWE-457):
util-linux-2.42.1/sys-utils/swapoff.c:94: warning[uninitvar]: Uninitialized variable: path
# 92|
# 93| mnt_free_iter(itr);
# 94|-> return path;
# 95| }
# 96|
Error: GCC_ANALYZER_WARNING (CWE-457):
util-linux-2.42.1/sys-utils/swapoff.c:95:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<return-value>’
util-linux-2.42.1/sys-utils/swapoff.c:240:5: enter_function: entry to ‘main’
util-linux-2.42.1/sys-utils/swapoff.c:295:21: branch_true: following ‘true’ branch...
util-linux-2.42.1/sys-utils/swapoff.c:296:27: branch_true: ...to here
util-linux-2.42.1/sys-utils/swapoff.c:296:27: call_function: calling ‘swapoff_by’ from ‘main’
# 93| mnt_free_iter(itr);
# 94| return path;
# 95|-> }
# 96|
# 97| static int do_swapoff(const char *orig_special, int quiet, int canonic)
Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.1/term-utils/agetty.c:2748:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.42.1/term-utils/agetty.c:1781:12: enter_function: entry to ‘issuefile_read_stream’
util-linux-2.42.1/term-utils/agetty.c:1791:12: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1792:22: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1795:30: acquire_memory: this call could return NULL
util-linux-2.42.1/term-utils/agetty.c:1798:16: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1799:20: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1799:20: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1800:49: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1800:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’
# 2746| if (first)
# 2747| {
# 2748|-> fprintf(ie->output, "%s: ", ifaceq->ifname);
# 2749| first = false;
# 2750| }
Error: GCC_ANALYZER_WARNING (CWE-688):
util-linux-2.42.1/term-utils/agetty.c:2760:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected
util-linux-2.42.1/term-utils/agetty.c:1781:12: enter_function: entry to ‘issuefile_read_stream’
util-linux-2.42.1/term-utils/agetty.c:1791:12: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1792:22: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1795:30: acquire_memory: this call could return NULL
util-linux-2.42.1/term-utils/agetty.c:1798:16: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1799:20: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1799:20: branch_true: following ‘true’ branch...
util-linux-2.42.1/term-utils/agetty.c:1800:49: branch_true: ...to here
util-linux-2.42.1/term-utils/agetty.c:1800:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’
# 2758| if (first)
# 2759| {
# 2760|-> fprintf(ie->output, "%s: ", ifaceq->ifname);
# 2761| first = false;
# 2762| }