Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] util-linux-2.42/disk-utils/mkfs.cramfs.c:858:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ util-linux-2.42/disk-utils/mkfs.cramfs.c:703:5: enter_function: entry to ‘main’ util-linux-2.42/disk-utils/mkfs.cramfs.c:800:12: branch_false: following ‘false’ branch... util-linux-2.42/disk-utils/mkfs.cramfs.c:804:23: branch_false: ...to here util-linux-2.42/disk-utils/mkfs.cramfs.c:810:12: branch_false: following ‘false’ branch... util-linux-2.42/disk-utils/mkfs.cramfs.c:812:14: branch_false: ...to here util-linux-2.42/disk-utils/mkfs.cramfs.c:813:12: branch_false: following ‘false’ branch... util-linux-2.42/disk-utils/mkfs.cramfs.c:816:13: branch_false: ...to here util-linux-2.42/disk-utils/mkfs.cramfs.c:816:12: branch_false: following ‘false’ branch... util-linux-2.42/disk-utils/mkfs.cramfs.c:819:22: branch_false: ...to here util-linux-2.42/disk-utils/mkfs.cramfs.c:819:22: call_function: calling ‘xcalloc’ from ‘main’ util-linux-2.42/disk-utils/mkfs.cramfs.c:819:22: return_function: returning to ‘main’ from ‘xcalloc’ util-linux-2.42/disk-utils/mkfs.cramfs.c:824:28: call_function: calling ‘parse_directory’ from ‘main’ util-linux-2.42/disk-utils/mkfs.cramfs.c:824:28: return_function: returning to ‘main’ from ‘parse_directory’ util-linux-2.42/disk-utils/mkfs.cramfs.c:827:9: call_function: calling ‘eliminate_doubles’ from ‘main’ util-linux-2.42/disk-utils/mkfs.cramfs.c:827:9: return_function: returning to ‘main’ from ‘eliminate_doubles’ util-linux-2.42/disk-utils/mkfs.cramfs.c:858:12: danger: ‘<unknown>’ leaks here; was allocated at [(30)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/29) # 856| -1, 0); # 857| # 858|-> if (MAP_FAILED == rom_image) # 859| err(MKFS_EX_ERROR, _("ROM image map")); # 860| Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] util-linux-2.42/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(1, 72)’ util-linux-2.42/sys-utils/zramctl.c:788:5: enter_function: entry to ‘main’ util-linux-2.42/sys-utils/zramctl.c:881:12: branch_false: following ‘false’ branch (when ‘find == 0’)... util-linux-2.42/sys-utils/zramctl.c:884:12: branch_false: ...to here util-linux-2.42/sys-utils/zramctl.c:887:13: branch_false: following ‘false’ branch... util-linux-2.42/sys-utils/zramctl.c:890:14: branch_false: ...to here util-linux-2.42/sys-utils/zramctl.c:890:13: branch_false: following ‘false’ branch... util-linux-2.42/sys-utils/zramctl.c:899:20: branch_true: following ‘true’ branch... util-linux-2.42/sys-utils/zramctl.c:900:25: branch_true: ...to here util-linux-2.42/sys-utils/zramctl.c:910:20: branch_false: following ‘false’ branch (when ‘outarg’ is NULL)... util-linux-2.42/sys-utils/zramctl.c:915:21: branch_false: ...to here util-linux-2.42/sys-utils/zramctl.c:915:20: branch_false: following ‘false’ branch... util-linux-2.42/sys-utils/zramctl.c:920:17: branch_false: ...to here util-linux-2.42/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): [#def3] util-linux-2.42/include/xalloc.h:68:13: warning[-Wanalyzer-malloc-leak]: leak of ‘xcalloc(n_args, 8)’ util-linux-2.42/login-utils/su-common.c:784:13: enter_function: entry to ‘run_shell’ util-linux-2.42/login-utils/su-common.c:790:29: call_function: calling ‘xcalloc’ from ‘run_shell’ util-linux-2.42/login-utils/su-common.c:790:29: return_function: returning to ‘run_shell’ from ‘xcalloc’ util-linux-2.42/login-utils/su-common.c:798:15: call_function: calling ‘xstrdup’ from ‘run_shell’ util-linux-2.42/login-utils/su-common.c:798:15: return_function: returning to ‘run_shell’ from ‘xstrdup’ util-linux-2.42/login-utils/su-common.c:800:12: branch_false: following ‘false’ branch... util-linux-2.42/login-utils/su-common.c:810:27: branch_false: ...to here util-linux-2.42/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): [#def4] util-linux-2.42/lib/pidutils.c:56:12: warning[-Wanalyzer-deref-before-check]: check of 'end' for NULL after already dereferencing it util-linux-2.42/lib/pidutils.c:34:12: branch_false: following 'false' branch... util-linux-2.42/lib/pidutils.c:41:12: branch_false: following 'false' branch... util-linux-2.42/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): [#def5] util-linux-2.42/libblkid/src/devname.c:80:33: warning[-Wanalyzer-malloc-leak]: leak of 'strdup(devname)' util-linux-2.42/libblkid/src/devname.c:611:5: enter_function: entry to 'blkid_probe_all_removable' util-linux-2.42/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): [#def6] util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'pam_service' util-linux-2.42/liblastlog2/src/lastlog2.c:515:1: enter_function: entry to 'll2_rename_user' util-linux-2.42/liblastlog2/src/lastlog2.c:526:12: branch_false: following 'false' branch... util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: branch_false: ...to here util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: call_function: calling 'read_entry' from 'll2_rename_user' util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: return_function: returning to 'll2_rename_user' from 'read_entry' util-linux-2.42/liblastlog2/src/lastlog2.c:530:12: branch_false: following 'false' branch... util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: branch_false: ...to here util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: danger: use of uninitialized value 'pam_service' here # 533| } # 534| # 535|-> retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error); # 536| if (retval != 0) { # 537| sqlite3_close(db); Error: GCC_ANALYZER_WARNING (CWE-457): [#def7] util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'rhost' util-linux-2.42/liblastlog2/src/lastlog2.c:515:1: enter_function: entry to 'll2_rename_user' util-linux-2.42/liblastlog2/src/lastlog2.c:526:12: branch_false: following 'false' branch... util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: branch_false: ...to here util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: call_function: calling 'read_entry' from 'll2_rename_user' util-linux-2.42/liblastlog2/src/lastlog2.c:529:18: return_function: returning to 'll2_rename_user' from 'read_entry' util-linux-2.42/liblastlog2/src/lastlog2.c:530:12: branch_false: following 'false' branch... util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: branch_false: ...to here util-linux-2.42/liblastlog2/src/lastlog2.c:535:18: danger: use of uninitialized value 'rhost' here # 533| } # 534| # 535|-> retval = write_entry(db, newname, ll_time, tty, rhost, pam_service, error); # 536| if (retval != 0) { # 537| sqlite3_close(db); Error: GCC_ANALYZER_WARNING (CWE-476): [#def8] util-linux-2.42/libmount/src/monitor.c:444:9: warning[-Wanalyzer-null-dereference]: dereference of NULL '0' util-linux-2.42/libmount/src/monitor.c:425:5: enter_function: entry to 'mnt_monitor_next_change' util-linux-2.42/libmount/src/monitor.c:432:12: branch_false: following 'false' branch... util-linux-2.42/libmount/src/monitor.c:435:9: release_memory: '*mn.last' is NULL util-linux-2.42/libmount/src/monitor.c:437:14: call_function: calling 'get_active' from 'mnt_monitor_next_change' util-linux-2.42/libmount/src/monitor.c:437:14: return_function: returning to 'mnt_monitor_next_change' from 'get_active' util-linux-2.42/libmount/src/monitor.c:437:9: release_memory: 'me' is NULL util-linux-2.42/libmount/src/monitor.c:438:12: branch_true: following 'true' branch... util-linux-2.42/libmount/src/monitor.c:439:22: branch_true: ...to here util-linux-2.42/libmount/src/monitor.c:439:22: call_function: calling 'read_epoll_events' from 'mnt_monitor_next_change' util-linux-2.42/libmount/src/monitor.c:439:22: return_function: returning to 'mnt_monitor_next_change' from 'read_epoll_events' util-linux-2.42/libmount/src/monitor.c:440:20: branch_false: following 'false' branch... util-linux-2.42/libmount/src/monitor.c:444:11: branch_false: ...to here util-linux-2.42/libmount/src/monitor.c:444:11: release_memory: 'me' is NULL util-linux-2.42/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): [#def9] util-linux-2.42/lsfd-cmd/lsfd.c:768:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘xcalloc(1, *error_class.size)’ util-linux-2.42/lsfd-cmd/lsfd.c:2071:13: enter_function: entry to ‘read_process’ util-linux-2.42/lsfd-cmd/lsfd.c:2080:16: call_function: calling ‘new_proc’ from ‘read_process’ util-linux-2.42/lsfd-cmd/lsfd.c:2080:16: return_function: returning to ‘read_process’ from ‘new_proc’ util-linux-2.42/lsfd-cmd/lsfd.c:2082:25: call_function: calling ‘xstrdup’ from ‘read_process’ util-linux-2.42/lsfd-cmd/lsfd.c:2082:25: return_function: returning to ‘read_process’ from ‘xstrdup’ util-linux-2.42/lsfd-cmd/lsfd.c:2085:12: branch_false: following ‘false’ branch... util-linux-2.42/lsfd-cmd/lsfd.c:2103:13: branch_false: ...to here util-linux-2.42/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): [#def10] util-linux-2.42/misc-utils/copyfilerange.c:223:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘range_files’ util-linux-2.42/misc-utils/copyfilerange.c:197:5: enter_function: entry to ‘main’ util-linux-2.42/misc-utils/copyfilerange.c:218:16: branch_true: following ‘true’ branch (when ‘c != -1’)... util-linux-2.42/misc-utils/copyfilerange.c:219:17: branch_true: ...to here util-linux-2.42/misc-utils/copyfilerange.c:221:28: branch_true: following ‘true’ branch (when ‘range_files’ is NULL)... util-linux-2.42/misc-utils/copyfilerange.c:222:47: branch_true: ...to here util-linux-2.42/misc-utils/copyfilerange.c:222:47: call_function: calling ‘xmalloc’ from ‘main’ util-linux-2.42/misc-utils/copyfilerange.c:222:47: return_function: returning to ‘main’ from ‘xmalloc’ util-linux-2.42/misc-utils/copyfilerange.c:223:55: call_function: calling ‘xstrdup’ from ‘main’ util-linux-2.42/misc-utils/copyfilerange.c:223:55: return_function: returning to ‘main’ from ‘xstrdup’ util-linux-2.42/misc-utils/copyfilerange.c:223: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) # 221| if (!range_files) # 222| range_files = xmalloc(sizeof(char *) * argc); # 223|-> range_files[nrange_files++] = xstrdup(optarg); # 224| break; # 225| case 'v': Error: CPPCHECK_WARNING (CWE-476): [#def11] util-linux-2.42/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): [#def12] util-linux-2.42/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): [#def13] util-linux-2.42/sys-utils/swapoff.c:89:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘path’ util-linux-2.42/sys-utils/swapoff.c:240:5: enter_function: entry to ‘main’ util-linux-2.42/sys-utils/swapoff.c:295:21: branch_true: following ‘true’ branch... util-linux-2.42/sys-utils/swapoff.c:296:27: branch_true: ...to here util-linux-2.42/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): [#def14] util-linux-2.42/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): [#def15] util-linux-2.42/sys-utils/swapoff.c:95:1: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘<return-value>’ util-linux-2.42/sys-utils/swapoff.c:240:5: enter_function: entry to ‘main’ util-linux-2.42/sys-utils/swapoff.c:295:21: branch_true: following ‘true’ branch... util-linux-2.42/sys-utils/swapoff.c:296:27: branch_true: ...to here util-linux-2.42/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): [#def16] util-linux-2.42/term-utils/agetty.c:2743:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected util-linux-2.42/term-utils/agetty.c:1776:12: enter_function: entry to ‘issuefile_read_stream’ util-linux-2.42/term-utils/agetty.c:1786:12: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1787:22: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1790:30: acquire_memory: this call could return NULL util-linux-2.42/term-utils/agetty.c:1793:16: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1794:20: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1794:20: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1795:49: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1795:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’ # 2741| if (first) # 2742| { # 2743|-> fprintf(ie->output, "%s: ", ifaceq->ifname); # 2744| first = false; # 2745| } Error: GCC_ANALYZER_WARNING (CWE-688): [#def17] util-linux-2.42/term-utils/agetty.c:2755:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*ie.output’ where non-null expected util-linux-2.42/term-utils/agetty.c:1776:12: enter_function: entry to ‘issuefile_read_stream’ util-linux-2.42/term-utils/agetty.c:1786:12: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1787:22: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1790:30: acquire_memory: this call could return NULL util-linux-2.42/term-utils/agetty.c:1793:16: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1794:20: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1794:20: branch_true: following ‘true’ branch... util-linux-2.42/term-utils/agetty.c:1795:49: branch_true: ...to here util-linux-2.42/term-utils/agetty.c:1795:25: call_function: calling ‘output_special_char’ from ‘issuefile_read_stream’ # 2753| if (first) # 2754| { # 2755|-> fprintf(ie->output, "%s: ", ifaceq->ifname); # 2756| first = false; # 2757| }
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.0.1 |
| analyzer-version-gcc-analyzer | 16.0.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.95.0 |
| diffbase-analyzer-version-cppcheck | 2.20.0 |
| diffbase-analyzer-version-gcc | 16.0.1 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.1 |
| 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-87.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.20260420.180315.gd39a405.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | util-linux-2.41.3-12.fc44 |
| diffbase-store-results-to | /tmp/tmpjzib6qkn/util-linux-2.41.3-12.fc44.tar.xz |
| diffbase-time-created | 2026-04-28 20:09:32 |
| diffbase-time-finished | 2026-04-28 20:16:31 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpjzib6qkn/util-linux-2.41.3-12.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpjzib6qkn/util-linux-2.41.3-12.fc44.src.rpm' |
| diffbase-tool-version | csmock-3.8.5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-87.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.20260420.180315.gd39a405.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | util-linux-2.42-7.fc45 |
| store-results-to | /tmp/tmph6otnje_/util-linux-2.42-7.fc45.tar.xz |
| time-created | 2026-04-28 20:17:03 |
| time-finished | 2026-04-28 20:23:09 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'cppcheck,shellcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmph6otnje_/util-linux-2.42-7.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmph6otnje_/util-linux-2.42-7.fc45.src.rpm' |
| tool-version | csmock-3.8.5-1.el9 |