Task #91279 - fixed.err
back to task #91279download
Error: GCC_ANALYZER_WARNING (CWE-688):
krb5-1.21.3/src/kdc/rtest.c:88:5: warning[-Wanalyzer-null-argument]: use of NULL ‘ntrans.data’ where non-null expected
krb5-1.21.3/src/kdc/rtest.c:67:8: branch_false: following ‘false’ branch (when ‘argc > 3’)...
krb5-1.21.3/src/kdc/rtest.c:74:12: branch_false: ...to here
krb5-1.21.3/src/kdc/rtest.c:75:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/kdc/rtest.c:80:5: branch_false: ...to here
krb5-1.21.3/src/kdc/rtest.c:81:5: release_memory: ‘ntrans.data’ is NULL
krb5-1.21.3/src/kdc/rtest.c:84:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/kdc/rtest.c:84:8: branch_false: ...to here
krb5-1.21.3/src/kdc/rtest.c:88:12: release_memory: ‘ntrans.data’ is NULL
krb5-1.21.3/src/kdc/rtest.c:88:5: danger: argument 1 (‘otrans.data’) NULL where non-null expected
# 86| else
# 87| otrans.data = 0;
# 88|-> memcpy(otrans.data,argv[1], otrans.length);
# 89|
# 90| tgs = make_princ(ctx, argv[2], argv[0]);
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/ccache/ccbase.c: scope_hint: In function ‘krb5_cc_resolve’
krb5-1.21.3/src/lib/krb5/ccache/ccbase.c:213:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 213 | cp = strchr (name, ':');
# | ^
# 211| return KRB5_CC_BADNAME;
# 212| pfx = NULL;
# 213|-> cp = strchr (name, ':');
# 214| if (!cp) {
# 215| if (krb5_cc_dfl_ops)
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/ccache/ccbase.c:213:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 211| return KRB5_CC_BADNAME;
# 212| pfx = NULL;
# 213|-> cp = strchr (name, ':');
# 214| if (!cp) {
# 215| if (krb5_cc_dfl_ops)
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:142:18: warning[-Wanalyzer-malloc-leak]: leak of ‘rhost’
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:39:1: enter_function: entry to ‘krb5_fwd_tgt_creds’
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:61:8: branch_true: following ‘true’ branch (when ‘cc’ is NULL)...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:62:23: branch_true: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:62:12: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:64:9: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:67:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:69:9: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:69:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:73:15: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:73:15: branch_false: following ‘false’ branch (when ‘server’ is NULL)...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:96:19: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:96:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:99:55: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:101:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:105:5: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:109:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:113:54: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:113:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:118:10: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:118:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:123:9: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:123:8: branch_true: following ‘true’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:124:12: branch_true: following ‘true’ branch (when ‘rhost’ is NULL)...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:125:17: branch_true: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:125:16: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:130:17: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:130:16: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:135:57: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:135:25: call_function: calling ‘k5memdup0’ from ‘krb5_fwd_tgt_creds’
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:135:25: return_function: returning to ‘krb5_fwd_tgt_creds’ from ‘k5memdup0’
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:137:16: branch_false: following ‘false’ branch...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:142:18: branch_false: ...to here
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:142:18: throw: if ‘k5_os_hostaddr’ throws an exception...
krb5-1.21.3/src/lib/krb5/krb/fwd_tgt.c:142:18: danger: ‘rhost’ leaks here; was allocated at [(35)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/34)
# 140| }
# 141|
# 142|-> retval = k5_os_hostaddr(context, rhost, &addrs);
# 143| if (retval)
# 144| goto errout;
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/os/expand_path.c: scope_hint: In function ‘k5_expand_path_tokens_extra’
krb5-1.21.3/src/lib/krb5/os/expand_path.c:495:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 495 | tok_begin = strstr(path_left, "%{");
# | ^
# 493| /* Find the next token in path_left and add the literal text up to it.
# 494| * If there are no more tokens, we can finish up. */
# 495|-> tok_begin = strstr(path_left, "%{");
# 496| if (tok_begin == NULL) {
# 497| k5_buf_add(&buf, path_left);
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/os/expand_path.c:495:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 493| /* Find the next token in path_left and add the literal text up to it.
# 494| * If there are no more tokens, we can finish up. */
# 495|-> tok_begin = strstr(path_left, "%{");
# 496| if (tok_begin == NULL) {
# 497| k5_buf_add(&buf, path_left);
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/os/locate_kdc.c: scope_hint: In function ‘parse_uri_if_https’
krb5-1.21.3/src/lib/krb5/os/locate_kdc.c:200:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 200 | cp = strchr(*host, '/');
# | ^
# 198| *host = host_or_uri + 8;
# 199|
# 200|-> cp = strchr(*host, '/');
# 201| if (cp != NULL) {
# 202| *cp = '\0';
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/lib/krb5/os/locate_kdc.c:200:12: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 198| *host = host_or_uri + 8;
# 199|
# 200|-> cp = strchr(*host, '/');
# 201| if (cp != NULL) {
# 202| *cp = '\0';
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:216:14: warning[-Wanalyzer-malloc-leak]: leak of ‘self’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: acquire_memory: allocated here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 214|
# 215| /* Get the secret (optional for Unix-domain sockets). */
# 216|-> retval = profile_get_string(profile, "otp", name, "secret", NULL, &pstr);
# 217| if (retval != 0)
# 218| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:216:14: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 214|
# 215| /* Get the secret (optional for Unix-domain sockets). */
# 216|-> retval = profile_get_string(profile, "otp", name, "secret", NULL, &pstr);
# 217| if (retval != 0)
# 218| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘name_copy’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 219| if (pstr != NULL) {
# 220| retval = read_secret_file(pstr, &secret);
# 221|-> profile_release_string(pstr);
# 222| if (retval != 0)
# 223| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘secret’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 219| if (pstr != NULL) {
# 220| retval = read_secret_file(pstr, &secret);
# 221|-> profile_release_string(pstr);
# 222| if (retval != 0)
# 223| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:226:13: warning[-Wanalyzer-malloc-leak]: leak of ‘name_copy’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 224| } else {
# 225| if (server[0] != '/') {
# 226|-> com_err("otp", EINVAL, "Secret missing (token type '%s')", name);
# 227| retval = EINVAL;
# 228| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:226:13: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 224| } else {
# 225| if (server[0] != '/') {
# 226|-> com_err("otp", EINVAL, "Secret missing (token type '%s')", name);
# 227| retval = EINVAL;
# 228| goto cleanup;
Error: GCC_ANALYZER_WARNING (CWE-401):
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:240:14: warning[-Wanalyzer-malloc-leak]: leak of ‘server’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:564:1: enter_function: entry to ‘otp_state_new’
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:573:8: branch_false: following ‘false’ branch (when ‘retval == 0’)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:576:12: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:577:8: branch_false: following ‘false’ branch (when ‘self’ is non-NULL)...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:580:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:581:8: branch_false: following ‘false’ branch...
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: branch_false: ...to here
krb5-1.21.3/src/plugins/preauth/otp/otp_state.c:584:14: call_function: calling ‘token_types_decode’ from ‘otp_state_new’
# 238|
# 239| /* Get the timeout (profile value in seconds, result in milliseconds). */
# 240|-> retval = profile_get_integer(profile, "otp", name, "timeout",
# 241| DEFAULT_TIMEOUT, &timeout);
# 242| if (retval != 0)
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_identity.c: scope_hint: In function ‘process_option_ca_crl’
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_identity.c:483:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 483 | residual = strchr(value, ':');
# | ^
# 481| pkiDebug("%s: processing catype %s, value '%s'\n",
# 482| __FUNCTION__, catype2string(catype), value);
# 483|-> residual = strchr(value, ':');
# 484| if (residual == NULL) {
# 485| pkiDebug("No type given for '%s'\n", value);
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_identity.c:483:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 481| pkiDebug("%s: processing catype %s, value '%s'\n",
# 482| __FUNCTION__, catype2string(catype), value);
# 483|-> residual = strchr(value, ':');
# 484| if (residual == NULL) {
# 485| pkiDebug("No type given for '%s'\n", value);
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_matching.c: scope_hint: In function ‘parse_rule_component’
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_matching.c:304:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 304 | nk = strchr(*rule, '<');
# | ^
# 302| * beginning of the next keyword (or the end of the rule).
# 303| */
# 304|-> nk = strchr(*rule, '<');
# 305| while (nk != NULL) {
# 306| /* Possibly another keyword, check it out */
Error: COMPILER_WARNING (CWE-704):
krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_matching.c:304:8: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 302| * beginning of the next keyword (or the end of the rule).
# 303| */
# 304|-> nk = strchr(*rule, '<');
# 305| while (nk != NULL) {
# 306| /* Possibly another keyword, check it out */