]> git.ipfire.org Git - thirdparty/krb5.git/commit
Ensure array count consistency in kadm5 RPC
authorGreg Hudson <ghudson@mit.edu>
Wed, 21 Jun 2023 14:57:39 +0000 (10:57 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 6 Jul 2023 21:15:08 +0000 (17:15 -0400)
commitc81ffb6c8578a9b55c9d0a10342b5bc1bc6ec4df
tree134c7c37c8115849fe37636cff91a63b325fbe5d
parent5c2f26a24235228a436e7a03bb567a1269db71f2
Ensure array count consistency in kadm5 RPC

In _xdr_kadm5_principal_ent_rec(), ensure that n_key_data matches the
key_data array count when decoding.  Otherwise when the structure is
later freed, xdr_array() could iterate over the wrong number of
elements, either leaking some memory or freeing uninitialized
pointers.  Reported by Robert Morris.

CVE-2023-36054:

An authenticated attacker can cause a kadmind process to crash by
freeing uninitialized pointers.  Remote code execution is unlikely.
An attacker with control of a kadmin server can cause a kadmin client
to crash by freeing uninitialized pointers.

(cherry picked from commit ef08b09c9459551aabbe7924fb176f1583053cdd)

ticket: 9099
version_fixed: 1.20.2
src/lib/kadm5/kadm_rpc_xdr.c