summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2022-06-03 16:16:31 +1200
committerJule Anger <janger@samba.org>2022-07-24 09:20:22 +0200
commite0d25e172c48c1cd083466dc304257698aadf4af (patch)
tree7f5adc85dab6d61eb3365bad244c5667152ff3f0
parent701aef133fd6efb03f8b32dfd5a4d93acf8b9fce (diff)
downloadsamba-e0d25e172c48c1cd083466dc304257698aadf4af.tar.gz
CVE-2022-32745 s4/dsdb/util: Correctly copy values into message element
To use memcpy(), we need to specify the number of bytes to copy, rather than the number of ldb_val structures. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15008 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
-rw-r--r--source4/dsdb/samdb/ldb_modules/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index 35ae110b5ef..e7fe8f855df 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -1559,7 +1559,7 @@ int dsdb_get_expected_new_values(TALLOC_CTX *mem_ctx,
}
memcpy(v,
tmp_el->values,
- tmp_el->num_values);
+ tmp_el->num_values * sizeof(*v));
v += tmp_el->num_values;
}
}