diff options
author | Ricardo Mestre <mestre@cvs.openbsd.org> | 2019-07-24 08:57:01 +0000 |
---|---|---|
committer | Ricardo Mestre <mestre@cvs.openbsd.org> | 2019-07-24 08:57:01 +0000 |
commit | f400e5def22f5c693a8751b4bb2568808503ce4c (patch) | |
tree | e929067f000569eada2672a62660077c93f83077 /usr.bin/ssh/clientloop.c | |
parent | f5752b5d7f655e24972c2d4003269abc48f6a125 (diff) |
When using a combination of a Yubikey+GnuPG+remote forwarding the gpg-agent
(and options ControlMaster+RemoteForward in ssh_config(5)) then the codepath
taken will call mux_client_request_session -> mm_send_fd -> sendmsg(2). Since
sendmsg(2) is not allowed in that codepath then pledge(2) kills the process.
The solution is to add "sendfd" to pledge(2), which is not too bad considering
a little bit later we reduce pledge(2) to only "stdio proc tty" in that
codepath.
Problem reported and diff provided by Timothy Brown <tbrown at freeshell.org>
OK deraadt@
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r-- | usr.bin/ssh/clientloop.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c index b02f58923bb..56620fbbddd 100644 --- a/usr.bin/ssh/clientloop.c +++ b/usr.bin/ssh/clientloop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clientloop.c,v 1.326 2019/06/28 13:35:04 deraadt Exp $ */ +/* $OpenBSD: clientloop.c,v 1.327 2019/07/24 08:57:00 mestre Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1242,7 +1242,7 @@ client_loop(struct ssh *ssh, int have_pty, int escape_char_arg, if (options.control_master && !option_clear_or_none(options.control_path)) { debug("pledge: id"); - if (pledge("stdio rpath wpath cpath unix inet dns recvfd proc exec id tty", + if (pledge("stdio rpath wpath cpath unix inet dns recvfd sendfd proc exec id tty", NULL) == -1) fatal("%s pledge(): %s", __func__, strerror(errno)); |