|
 |
8c1676 |
From 08c642c09c38a9c6454ab43a9b53b2a89b9eef99 Mon Sep 17 00:00:00 2001
|
|
 |
8c1676 |
From: Greg Hudson <ghudson@mit.edu>
|
|
 |
8c1676 |
Date: Mon, 14 Mar 2016 17:26:34 -0400
|
|
 |
8c1676 |
Subject: [PATCH] Fix LDAP null deref on empty arg [CVE-2016-3119]
|
|
 |
8c1676 |
|
|
 |
8c1676 |
In the LDAP KDB module's process_db_args(), strtok_r() may return NULL
|
|
 |
8c1676 |
if there is an empty string in the db_args array. Check for this case
|
|
 |
8c1676 |
and avoid dereferencing a null pointer.
|
|
 |
8c1676 |
|
|
 |
8c1676 |
CVE-2016-3119:
|
|
 |
8c1676 |
|
|
 |
8c1676 |
In MIT krb5 1.6 and later, an authenticated attacker with permission
|
|
 |
8c1676 |
to modify a principal entry can cause kadmind to dereference a null
|
|
 |
8c1676 |
pointer by supplying an empty DB argument to the modify_principal
|
|
 |
8c1676 |
command, if kadmind is configured to use the LDAP KDB module.
|
|
 |
8c1676 |
|
|
 |
8c1676 |
CVSSv2 Vector: AV:N/AC:H/Au:S/C:N/I:N/A:C/E:H/RL:OF/RC:ND
|
|
 |
8c1676 |
|
|
 |
8c1676 |
ticket: 8383 (new)
|
|
 |
8c1676 |
target_version: 1.14-next
|
|
 |
8c1676 |
target_version: 1.13-next
|
|
 |
8c1676 |
tags: pullup
|
|
 |
8c1676 |
---
|
|
 |
8c1676 |
src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c | 1 +
|
|
 |
8c1676 |
1 file changed, 1 insertion(+)
|
|
 |
8c1676 |
|
|
 |
8c1676 |
diff --git a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
|
|
 |
8c1676 |
index 6e591e1..79c4cf0 100644
|
|
 |
8c1676 |
--- a/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
|
|
 |
8c1676 |
+++ b/src/plugins/kdb/ldap/libkdb_ldap/ldap_principal2.c
|
|
 |
8c1676 |
@@ -296,6 +296,7 @@ process_db_args(krb5_context context, char **db_args, xargs_t *xargs,
|
|
 |
8c1676 |
if (db_args) {
|
|
 |
8c1676 |
for (i=0; db_args[i]; ++i) {
|
|
 |
8c1676 |
arg = strtok_r(db_args[i], "=", &arg_val);
|
|
 |
8c1676 |
+ arg = (arg != NULL) ? arg : "";
|
|
 |
8c1676 |
if (strcmp(arg, TKTPOLICY_ARG) == 0) {
|
|
 |
8c1676 |
dptr = &xargs->tktpolicydn;
|
|
 |
8c1676 |
} else {
|
|
 |
8c1676 |
--
|
|
 |
8c1676 |
2.8.1
|
|
 |
8c1676 |
|