]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2015-7560: s3: smbd: Silently return no EA's available on a symlink.
authorJeremy Allison <jra@samba.org>
Tue, 5 Jan 2016 19:29:38 +0000 (11:29 -0800)
committerStefan Metzmacher <metze@samba.org>
Thu, 10 Mar 2016 05:52:23 +0000 (06:52 +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 ac2987c52529099ca652e002860e384155bcfd98..f0a9bde9cec10dc1c2a9514f3b6244619c8a9d1e 100644 (file)
@@ -242,6 +242,7 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
        char **names, **tmp;
        size_t num_names;
        ssize_t sizeret = -1;
+       NTSTATUS status;
 
        if (pnames) {
                *pnames = NULL;
@@ -252,6 +253,14 @@ NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
                return NT_STATUS_OK;
        }
 
+       status = refuse_symlink(conn, fsp, fname);
+       if (!NT_STATUS_IS_OK(status)) {
+               /*
+                * Just return no EA's on a symlink.
+                */
+               return NT_STATUS_OK;
+       }
+
        /*
         * TALLOC the result early to get the talloc hierarchy right.
         */