Commit Graph

31158 Commits

Author SHA1 Message Date
Roland C. Dowdeswell 8a0fc8d032 Add credential cache coverage tests 2026-06-10 17:26:54 -05:00
Roland C. Dowdeswell 34ab0b7c77 asn1: fix open type alignment on ILP32
Do not assume that the open-type payload needs 8-byte alignment.
Align to pointer size instead, which avoids reading the wrong location
on ILP32 layouts.
2026-06-10 10:38:43 -05:00
Roland C. Dowdeswell 9bb80f4747 hx509: choose certificate time encoding portably
Select UTCTime versus GeneralizedTime with a helper that only performs
the 2050 comparison when the local time_t range can represent that value.
This avoids ILP32 type-limit problems while preserving GeneralizedTime
output on 64-bit and unsigned 32-bit time_t platforms.
2026-06-10 09:59:13 -05:00
Roland C. Dowdeswell 5ebe5b4582 asn1: compare int32 default values safely
Move the int32 ptr comparison into a helper that first checks
whether the encoded pointer-sized default is representable as int32_t.
This avoids ILP32 type-limit warnings.
2026-06-10 09:57:03 -05:00
Roland C. Dowdeswell f609aae209 krb5: avoid time-difference overflow
Use krb5_time_abs() rather than subtracting time_t values before passing the result to labs().  On signed 32-bit time_t platforms, subtracting far-apart times can overflow before labs() sees the value.
2026-06-10 09:39:19 -05:00
Nicolas Williams fdeb3e6e4e Revert "README.md: Drop Coveralls badge (not updating)"
This reverts commit 2b2c71a7c1 as Coveralls
should now update.
2026-06-08 13:40:12 -05:00
Nicolas Williams 16a8e31d34 GHA: Build coverage for master branch too 2026-06-08 13:40:12 -05:00
Roland C. Dowdeswell cdc82913d5 kdc: typos in MAX_TIME macros 2026-06-08 11:38:31 -05:00
Pino Toscano 2194be6c92 asn1: Include <errno.h> before using/checking bits from it
Commit 232c936ea3 added a fallback ENOTSUP
definition. The check itself and the fallback definition rely on
<errno.h> to be included already, so in case it was not (depending on
the platform) then there will be a wrong definition of ENOTSUP.

Instead of rely on <errno.h> to be included before including a
generated header from this tool, include it manually. This way both
the ENOTSUP check and its fallback definition (if ever) will always
work.
2026-06-06 23:54:47 +01:00
Ihar Hrachyshka 2594691dfd Define HAVE_DB_185_H if db_185.h is present 2026-06-06 23:46:07 +01:00
Roland C. Dowdeswell a735b65b70 gssapi: avoid putenv use-after-free in store_cred
Fixes #1163
2026-06-06 23:38:21 +01:00
Roy Marples 1f0f31c954 roken: Don't define any global vars in the pidfile namespace.
Newer util.h from NetBSD defines pidfile_path() which conflicts
here.
2026-05-30 12:06:31 -05:00
Roland C. Dowdeswell e1ab030717 kdc: reject kx509 requests when disabled
Fixes #1378.
2026-05-28 21:30:06 -05:00
Roland C. Dowdeswell 421c40c73e kadm5: make ipropd-master listen on IPv6
Fixes #1330.
2026-05-27 14:11:04 -05:00
Roland C. Dowdeswell de7aa57362 treewide: fix many null dereference reports
Add defensive handling for several NULL allocation and formatting paths reported across issues #820-#829.

Fixes #820, fixes #821, fixes #822, fixes #823, fixes #825, fixes #828
2026-05-27 13:47:41 -05:00
Roland C. Dowdeswell 9a9da70626 krb5: clean up get_cred_kdc on send context failure
Fixes #1207
2026-05-27 12:12:03 -05:00
Roland C. Dowdeswell e3a59b65d3 kadmin: generate stronger random passwords
Generate 12 random bytes and encode them with Heimdal base64url, producing
16-character random passwords with 96 bits of entropy.

This avoids punctuation and quoting issues while still raising generated
password entropy substantially from the old roughly 55-bit generator.

Fixes #1145
2026-05-27 12:06:14 -05:00
Roland C. Dowdeswell 98d6fcacb4 krb5: fix ap_req_nofail documentation
Fixes #1371
2026-05-27 11:56:23 -05:00
Roland C. Dowdeswell 4f147f5e1b doc: trim krb5_verify_user xrefs
Fixes #1127
2026-05-27 16:01:16 +01:00
Roland C. Dowdeswell ef3860d6c3 doc: clean up krb5_init_context man page
Fixes #1125
2026-05-27 15:42:57 +01:00
Alexey Shapovalov 20d4e914e3 gss: Fix NULL minor_status arguments 2026-05-27 14:30:27 +01:00
Florian Best cdd22b6061 refactor(changepw): replace select() with poll()
Issue #1338
2026-05-27 14:16:23 +01:00
Florian Best 73acb1df8e refactor(send_to_kdc): replace select() with poll()
Issue #1338
2026-05-27 14:16:23 +01:00
Roland C. Dowdeswell abec12ef7f ipropd-slave: get a TGT before authenticating
Do not request an iprop/<master> initial ticket directly. With
name_canon_rules = as-is: this can leave the acquired credential
mismatched with what krb5_sendauth() later asks for. Get a normal TGT
and let sendauth acquire the service ticket.

