[Pkg-samba-maint] [samba] 01/02: CVE-2017-7494: rpc_server3: Refuse to open pipe names with / inside

Salvatore Bonaccorso carnil at debian.org
Wed May 24 08:12:08 UTC 2017


This is an automated email from the git hooks/post-receive script.

carnil pushed a commit to branch jessie
in repository samba.

commit 59ff6a76da40d4608e69d739121950f700016d14
Author: Salvatore Bonaccorso <carnil at debian.org>
Date:   Thu May 18 06:52:12 2017 +0200

    CVE-2017-7494: rpc_server3: Refuse to open pipe names with / inside
---
 debian/patches/CVE-2017-7494.patch | 33 +++++++++++++++++++++++++++++++++
 debian/patches/series              |  1 +
 source3/rpc_server/srv_pipe.c      |  5 +++++
 3 files changed, 39 insertions(+)

diff --git a/debian/patches/CVE-2017-7494.patch b/debian/patches/CVE-2017-7494.patch
new file mode 100644
index 0000000..0e7dd8e
--- /dev/null
+++ b/debian/patches/CVE-2017-7494.patch
@@ -0,0 +1,33 @@
+From d2bc9f3afe23ee04d237ae9f4511fbe59a27ff54 Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <vl at samba.org>
+Date: Mon, 8 May 2017 21:40:40 +0200
+Subject: [PATCH] CVE-2017-7494: rpc_server3: Refuse to open pipe names with /
+ inside
+
+Bug: https://bugzilla.samba.org/show_bug.cgi?id=12780
+
+Signed-off-by: Volker Lendecke <vl at samba.org>
+Reviewed-by: Jeremy Allison <jra at samba.org>
+Reviewed-by: Stefan Metzmacher <metze at samba.org>
+---
+ source3/rpc_server/srv_pipe.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
+index 0633b5f..c3f0cd8 100644
+--- a/source3/rpc_server/srv_pipe.c
++++ b/source3/rpc_server/srv_pipe.c
+@@ -475,6 +475,11 @@ bool is_known_pipename(const char *pipename, struct ndr_syntax_id *syntax)
+ {
+ 	NTSTATUS status;
+ 
++	if (strchr(pipename, '/')) {
++		DEBUG(1, ("Refusing open on pipe %s\n", pipename));
++		return false;
++	}
++
+ 	if (lp_disable_spoolss() && strequal(pipename, "spoolss")) {
+ 		DEBUG(10, ("refusing spoolss access\n"));
+ 		return false;
+-- 
+1.9.1
diff --git a/debian/patches/series b/debian/patches/series
index 071db39..3ec3c32 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -27,3 +27,4 @@ bug-12721-4.2.patch
 fix-shadow_copy2-42-backport.patch
 shadow_copy2_tests_42.patch
 Fix-deadlock-when-re-joining-a-domain.patch
+CVE-2017-7494.patch
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index bcd7e5d..40d60a7 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -476,6 +476,11 @@ bool is_known_pipename(const char *pipename, struct ndr_syntax_id *syntax)
 {
 	NTSTATUS status;
 
+	if (strchr(pipename, '/')) {
+		DEBUG(1, ("Refusing open on pipe %s\n", pipename));
+		return false;
+	}
+
 	if (lp_disable_spoolss() && strequal(pipename, "spoolss")) {
 		DEBUG(10, ("refusing spoolss access\n"));
 		return false;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list