CVE-2015-7560: s3: smbd: Refuse to get a POSIX ACL on a symlink.
authorJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 19:24:36 +0000 (11:24 -0800)
committerKarolin Seeger <kseeger@samba.org>
Wed, 24 Feb 2016 10:38:52 +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 5b008f53eb275f0b9dbc4d56cdbd675827737f7a..3fca8f2e2cc3dae1269bb4a94d067fb5c791af49 100644 (file)
@@ -5058,6 +5058,13 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
                                uint16 num_file_acls = 0;
                                uint16 num_def_acls = 0;
 
+                               status = refuse_symlink(conn,
+                                               fsp,
+                                               smb_fname->base_name);
+                               if (!NT_STATUS_IS_OK(status)) {
+                                       return status;
+                               }
+
                                if (fsp && fsp->fh->fd != -1) {
                                        file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp,
                                                talloc_tos());