From d55abd8f50ee03a205e20af4b1196837dafce409 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Thu, 20 Jan 2022 10:22:51 -0500 Subject: [PATCH] lib/krb5: make_local_fast_ap_fxarmor requires a ccache If make_local_fast_ap_fxarmor() is called without a ccache it will segmentation fault. Set a krb5 error message in the context and fail with EINVAL. Change-Id: I8a72a026dbae931e41498f55cd634ad2fee26772 --- lib/krb5/fast.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/krb5/fast.c b/lib/krb5/fast.c index eb51056ee..b2b3db17e 100644 --- a/lib/krb5/fast.c +++ b/lib/krb5/fast.c @@ -138,6 +138,12 @@ make_local_fast_ap_fxarmor(krb5_context context, krb5_data empty; krb5_const_realm tgs_realm; + if (armor_ccache == NULL) { + krb5_set_error_message(context, EINVAL, + "Armor credential cache required"); + return EINVAL; + } + krb5_data_zero(&empty); memset(&cred, 0, sizeof(cred));