CVE-2017-7494: rpc_server3: Refuse to open pipe names with / inside
[samba.git] / source3 / rpc_server / srv_pipe.c
index 39f5fb4..f79fbe2 100644 (file)
@@ -481,6 +481,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;