diff options
author | Andrew Bartlett <abartlet@samba.org> | 2019-12-06 17:54:23 +1300 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2020-01-21 10:11:38 +0000 |
commit | 3f3791765c6fd554b8f7708df0101d3c58339a27 (patch) | |
tree | a6dc93ce13350a035221cf03f256e7e541a0a389 /source4 | |
parent | 5d714c1cea1beadc9ca07935217e0174d9d48ac6 (diff) | |
download | samba-3f3791765c6fd554b8f7708df0101d3c58339a27.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>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/descriptor.c | 7 |
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) { |