summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2019-12-06 17:54:23 +1300
committerKarolin Seeger <kseeger@samba.org>2020-01-10 11:56:20 +0100
commit0fa9a362e55abb289cbf0fe24baa09c45af4837e (patch)
treeb736e641b87b816655dac02b40fb2d9c3dced8fe
parent589d1e4846bbac0e5388af3ef0c6d6c41b5ff991 (diff)
downloadsamba-0fa9a362e55abb289cbf0fe24baa09c45af4837e.tar.gz
CVE-2019-14902 dsdb: Ensure we honour both change->force_self and change->force_children
If we are renaming a DN we can be in a situation where we need to BUG: https://bugzilla.samba.org/show_bug.cgi?id=12497 Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/dsdb/samdb/ldb_modules/descriptor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/descriptor.c b/source4/dsdb/samdb/ldb_modules/descriptor.c
index 7070affa645..b9f465fc36f 100644
--- a/source4/dsdb/samdb/ldb_modules/descriptor.c
+++ b/source4/dsdb/samdb/ldb_modules/descriptor.c
@@ -1291,6 +1291,13 @@ static int descriptor_sd_propagation_recursive(struct ldb_module *module,
if (cur != NULL) {
DLIST_REMOVE(change->children, cur);
+ } else if (i == 0) {
+ /*
+ * in the change->force_self case
+ * res->msgs[0]->elements was not overwritten,
+ * so set cur here
+ */
+ cur = change;
}
for (c = stopped_stack; c; c = stopped_stack) {