summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-01-05 11:33:48 -0800
committerKarolin Seeger <kseeger@samba.org>2016-02-24 11:40:02 +0100
commit63ae57f412c5d1b6de20062cfc7c94dabdcae021 (patch)
treeb04d1b551abda090584874ea63712aece3e982dc
parent062876f6dd9db6ce573a69f644571b75eb894efb (diff)
downloadsamba-63ae57f412c5d1b6de20062cfc7c94dabdcae021.tar.gz
CVE-2015-7560: s3: smbd: Refuse to set EA's 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index 64960c1f0cd..ff1ef158d9a 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -659,6 +659,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;