aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2018-02-16 15:17:26 +0100
committerKarolin Seeger <kseeger@samba.org>2018-03-12 10:05:43 +0100
commit7f4fef05c45dfa797a2ab699af32d166df7451ce (patch)
treead1256843d174c99ac22d8103b74cb75bb1cf82e
parent39aa58a5c515c9e148f661efa1adbc9dedc51542 (diff)
downloadsamba-7f4fef05c45dfa797a2ab699af32d166df7451ce.tar.gz
samba-7f4fef05c45dfa797a2ab699af32d166df7451ce.tar.xz
samba-7f4fef05c45dfa797a2ab699af32d166df7451ce.zip
CVE-2018-1057: s4:dsdb/acl: add a NULL check for talloc_new() in acl_check_password_rights()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=13272 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source4/dsdb/samdb/ldb_modules/acl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/acl.c b/source4/dsdb/samdb/ldb_modules/acl.c
index 4bf9779d507..2c0aee41edf 100644
--- a/source4/dsdb/samdb/ldb_modules/acl.c
+++ b/source4/dsdb/samdb/ldb_modules/acl.c
@@ -973,6 +973,10 @@ static int acl_check_password_rights(TALLOC_CTX *mem_ctx,
"unicodePwd", "dBCSPwd", NULL }, **l;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
+ if (tmp_ctx == NULL) {
+ return LDB_ERR_OPERATIONS_ERROR;
+ }
+
c = ldb_request_get_control(req, DSDB_CONTROL_PASSWORD_CHANGE_OID);
if (c != NULL) {
/*