From: Douglas Bagnall Date: Mon, 8 Jan 2024 02:05:35 +0000 (+1300) Subject: ndr: ignore trailing bytes in ndr_pull_security_ace() X-Git-Tag: tdb-1.4.11~1801 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c1f421c107be3156b3f1db75aced24a1bca3d2f;p=thirdparty%2Fsamba.git ndr: ignore trailing bytes in ndr_pull_security_ace() This returns the behaviour with ordinary ACEs to where it was with 4.19. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett BUG: https://bugzilla.samba.org/show_bug.cgi?id=15574 --- diff --git a/librpc/ndr/ndr_sec_helper.c b/librpc/ndr/ndr_sec_helper.c index 508bcd219dd..f870a17aafc 100644 --- a/librpc/ndr/ndr_sec_helper.c +++ b/librpc/ndr/ndr_sec_helper.c @@ -113,7 +113,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_security_ace(struct ndr_pull *ndr, ndr_flags NDR_CHECK(ndr_maybe_pull_security_ace_object_ctr(ndr, NDR_SCALARS, r)); NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->trustee)); sub_size = ndr_subcontext_size_of_ace_coda(r, r->size, ndr->flags); - if (sub_size == 0) { + if (!sec_ace_has_extra_blob(r->type) || sub_size == 0) { r->coda.ignored.data = NULL; r->coda.ignored.length = 0; } else {