]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix flaws in LDAP DN checking
authorGreg Hudson <ghudson@mit.edu>
Fri, 12 Jan 2018 16:43:01 +0000 (11:43 -0500)
committerGreg Hudson <ghudson@mit.edu>
Tue, 1 May 2018 20:20:01 +0000 (16:20 -0400)
commita2df94b6bb22ecf6e77c5044cff0f627b4fb30cf
treea5dabd92cd882ee38f859bd8b6d0fe0f9290abbb
parent8420b1404f01bdfe85450d569d89c80ac499dabb
Fix flaws in LDAP DN checking

KDB_TL_USER_INFO tl-data is intended to be internal to the LDAP KDB
module, and not used in disk or wire principal entries.  Prevent
kadmin clients from sending KDB_TL_USER_INFO tl-data by giving it a
type number less than 256 and filtering out type numbers less than 256
in kadm5_create_principal_3().  (We already filter out low type
numbers in kadm5_modify_principal()).

In the LDAP KDB module, if containerdn and linkdn are both specified
in a put_principal operation, check both linkdn and the computed
standalone_principal_dn for container membership.  To that end, factor
out the checks into helper functions and call them on all applicable
client-influenced DNs.

CVE-2018-5729:

In MIT krb5 1.6 or later, an authenticated kadmin user with permission
to add principals to an LDAP Kerberos database can cause a null
dereference in kadmind, or circumvent a DN container check, by
supplying tagged data intended to be internal to the database module.
Thanks to Sharwan Ram and Pooja Anil for discovering the potential
null dereference.

CVE-2018-5730:

In MIT krb5 1.6 or later, an authenticated kadmin user with permission
to add principals to an LDAP Kerberos database can circumvent a DN
containership check by supplying both a "linkdn" and "containerdn"
database argument, or by supplying a DN string which is a left
extension of a container DN string but is not hierarchically within
the container DN.

(cherry picked from commit e1caf6fb74981da62039846931ebdffed71309d1)

ticket: 8643
version_fixed: 1.15.3
src/lib/kadm5/srv/svr_principal.c
src/plugins/kdb/ldap/libkdb_ldap/kdb_ldap.h
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
src/tests/t_kdb.py