summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-01-05 11:29:38 -0800
committerKarolin Seeger <kseeger@samba.org>2016-02-24 11:40:01 +0100
commit062876f6dd9db6ce573a69f644571b75eb894efb (patch)
tree00ea68161b889b78ab70da14e3ba60c23b0162b0
parente27f9a419420ed49190fc5ca44e984a021d8de15 (diff)
downloadsamba-062876f6dd9db6ce573a69f644571b75eb894efb.tar.gz
CVE-2015-7560: s3: smbd: Silently return no EA's available on a symlink.
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>
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index e0934670197..64960c1f0cd 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -237,6 +237,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;
@@ -247,6 +248,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.
*/