Date: Mon, 5 Dec 2022 21:50:34 GMT From: Cy Schubert <cy@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 02c5770995e3 - stable/13 - heimdal: Add additional checks for bad kadmind input Message-ID: <202212052150.2B5LoYaY093037@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=02c5770995e3769f692ec57c6d20c8229e7b4df3 commit 02c5770995e3769f692ec57c6d20c8229e7b4df3 Author: Cy Schubert <cy@FreeBSD.org> AuthorDate: 2022-11-30 23:53:49 +0000 Commit: Cy Schubert <cy@FreeBSD.org> CommitDate: 2022-12-05 21:50:28 +0000 heimdal: Add additional checks for bad kadmind input Check return codes for bad input. (cherry picked from commit d24b27283290e404dfa2bf38cd0769e92092e384) --- crypto/heimdal/kadmin/server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/crypto/heimdal/kadmin/server.c b/crypto/heimdal/kadmin/server.c index ed6ba5a1f790..19dfd89d521a 100644 --- a/crypto/heimdal/kadmin/server.c +++ b/crypto/heimdal/kadmin/server.c @@ -428,9 +428,11 @@ kadmind_dispatch(void *kadm_handlep, krb5_boolean initial, krb5_store_int32(sp, ret); if(ret == 0){ int i; - krb5_store_int32(sp, n_princs); + if ((ret = krb5_store_int32(sp, n_princs))) + goto fail; for(i = 0; i < n_princs; i++) - krb5_store_string(sp, princs[i]); + if ((ret = krb5_store_string(sp, princs[i]))) + goto fail; kadm5_free_name_list(kadm_handlep, princs, &n_princs); } break; @@ -451,7 +453,7 @@ fail: krb5_store_int32(sp, ret); krb5_storage_to_data(sp, out); krb5_storage_free(sp); - return 0; + return ret; } static void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202212052150.2B5LoYaY093037>