Fixes #1332.
2026-05-26 17:20:15 -05:00
Roland C. Dowdeswell 2e3bb95430 Add KDC-free GSS tests 2026-05-25 20:18:06 -05:00
Roland C. Dowdeswell a66cb84e70 In krb5.conf make underscores and dashes equivalent 2026-05-25 20:14:36 -05:00
Roland C. Dowdeswell e89417f2a1 tests: cover MEMORY ccache cursor invalidation for #547 2026-05-25 20:09:20 -05:00
Roland C. Dowdeswell a105e8e117 tests: cover MEMORY gss_store_cred storage for #132 2026-05-25 20:01:05 -05:00
Roland C. Dowdeswell 56b55e7c9b add CI/CD for libedit and readline 2026-05-25 20:00:24 -05:00
Roland C. Dowdeswell e836e36d06 Remove duplicated libedit, find/use installed version 2026-05-25 20:00:24 -05:00
Roland C. Dowdeswell 19325d4252 lib/gssapi/test_context.c: fix typo 2026-05-25 19:59:28 -05:00
Roland C. Dowdeswell 3ff4191ba9 krb5: fail krb5_verify_user() early if service key missing
Fixes #1157.
2026-05-25 19:42:40 -05:00
Roland C. Dowdeswell 73bab3fea5 tests/kdc/leaks-kill.sh: typo 2026-05-25 17:32:30 -05:00
Roland C. Dowdeswell d47f526f55 ipc: serialize mig generated files 2026-05-25 17:32:05 -05:00
Roland C. Dowdeswell 6efb8b405e roken: provide poll fallback 2026-05-25 17:31:26 -05:00
Roland C. Dowdeswell 6ce504ad84 kdc/kdc.8: move a comma 2026-05-22 20:33:08 -05:00
Jennifer Sutton 378a367c9e kdc: Allow KDC plugin to handle attempts to authenticate without using hardware authentication
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2026-05-20 11:47:28 -05:00
Jennifer Sutton 6d2d9632da kdc: Check return value of pa_enc_ts_decrypt_kvno()
Signed-off-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2026-05-20 11:47:28 -05:00
Jennifer Sutton c65cd331e4 gsskrb5: Correctly check EVP_Cipher() return value for RC4
If the flag EVP_CIPH_FLAG_CUSTOM_CIPHER is set for the cipher, EVP_Cipher()
returns the number of bytes written to ‘out’.
2026-05-20 11:46:35 -05:00
Jennifer Sutton f93aeb3f8f krb5: Correctly check if RC4 enctype is valid
krb5_enctype_valid() returns zero on success.
2026-05-20 11:45:57 -05:00
Jennifer Sutton dafc36e26c krb5: Promote AES SHA2 enctypes to preferred 2026-05-20 11:45:57 -05:00
Jennifer Sutton b7f4f62dfa krb5: Fix non‐RC4 build
The function _krb5_usage2arcfour() is only declared if Heimdal is built with
RC4. Put calls to this function behind #ifdef guards so that the build can
succeed.
2026-05-20 11:43:53 -05:00
Jennifer Sutton 31c514e3b2 kdc: Adjust error code mapping
Commit cbe156d927 mapped error code
HX509_CERT_REVOKED to KRB5_KDC_ERR_REVOKED_CERTIFICATE, so check for the latter
instead.
2026-05-20 11:43:18 -05:00
Rudi Heitbaum 356b2111ba dbutils: fix order of libraries for static build 2026-05-20 11:42:14 -05:00
Roland C. Dowdeswell 93bbac45f9 Install heim_threads.h 2026-05-19 12:02:18 -05:00
Roland C. Dowdeswell e4a885074b krb5: make KRB5_TRACE default to tracing not just debugging 2026-05-19 12:01:42 -05:00
Ivan Korytov ffb01963fc lib:roken: allow large fragmented UDP replies from glibc resolver
glibc resolver returns same answer length as buffer size when
buffer is too small for the answer.

Signed-off-by: Ivan Korytov <toreonify@altlinux.org>
2026-05-19 11:52:18 -05:00
Roland C. Dowdeswell 8dba1f4810 add a bit more logging in gss mechglue 2026-05-19 11:14:39 -05:00
Roland C. Dowdeswell e11f8a8823 Eliminate \n from _gss_mg_log() calls 2026-05-19 11:14:39 -05:00
Kacper Boström abd35b246a kdc: support pkinit_kdc_revoke for pkinit anchors
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
2026-02-11 16:14:53 +13:00