From: Joseph Sutton Date: Fri, 6 Oct 2023 01:58:34 +0000 (+1300) Subject: s3:modules: Initialize mask_permset (CID 1435850) X-Git-Tag: tevent-0.16.0~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c30aa741ee9fd1ba26bacf4fad98c004897ac3e5;p=thirdparty%2Fsamba.git s3:modules: Initialize mask_permset (CID 1435850) If this code had ever run, sys_acl_clear_perms() would have attempted to write to some random address in memory. ‘mask_permset’ must be a valid non‐NULL pointer. Commit 9b79d5f2a2f8af75ef13bdc41d2dc296e19ba098 seems to have been a previous attempt to fix this issue. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index 402ac593aae..fefe6c5483e 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -575,7 +575,8 @@ static int fake_acl_process_chmod(SMB_ACL_T *pp_the_acl, if (!got_mask) { SMB_ACL_ENTRY_T mask_entry; - SMB_ACL_PERMSET_T mask_permset; + uint32_t mask_perm = 0; + SMB_ACL_PERMSET_T mask_permset = &mask_perm; ret = sys_acl_create_entry(&the_acl, &mask_entry); if (ret == -1) { return -1;