Task #112815 - added.err
back to task #112815download
Error: GCC_ANALYZER_WARNING (CWE-401):
systemd-260.1/src/basic/alloc-util.h:79:9: warning[-Wanalyzer-malloc-leak]: leak of ‘options’
systemd-260.1/src/gpt-auto-generator/gpt-auto-generator.c:1333:1: enter_function: entry to ‘main’
systemd-260.1/src/gpt-auto-generator/gpt-auto-generator.c:1333:1: call_function: calling ‘run’ from ‘main’
# 77|
# 78| static inline void freep(void *p) {
# 79|-> *(void**)p = mfree(*(void**) p);
# 80| }
# 81|
Error: COMPILER_WARNING:
systemd-260.1/src/basic/cgroup-util.c:78:44: error[error]: ‘FILEID_KERNFS’ undeclared (first use in this function)
# 76| } fh = {
# 77| .file_handle.handle_bytes = sizeof(uint64_t),
# 78|-> .file_handle.handle_type = FILEID_KERNFS,
# 79| };
# 80|
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/basic/chase.c:1343:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pfd’
systemd-260.1/src/basic/chase.c:1334:5: enter_function: entry to ‘chase_and_open_parent_at’
systemd-260.1/src/basic/chase.c:1337:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/chase.c:1339:35: branch_false: ...to here
systemd-260.1/src/basic/chase.c:1339:13: call_function: calling ‘chaseat’ from ‘chase_and_open_parent_at’
systemd-260.1/src/basic/chase.c:1339:13: return_function: returning to ‘chase_and_open_parent_at’ from ‘chaseat’
systemd-260.1/src/basic/chase.c:1340:12: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/chase.c:1343:16: branch_false: ...to here
systemd-260.1/src/basic/chase.c:1343:16: danger: use of uninitialized value ‘pfd’ here
# 1341| return r;
# 1342|
# 1343|-> return pfd;
# 1344| }
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/basic/mountpoint-util.c:199:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h’
systemd-260.1/src/basic/mountpoint-util.c:188:5: enter_function: entry to ‘name_to_handle_at_u64’
systemd-260.1/src/basic/mountpoint-util.c:189:44: release_memory: ‘h’ is NULL
systemd-260.1/src/basic/mountpoint-util.c:192:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/mountpoint-util.c:196:13: branch_false: ...to here
systemd-260.1/src/basic/mountpoint-util.c:196:13: call_function: calling ‘name_to_handle_at_loop’ from ‘name_to_handle_at_u64’
systemd-260.1/src/basic/mountpoint-util.c:196:13: return_function: returning to ‘name_to_handle_at_u64’ from ‘name_to_handle_at_loop’
systemd-260.1/src/basic/mountpoint-util.c:197:12: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/mountpoint-util.c:199:14: branch_false: ...to here
systemd-260.1/src/basic/mountpoint-util.c:199:14: release_memory: ‘h’ is NULL
systemd-260.1/src/basic/mountpoint-util.c:199:13: danger: dereference of NULL ‘h’
# 197| if (r < 0)
# 198| return r;
# 199|-> if (h->handle_bytes < sizeof(uint64_t))
# 200| return -EBADMSG;
# 201|
Error: GCC_ANALYZER_WARNING (CWE-688):
systemd-260.1/src/basic/os-util.c:412:23: warning[-Wanalyzer-null-argument]: use of NULL ‘root’ where non-null expected
systemd-260.1/src/basic/os-util.c:465:5: enter_function: entry to ‘os_release_support_ended’
systemd-260.1/src/basic/os-util.c:469:12: branch_true: following ‘true’ branch (when ‘support_end’ is NULL)...
systemd-260.1/src/basic/os-util.c:473:21: branch_true: ...to here
systemd-260.1/src/basic/os-util.c:473:21: call_function: calling ‘parse_extension_release_sentinel’ from ‘os_release_support_ended’
# 410|
# 411| if (!empty_or_root(root)) {
# 412|-> rfd = open(root, O_CLOEXEC | O_DIRECTORY | O_PATH);
# 413| if (rfd < 0)
# 414| return -errno;
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/basic/stat-util.c:536:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘_mntidb’
systemd-260.1/src/basic/stat-util.c:458:5: enter_function: entry to ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:462:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:463:9: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:463:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:464:9: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:464:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:467:14: call_function: inlined call to ‘isempty’ from ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:467:13: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:471:13: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:475:12: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:481:22: call_function: inlined call to ‘isempty’ from ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:513:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:519:20: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:519:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:522:21: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:522:21: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:522:21: branch_true: ...to here
systemd-260.1/src/basic/stat-util.c:529:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:535:20: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:535:20: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:536:25: branch_true: ...to here
systemd-260.1/src/basic/stat-util.c:536:25: danger: use of uninitialized value ‘_mntidb’ here
# 534| }
# 535| if (r == 0)
# 536|-> mntidb = _mntidb;
# 537|
# 538| /* Now compare the two file handles */
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/basic/stat-util.c:544:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mntidb’
systemd-260.1/src/basic/stat-util.c:458:5: enter_function: entry to ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:462:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:463:9: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:463:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:464:9: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:464:9: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:467:14: call_function: inlined call to ‘isempty’ from ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:467:13: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:471:13: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:475:12: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:481:22: call_function: inlined call to ‘isempty’ from ‘inode_same_at’
systemd-260.1/src/basic/stat-util.c:513:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:519:20: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:519:20: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:520:25: branch_true: ...to here
systemd-260.1/src/basic/stat-util.c:522:21: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:522:21: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:529:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:535:20: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:535:20: branch_false: following ‘false’ branch...
systemd-260.1/src/basic/stat-util.c:539:22: branch_false: ...to here
systemd-260.1/src/basic/stat-util.c:539:20: branch_true: following ‘true’ branch...
systemd-260.1/src/basic/stat-util.c:544:21: branch_true: ...to here
systemd-260.1/src/basic/stat-util.c:544:21: danger: use of uninitialized value ‘mntidb’ here
# 542| /* If the file handles are the same and they come from the same mount ID? Great, then we are
# 543| * good, they are definitely the same */
# 544|-> if (mntida == mntidb)
# 545| return true;
# 546|
Error: CPPCHECK_WARNING (CWE-401):
systemd-260.1/src/bootctl/bootctl-install.c:1111: error[memleak]: Memory leak: siglist
# 1109| r = efi_timestamp(×tamp);
# 1110| if (r < 0)
# 1111|-> return r;
# 1112|
# 1113| uint32_t attrs =
Error: GCC_ANALYZER_WARNING (CWE-401):
systemd-260.1/src/bootctl/bootctl-unlink.c:43:77: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(fn)’
systemd-260.1/src/bootctl/bootctl-unlink.c:202:5: enter_function: entry to ‘verb_unlink’
systemd-260.1/src/bootctl/bootctl-unlink.c:213:12: branch_false: following ‘false’ branch...
systemd-260.1/src/bootctl/bootctl-unlink.c:215:12: branch_false: ...to here
systemd-260.1/src/bootctl/bootctl-unlink.c:215:12: branch_false: following ‘false’ branch...
systemd-260.1/src/bootctl/bootctl-unlink.c:218:13: branch_false: ...to here
systemd-260.1/src/bootctl/bootctl-unlink.c:222:12: branch_false: following ‘false’ branch...
systemd-260.1/src/bootctl/bootctl-unlink.c:224:12: branch_false: ...to here
systemd-260.1/src/bootctl/bootctl-unlink.c:224:12: branch_false: following ‘false’ branch...
systemd-260.1/src/bootctl/bootctl-unlink.c:227:48: branch_false: ...to here
systemd-260.1/src/bootctl/bootctl-unlink.c:234:12: branch_false: following ‘false’ branch...
systemd-260.1/src/bootctl/bootctl-unlink.c:238:9: branch_false: ...to here
systemd-260.1/src/bootctl/bootctl-unlink.c:238:9: call_function: calling ‘unlink_entry’ from ‘verb_unlink’
# 41| if (!t)
# 42| return -ENOMEM;
# 43|-> r = hashmap_ensure_put(known_files, &path_hash_ops_free, t, INT_TO_PTR(n));
# 44| if (r < 0)
# 45| return r;
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/dissect/dissect.c:2058:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘loop’
systemd-260.1/src/dissect/dissect.c:2090:12: enter_function: entry to ‘run’
systemd-260.1/src/dissect/dissect.c:2092:51: release_memory: ‘d’ is NULL
systemd-260.1/src/dissect/dissect.c:2098:12: branch_false: following ‘false’ branch...
systemd-260.1/src/dissect/dissect.c:2101:21: branch_false: ...to here
systemd-260.1/src/dissect/dissect.c:2101:21: call_function: calling ‘parse_argv’ from ‘run’
systemd-260.1/src/dissect/dissect.c:2101:21: return_function: returning to ‘run’ from ‘parse_argv’
systemd-260.1/src/dissect/dissect.c:2102:12: branch_false: following ‘false’ branch (when ‘r > 0’)...
systemd-260.1/src/dissect/dissect.c:2105:13: branch_false: ...to here
systemd-260.1/src/dissect/dissect.c:2112:20: branch_false: following ‘false’ branch...
systemd-260.1/src/dissect/dissect.c:2116:13: branch_false: ...to here
systemd-260.1/src/dissect/dissect.c:2132:24: call_function: calling ‘action_detach’ from ‘run’
# 2056| r = loop_device_set_autoclear(loop, true);
# 2057| if (r < 0)
# 2058|-> log_warning_errno(r, "Failed to enable autoclear logic on '%s', ignoring: %m", loop->node);
# 2059|
# 2060| loop_device_unrelinquish(loop);
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/home/pam_systemd_home.c:1008:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ur’
/usr/include/security/pam_modules.h:40:5: enter_function: entry to ‘pam_sm_acct_mgmt’
systemd-260.1/src/home/pam_systemd_home.c:969:51: release_memory: ‘ur’ is NULL
systemd-260.1/src/home/pam_systemd_home.c:976:12: branch_false: following ‘false’ branch...
systemd-260.1/src/home/pam_systemd_home.c:979:9: branch_false: ...to here
systemd-260.1/src/home/pam_systemd_home.c:984:13: call_function: calling ‘parse_argv’ from ‘pam_sm_acct_mgmt’
systemd-260.1/src/home/pam_systemd_home.c:984:13: return_function: returning to ‘pam_sm_acct_mgmt’ from ‘parse_argv’
systemd-260.1/src/home/pam_systemd_home.c:992:13: call_function: calling ‘fallback_shell_can_work’ from ‘pam_sm_acct_mgmt’
systemd-260.1/src/home/pam_systemd_home.c:992:13: return_function: returning to ‘pam_sm_acct_mgmt’ from ‘fallback_shell_can_work’
systemd-260.1/src/home/pam_systemd_home.c:993:12: branch_false: following ‘false’ branch...
systemd-260.1/src/home/pam_systemd_home.c:996:13: branch_false: ...to here
systemd-260.1/src/home/pam_systemd_home.c:996:13: call_function: calling ‘acquire_home’ from ‘pam_sm_acct_mgmt’
systemd-260.1/src/home/pam_systemd_home.c:996:13: return_function: returning to ‘pam_sm_acct_mgmt’ from ‘acquire_home’
systemd-260.1/src/home/pam_systemd_home.c:997:12: branch_false: following ‘false’ branch...
systemd-260.1/src/home/pam_systemd_home.c:1000:13: branch_false: ...to here
systemd-260.1/src/home/pam_systemd_home.c:1000:13: call_function: calling ‘acquire_user_record’ from ‘pam_sm_acct_mgmt’
systemd-260.1/src/home/pam_systemd_home.c:1000:13: return_function: returning to ‘pam_sm_acct_mgmt’ from ‘acquire_user_record’
systemd-260.1/src/home/pam_systemd_home.c:1001:12: branch_false: following ‘false’ branch...
systemd-260.1/src/home/pam_systemd_home.c:1004:13: branch_false: ...to here
systemd-260.1/src/home/pam_systemd_home.c:1004:13: release_memory: ‘ur’ is NULL
systemd-260.1/src/home/pam_systemd_home.c:1008:17: danger: dereference of NULL ‘ur’
# 1006|
# 1007| case -ESTALE:
# 1008|-> pam_syslog(pamh, LOG_WARNING, "User record for '%s' is newer than current system time, assuming incorrect system clock, allowing access.", ur->user_name);
# 1009| break;
# 1010|
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/hostname/hostnamed.c:753:24: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘dmi’
systemd-260.1/src/hostname/hostnamed.c:1770:12: enter_function: entry to ‘method_describe’
systemd-260.1/src/hostname/hostnamed.c:1772:22: branch_false: following ‘false’ branch...
systemd-260.1/src/hostname/hostnamed.c:1773:30: branch_false: ...to here
systemd-260.1/src/hostname/hostnamed.c:1777:9: branch_false: following ‘false’ branch...
systemd-260.1/src/hostname/hostnamed.c:1779:13: branch_false: ...to here
systemd-260.1/src/hostname/hostnamed.c:1785:12: branch_false: following ‘false’ branch...
systemd-260.1/src/hostname/hostnamed.c:1790:9: branch_false: ...to here
systemd-260.1/src/hostname/hostnamed.c:1792:13: call_function: calling ‘build_describe_response’ from ‘method_describe’
# 751|
# 752| if (get_dmi_property(c, "ID_CHASSIS", &dmi) >= 0)
# 753|-> return dmi;
# 754|
# 755| fallback = fallback_chassis(c);
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/import/pull-oci.c:428: error[uninitvar]: Uninitialized variable: m
# 426| };
# 427|
# 428|-> r = json_dispatch_oci_index_entry(m, &entry);
# 429| if (r < 0)
# 430| return r;
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/import/pull-oci.c:841: error[uninitvar]: Uninitialized variable: m
# 839| };
# 840|
# 841|-> r = json_dispatch_oci_manifest_layer(m, &layer);
# 842| if (r < 0)
# 843| return r;
Error: CPPCHECK_WARNING (CWE-476):
systemd-260.1/src/import/pull-oci.c:1066: warning[nullPointer]: Possible null pointer dereference: ej
# 1064| }
# 1065|
# 1066|-> fprintf(f, "Parameters=%s\n", ej);
# 1067| }
# 1068|
Error: GCC_ANALYZER_WARNING (CWE-401):
systemd-260.1/src/import/pull-oci.c:1410:24: warning[-Wanalyzer-malloc-leak]: leak of ‘realm’
systemd-260.1/src/import/pull-oci.c:1401:12: enter_function: entry to ‘oci_pull_process_authentication_challenge’
systemd-260.1/src/import/pull-oci.c:1404:9: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1405:9: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1405:9: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1408:25: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1409:12: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1412:13: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1412:12: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1415:14: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1419:12: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1422:30: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1432:9: branch_true: following ‘true’ branch...
systemd-260.1/src/import/pull-oci.c:1435:17: branch_true: following ‘true’ branch...
systemd-260.1/src/import/pull-oci.c:1436:41: branch_true: ...to here
systemd-260.1/src/import/pull-oci.c:1437:28: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1440:41: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1441:28: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1446:61: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1446:50: acquire_memory: allocated here
systemd-260.1/src/import/pull-oci.c:1447:28: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1450:25: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1432:9: branch_true: following ‘true’ branch (when ‘__unique_prefix_i27’ is non-NULL)...
systemd-260.1/src/import/pull-oci.c:1432:9: branch_true: ...to here
systemd-260.1/src/import/pull-oci.c:1459:12: branch_false: following ‘false’ branch...
systemd-260.1/src/import/pull-oci.c:1459:23: branch_false: ...to here
systemd-260.1/src/import/pull-oci.c:1459:13: branch_true: following ‘true’ branch...
systemd-260.1/src/import/pull-oci.c:1460:24: branch_true: ...to here
systemd-260.1/src/import/pull-oci.c:1417:36: call_function: calling ‘strv_freep’ from ‘oci_pull_process_authentication_challenge’
systemd-260.1/src/import/pull-oci.c:1417:36: return_function: returning to ‘oci_pull_process_authentication_challenge’ from ‘strv_freep’
systemd-260.1/src/import/pull-oci.c:1410:24: danger: ‘realm’ leaks here; was allocated at [(20)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/19)
# 1408| const char *e = startswith_no_case(challenge, "bearer ");
# 1409| if (!e)
# 1410|-> return log_error_errno(SYNTHETIC_ERRNO(ENOKEY), "Authentication mechanism not recognized, cannot authenticate.");
# 1411|
# 1412| if (i->bearer_token_job)
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/libsystemd/sd-json/json-util.c:825: error[uninitvar]: Uninitialized variable: k
# 823| continue;
# 824|
# 825|-> r = json_variant_compare(v, sd_json_variant_by_key(b, k));
# 826| if (r != 0) {
# 827| lowest = k;
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/libsystemd/sd-json/json-util.c:825: error[uninitvar]: Uninitialized variable: v
# 823| continue;
# 824|
# 825|-> r = json_variant_compare(v, sd_json_variant_by_key(b, k));
# 826| if (r != 0) {
# 827| lowest = k;
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/machine/machined-resolve-hook.c:147:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘key’
systemd-260.1/src/machine/machined-resolve-hook.c:106:5: enter_function: entry to ‘vl_method_resolve_record’
systemd-260.1/src/machine/machined-resolve-hook.c:112:22: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:115:9: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:115:9: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:117:75: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:119:12: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:122:13: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:122:13: call_function: inlined call to ‘dns_question_isempty’ from ‘vl_method_resolve_record’
systemd-260.1/src/machine/machined-resolve-hook.c:122:12: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:125:49: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:132:9: branch_true: following ‘true’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:134:20: branch_true: following ‘true’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:138:30: branch_true: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:141:28: branch_true: following ‘true’ branch (when ‘n_addresses == -1’)...
systemd-260.1/src/machine/machined-resolve-hook.c:142:47: branch_true: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:143:36: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:147:38: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:148:25: branch_true: following ‘true’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:149:37: branch_true: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:154:36: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:160:49: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:163:36: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:152:90: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:170:24: branch_false: following ‘false’ branch (when ‘nxdomain == 0’)...
systemd-260.1/src/machine/machined-resolve-hook.c:171:29: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:172:28: branch_false: following ‘false’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:174:28: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:132:9: branch_true: following ‘true’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:134:20: branch_true: following ‘true’ branch...
systemd-260.1/src/machine/machined-resolve-hook.c:138:30: branch_true: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:141:28: branch_false: following ‘false’ branch (when ‘n_addresses != -1’)...
systemd-260.1/src/machine/machined-resolve-hook.c:147:38: branch_false: ...to here
systemd-260.1/src/machine/machined-resolve-hook.c:147:38: danger: dereference of NULL ‘key’
# 145| }
# 146|
# 147|-> int family = dns_type_to_af(key->type);
# 148| FOREACH_ARRAY(address, addresses, n_addresses) {
# 149| if (address->family != family)
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/mountfsd/mountwork.c:83: error[uninitvar]: Uninitialized variable: k
# 81| sd_json_variant *e;
# 82| JSON_VARIANT_OBJECT_FOREACH(k, e, variant) {
# 83|-> PartitionDesignator pd = partition_designator_from_string(k);
# 84| if (pd < 0)
# 85| return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL), "Invalid partition designator '%s'.", strna(k));
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/mountfsd/mountwork.c:87: error[uninitvar]: Uninitialized variable: e
# 85| return json_log(variant, flags, SYNTHETIC_ERRNO(EINVAL), "Invalid partition designator '%s'.", strna(k));
# 86|
# 87|-> if (!sd_json_variant_is_string(e))
# 88| return json_log(e, flags, SYNTHETIC_ERRNO(EINVAL), "Mount option for partition '%s' is not a string.", strna(k));
# 89|
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/network/networkd-link-varlink.c:91:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘link’
systemd-260.1/src/network/networkd-link-varlink.c:68:12: enter_function: entry to ‘vl_method_link_up_or_down’
systemd-260.1/src/network/networkd-link-varlink.c:72:9: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:73:9: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:73:9: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:75:13: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:75:13: call_function: calling ‘dispatch_link’ from ‘vl_method_link_up_or_down’
systemd-260.1/src/network/networkd-link-varlink.c:75:13: return_function: returning to ‘vl_method_link_up_or_down’ from ‘dispatch_link’
systemd-260.1/src/network/networkd-link-varlink.c:76:12: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:79:13: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:85:12: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:88:12: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:88:12: branch_false: following ‘false’ branch (when ‘up == 0’)...
systemd-260.1/src/network/networkd-link-varlink.c:91:17: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:91:17: danger: use of uninitialized value ‘link’ here
# 89| /* Stop all network engines while interface is still up to allow proper cleanup,
# 90| * e.g. sending IPv6 shutdown RA messages before the interface is brought down. */
# 91|-> (void) link_stop_engines(link, /* may_keep_dynamic = */ false);
# 92|
# 93| return link_up_or_down_now_by_varlink(link, up, vlink);
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/network/networkd-link-varlink.c:93:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘link’
systemd-260.1/src/network/networkd-link-varlink.c:68:12: enter_function: entry to ‘vl_method_link_up_or_down’
systemd-260.1/src/network/networkd-link-varlink.c:72:9: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:73:9: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:73:9: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:75:13: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:75:13: call_function: calling ‘dispatch_link’ from ‘vl_method_link_up_or_down’
systemd-260.1/src/network/networkd-link-varlink.c:75:13: return_function: returning to ‘vl_method_link_up_or_down’ from ‘dispatch_link’
systemd-260.1/src/network/networkd-link-varlink.c:76:12: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:79:13: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:85:12: branch_false: following ‘false’ branch...
systemd-260.1/src/network/networkd-link-varlink.c:88:12: branch_false: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:88:12: branch_true: following ‘true’ branch (when ‘up != 0’)...
systemd-260.1/src/network/networkd-link-varlink.c:93:16: branch_true: ...to here
systemd-260.1/src/network/networkd-link-varlink.c:93:16: danger: use of uninitialized value ‘link’ here
# 91| (void) link_stop_engines(link, /* may_keep_dynamic = */ false);
# 92|
# 93|-> return link_up_or_down_now_by_varlink(link, up, vlink);
# 94| }
# 95|
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/nsresourced/userns-registry.c:189: error[uninitvar]: Uninitialized variable: e
# 187| delegates[n] = DELEGATED_USER_NAMESPACE_INFO_NULL;
# 188|
# 189|-> r = sd_json_dispatch(e, delegate_dispatch_table, flags, &delegates[n]);
# 190| if (r < 0)
# 191| return r;
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/nsresourced/userns-registry.c:229: error[uninitvar]: Uninitialized variable: e
# 227| sd_json_variant *e;
# 228| JSON_VARIANT_ARRAY_FOREACH(e, variant) {
# 229|-> if (!sd_json_variant_is_unsigned(e))
# 230| return json_log(e, flags, SYNTHETIC_ERRNO(EINVAL), "JSON array element is not an unsigned integer.");
# 231|
Error: GCC_ANALYZER_WARNING (CWE-401):
systemd-260.1/src/oom/oomd-util.c:86:1: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(32)’
systemd-260.1/src/oom/oomd-util.c:470:5: enter_function: entry to ‘oomd_cgroup_kill_mark’
systemd-260.1/src/oom/oomd-util.c:473:9: branch_false: following ‘false’ branch...
systemd-260.1/src/oom/oomd-util.c:474:9: branch_false: ...to here
systemd-260.1/src/oom/oomd-util.c:474:9: branch_false: following ‘false’ branch...
systemd-260.1/src/oom/oomd-util.c:475:9: branch_false: ...to here
systemd-260.1/src/oom/oomd-util.c:475:9: branch_false: following ‘false’ branch...
systemd-260.1/src/oom/oomd-util.c:477:13: branch_false: ...to here
systemd-260.1/src/oom/oomd-util.c:477:12: branch_false: following ‘false’ branch...
systemd-260.1/src/oom/oomd-util.c:488:64: call_function: inlined call to ‘malloc_multiply’ from ‘oomd_cgroup_kill_mark’
systemd-260.1/src/oom/oomd-util.c:489:12: branch_false: following ‘false’ branch...
systemd-260.1/src/oom/oomd-util.c:494:24: branch_false: ...to here
systemd-260.1/src/oom/oomd-util.c:494:24: call_function: calling ‘oomd_cgroup_context_ref’ from ‘oomd_cgroup_kill_mark’
systemd-260.1/src/oom/oomd-util.c:494:24: return_function: returning to ‘oomd_cgroup_kill_mark’ from ‘oomd_cgroup_context_ref’
systemd-260.1/src/oom/oomd-util.c:488:59: call_function: inlined call to ‘oomd_kill_state_removep’ from ‘oomd_cgroup_kill_mark’
# 84| }
# 85|
# 86|-> DEFINE_TRIVIAL_REF_UNREF_FUNC(OomdCGroupContext, oomd_cgroup_context, oomd_cgroup_context_free);
# 87|
# 88| int oomd_pressure_above(Hashmap *h, Set **ret) {
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/portable/portable.c:907:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘os_release’
systemd-260.1/src/portable/portable.c:2025:5: enter_function: entry to ‘portable_attach’
systemd-260.1/src/portable/portable.c:2040:63: release_memory: ‘os_release’ is NULL
systemd-260.1/src/portable/portable.c:2048:9: branch_false: following ‘false’ branch...
systemd-260.1/src/portable/portable.c:2056:62: branch_false: ...to here
systemd-260.1/src/portable/portable.c:2050:13: call_function: calling ‘extract_image_and_extensions’ from ‘portable_attach’
# 905| _cleanup_free_ char *prefixes = NULL, *portable_scope_str = NULL;
# 906|
# 907|-> r = parse_env_file_fd(
# 908| os_release->fd, os_release->name,
# 909| "ID", &id,
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/resolve/resolvectl.c:1395: error[uninitvar]: Uninitialized variable: &pos1
# 1393|
# 1394| if (c->ifname)
# 1395|-> printf("%s%nLink %i (%s)%n%s:", ansi_highlight(), &pos1, c->ifindex, c->ifname, &pos2, ansi_normal());
# 1396| else if (c->delegate)
# 1397| printf("%s%nDelegate %s%n%s:", ansi_highlight(), &pos1, c->delegate, &pos2, ansi_normal());
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/resolve/resolvectl.c:1395: error[uninitvar]: Uninitialized variable: &pos2
# 1393|
# 1394| if (c->ifname)
# 1395|-> printf("%s%nLink %i (%s)%n%s:", ansi_highlight(), &pos1, c->ifindex, c->ifname, &pos2, ansi_normal());
# 1396| else if (c->delegate)
# 1397| printf("%s%nDelegate %s%n%s:", ansi_highlight(), &pos1, c->delegate, &pos2, ansi_normal());
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/resolve/resolvectl.c:1929: error[uninitvar]: Uninitialized variable: w
# 1927| JSON_VARIANT_ARRAY_FOREACH(w, v) {
# 1928| _cleanup_(dns_configuration_freep) DNSConfiguration *c = NULL;
# 1929|-> r = dns_configuration_from_json(w, &c);
# 1930| if (r < 0)
# 1931| return r;
Error: GCC_ANALYZER_WARNING (CWE-126):
systemd-260.1/src/resolve/resolvectl.c:3957:24: warning[-Wanalyzer-out-of-bounds]: buffer over-read
systemd-260.1/src/resolve/resolvectl.c:4060:12: enter_function: entry to ‘run’
systemd-260.1/src/resolve/resolvectl.c:4075:12: branch_false: following ‘false’ branch (when ‘r > 0’)...
systemd-260.1/src/resolve/resolvectl.c:4078:12: branch_false: ...to here
systemd-260.1/src/resolve/resolvectl.c:4078:12: branch_true: following ‘true’ branch (when ‘compat != 0’)...
systemd-260.1/src/resolve/resolvectl.c:4079:24: branch_true: ...to here
systemd-260.1/src/resolve/resolvectl.c:4079:24: call_function: calling ‘compat_main’ from ‘run’
# 3955| *p++ = (char *) single_arg;
# 3956| FOREACH_ARRAY(arg, args, num_args)
# 3957|-> *p++ = *arg;
# 3958|
# 3959| optind = 0;
Error: GCC_ANALYZER_WARNING (CWE-688):
systemd-260.1/src/shared/cryptsetup-util.c:252:9: warning[-Wanalyzer-null-argument]: use of NULL ‘prefix’ where non-null expected
systemd-260.1/src/shared/cryptsetup-util.c:243:30: release_memory: ‘prefix’ is NULL
systemd-260.1/src/shared/cryptsetup-util.c:249:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/cryptsetup-util.c:252:9: branch_false: ...to here
systemd-260.1/src/shared/cryptsetup-util.c:252:9: release_memory: ‘prefix’ is NULL
systemd-260.1/src/shared/cryptsetup-util.c:252:9: danger: argument 1 (‘prefix’) NULL where non-null expected
# 250| return log_debug_errno(r, "Failed to get LUKS volume key prefix.");
# 251|
# 252|-> hmac_sha256(volume_key, volume_key_size, prefix, strlen(prefix), digest);
# 253|
# 254| hex = hexmem(digest, sizeof(digest));
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/shared/dissect-image.c:504: error[uninitvar]: Uninitialized variable: w
# 502| };
# 503|
# 504|-> r = sd_json_dispatch(w, dispatch_segment, SD_JSON_ALLOW_EXTENSIONS, &data);
# 505| if (r < 0) {
# 506| log_debug("Failed to get integrity information from LUKS JSON for segment %s, assuming no integrity.", key);
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/shared/dissect-image.c:506: error[uninitvar]: Uninitialized variable: key
# 504| r = sd_json_dispatch(w, dispatch_segment, SD_JSON_ALLOW_EXTENSIONS, &data);
# 505| if (r < 0) {
# 506|-> log_debug("Failed to get integrity information from LUKS JSON for segment %s, assuming no integrity.", key);
# 507| return 0;
# 508| }
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/shared/dns-configuration.c:213: error[uninitvar]: Uninitialized variable: v
# 211| _cleanup_(dns_scope_freep) DNSScope *s = NULL;
# 212|
# 213|-> r = dispatch_dns_scope(name, v, flags, &s);
# 214| if (r < 0)
# 215| return json_log(v, flags, r, "JSON array element is not a valid DNSScope.");
Error: CPPCHECK_WARNING (CWE-457):
systemd-260.1/src/shared/metrics.c:160: error[uninitvar]: Uninitialized variable: e
# 158| _unused_ sd_json_variant *e;
# 159| JSON_VARIANT_OBJECT_FOREACH(k, e, fields)
# 160|-> assert(sd_json_variant_is_string(e));
# 161| }
# 162|
Error: GCC_ANALYZER_WARNING (CWE-401):
systemd-260.1/src/shared/mstack.c:93:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parameter’
systemd-260.1/src/shared/mstack.c:1083:5: enter_function: entry to ‘mstack_apply’
systemd-260.1/src/shared/mstack.c:1096:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/mstack.c:1098:39: branch_false: ...to here
systemd-260.1/src/shared/mstack.c:1099:13: call_function: calling ‘mstack_load_now’ from ‘mstack_apply’
# 91|
# 92| static MStackMount *mstack_find(MStack *mstack, MStackMountType t, const char *sort_key, const char *where) {
# 93|-> assert(mstack);
# 94|
# 95| FOREACH_ARRAY(m, mstack->mounts, mstack->n_mounts) {
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/shared/tar-util.c:1205:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘unique_mnt_id’
systemd-260.1/src/shared/tar-util.c:1174:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1175:9: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1175:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1176:9: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1176:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1179:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1188:13: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1188:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1188:13: branch_true: following ‘true’ branch...
systemd-260.1/src/shared/tar-util.c:1188:13: branch_true: ...to here
systemd-260.1/src/shared/tar-util.c:1193:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1195:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1201:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1204:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1204:12: branch_true: following ‘true’ branch...
systemd-260.1/src/shared/tar-util.c:1205:76: branch_true: ...to here
systemd-260.1/src/shared/tar-util.c:1205:21: danger: use of uninitialized value ‘unique_mnt_id’ here
# 1203|
# 1204| if (d->have_unique_mount_id)
# 1205|-> r = asprintf(&n, "%" PRIu64 ":%i:%s", unique_mnt_id, handle->handle_type, m);
# 1206| else
# 1207| r = asprintf(&n, "%i:%i:%s", mnt_id, handle->handle_type, m);
Error: GCC_ANALYZER_WARNING (CWE-457):
systemd-260.1/src/shared/tar-util.c:1207:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mnt_id’
systemd-260.1/src/shared/tar-util.c:1174:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1175:9: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1175:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1176:9: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1176:9: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1179:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1188:13: branch_true: following ‘true’ branch...
systemd-260.1/src/shared/tar-util.c:1188:13: branch_true: ...to here
systemd-260.1/src/shared/tar-util.c:1188:13: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1188:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1193:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1195:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1201:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1204:13: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1204:12: branch_false: following ‘false’ branch...
systemd-260.1/src/shared/tar-util.c:1207:60: branch_false: ...to here
systemd-260.1/src/shared/tar-util.c:1207:21: danger: use of uninitialized value ‘mnt_id’ here
# 1205| r = asprintf(&n, "%" PRIu64 ":%i:%s", unique_mnt_id, handle->handle_type, m);
# 1206| else
# 1207|-> r = asprintf(&n, "%i:%i:%s", mnt_id, handle->handle_type, m);
# 1208| if (r < 0)
# 1209| return log_oom();
Error: GCC_ANALYZER_WARNING (CWE-476):
systemd-260.1/src/sysext/sysext.c:2142:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘op’
systemd-260.1/src/sysext/sysext.c:2657:12: enter_function: entry to ‘vl_method_refresh’
systemd-260.1/src/sysext/sysext.c:2665:37: branch_false: following ‘false’ branch...
systemd-260.1/src/sysext/sysext.c:2666:36: branch_false: ...to here
systemd-260.1/src/sysext/sysext.c:2671:9: branch_false: following ‘false’ branch...
systemd-260.1/src/sysext/sysext.c:2673:13: branch_false: ...to here
systemd-260.1/src/sysext/sysext.c:2673:13: call_function: calling ‘parse_merge_parameters’ from ‘vl_method_refresh’
systemd-260.1/src/sysext/sysext.c:2673:13: return_function: returning to ‘vl_method_refresh’ from ‘parse_merge_parameters’
systemd-260.1/src/sysext/sysext.c:2674:12: branch_false: following ‘false’ branch...
systemd-260.1/src/sysext/sysext.c:2677:13: branch_false: ...to here
systemd-260.1/src/sysext/sysext.c:2677:13: call_function: calling ‘parse_image_class_parameter’ from ‘vl_method_refresh’
systemd-260.1/src/sysext/sysext.c:2677:13: return_function: returning to ‘vl_method_refresh’ from ‘parse_image_class_parameter’
systemd-260.1/src/sysext/sysext.c:2678:12: branch_false: following ‘false’ branch...
systemd-260.1/src/sysext/sysext.c:2681:17: branch_false: ...to here
systemd-260.1/src/sysext/sysext.c:2696:12: branch_false: following ‘false’ branch...
systemd-260.1/src/sysext/sysext.c:2699:46: branch_false: ...to here
systemd-260.1/src/sysext/sysext.c:2699:13: call_function: calling ‘refresh’ from ‘vl_method_refresh’
# 2140| return r;
# 2141|
# 2142|-> if (op->resolved_mutable_directory && !isempty(arg_root)) {
# 2143| const char *without_root = NULL;
# 2144| without_root = path_startswith(op->resolved_mutable_directory, root_resolved);