aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2018-05-21 14:50:50 +1200
committerKarolin Seeger <kseeger@samba.org>2018-08-11 08:16:03 +0200
commit7331723918018a40904ab7339b051e7ebb136a6e (patch)
treeafbacd553f0d3f0e28659b1b1cd5a7a1966572e8
parent95c95a4a99a41e175784319259f646f3deffcfe9 (diff)
downloadsamba-7331723918018a40904ab7339b051e7ebb136a6e.tar.gz
samba-7331723918018a40904ab7339b051e7ebb136a6e.tar.xz
samba-7331723918018a40904ab7339b051e7ebb136a6e.zip
CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374
-rw-r--r--lib/ldb/ldb_sqlite3/ldb_sqlite3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
index f94dc993904..0f5abf87547 100644
--- a/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
+++ b/lib/ldb/ldb_sqlite3/ldb_sqlite3.c
@@ -323,6 +323,9 @@ static char *parsetree_to_sql(struct ldb_module *module,
const char *cdn = ldb_dn_get_casefold(
ldb_dn_new(mem_ctx, ldb,
(const char *)value.data));
+ if (cdn == NULL) {
+ return NULL;
+ }
return lsqlite3_tprintf(mem_ctx,
"SELECT eid FROM ldb_entry "