dsdb: Correctly handle memory in objectclass_attrs
authorAndrew Bartlett <abartlet@samba.org>
Thu, 30 Jan 2020 03:41:39 +0000 (16:41 +1300)
committerKarolin Seeger <kseeger@samba.org>
Wed, 26 Feb 2020 10:25:22 +0000 (10:25 +0000)
commitc6b90fbcee065d5eb0f48b64a3f74db1d291ec83
tree8d327aafcf2715aa1aea0ef9ef73121a622b3d0b
parent201489edf9d95c72ad786f1c6e6169a335e474a0
dsdb: Correctly handle memory in objectclass_attrs

el->values is caller-provided memory that should be thought of as constant,
it should not be assumed to be a talloc context.

Otherwise, if the caller gives constant memory or a stack
pointer we will get an abort() in talloc when it expects
a talloc magic in the memory preceeding the el->values.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14258

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3657bbc21182d764ddfcd603025f24ec240fd263)
source4/dsdb/samdb/ldb_modules/objectclass_attrs.c