CVE-2015-7560: s3: smbd: Refuse to set an ACL from a POSIX file handle on a symlink.
authorJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 18:52:50 +0000 (10:52 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2016 10:37:26 +0000 (11:37 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/smbd/nttrans.c

index 811390940ecc91d6835ea94899f832285ee7a88e..372d4206c43ba3c70012eecd104465f983180037 100644 (file)
@@ -875,6 +875,12 @@ NTSTATUS set_sd(files_struct *fsp, struct security_descriptor *psd,
                return NT_STATUS_OK;
        }
 
+       if (S_ISLNK(fsp->fsp_name->st.st_ex_mode)) {
+               DEBUG(10, ("ACL set on symlink %s denied.\n",
+                       fsp_str_dbg(fsp)));
+               return NT_STATUS_ACCESS_DENIED;
+       }
+
        if (psd->owner_sid == NULL) {
                security_info_sent &= ~SECINFO_OWNER;
        }