CVE-2015-7560: s3: smbd: Refuse to set EA's on a symlink.
authorJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 19:33:48 +0000 (11:33 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2016 10:38:53 +0000 (11:38 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11648

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/smbd/trans2.c

index 04a13c48c2435fa92b1a6f45db1a5afa15e3de1d..103e601072e19e96a16437812f01e2dbbdd1c1d9 100644 (file)
@@ -658,6 +658,11 @@ NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
                return NT_STATUS_EAS_NOT_SUPPORTED;
        }
 
+       status = refuse_symlink(conn, fsp, smb_fname->base_name);
+       if (!NT_STATUS_IS_OK(status)) {
+               return status;
+       }
+
        status = check_access(conn, fsp, smb_fname, FILE_WRITE_EA);
        if (!NT_STATUS_IS_OK(status)) {
                return status;