]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authormestre@openbsd.org <mestre@openbsd.org>
Fri, 23 Jun 2017 07:24:48 +0000 (07:24 +0000)
committerDamien Miller <djm@mindrot.org>
Sat, 24 Jun 2017 06:48:39 +0000 (16:48 +1000)
When using the escape sequence &~ the code path is
client_loop() -> client_simple_escape_filter() -> process_escapes() -> fork()
and the pledge for this path lacks the proc promise and therefore aborts the
process. The solution is to just add proc the promise to this specific
pledge.

Reported by Gregoire Jadi gjadi ! omecha.info
Insight with tb@, OK jca@

Upstream-ID: 63c05e30c28209519f476023b65b0b1b0387a05b

clientloop.c

index 612838376991e445282a7c88582aad86ceba1fae..b6443ced8f3fc2a8ecb12c8c40a3fce6d498b3b1 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.299 2017/05/31 09:15:42 deraadt Exp $ */
+/* $OpenBSD: clientloop.c,v 1.300 2017/06/23 07:24:48 mestre Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1255,7 +1255,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
 
        } else {
                debug("pledge: network");
-               if (pledge("stdio unix inet dns tty", NULL) == -1)
+               if (pledge("stdio unix inet dns proc tty", NULL) == -1)
                        fatal("%s pledge(): %s", __func__, strerror(errno));
        }