Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2022 21:50:48 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: e7d6b2cd4304 - stable/12 - heimdal: Add additional checks for bad kadmind input
Message-ID:  <202212052150.2B5LombK094304@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=e7d6b2cd43042d215bbca63355ea1981c4c93535

commit e7d6b2cd43042d215bbca63355ea1981c4c93535
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:43 +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.2B5LombK094304>