[openssh-commits] [openssh] 01/02: upstream: If select() fails in ssh_packet_read_seqnr go directly to

git+noreply at mindrot.org git+noreply at mindrot.org
Fri May 25 14:27:53 AEST 2018


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

djm pushed a commit to branch master
in repository openssh.

commit 1da5934b860ac0378d52d3035b22b6670f6a967e
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Fri May 25 03:20:59 2018 +0000

    upstream: If select() fails in ssh_packet_read_seqnr go directly to
    
    the error path instead of trying to read from the socket on the way out,
    which resets errno and causes the true error to be misreported.  ok djm@
    
    OpenBSD-Commit-ID: 2614edaadbd05a957aa977728aa7a030af7c6f0a
---
 packet.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/packet.c b/packet.c
index 574aef60..08a4d661 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.269 2017/12/18 23:13:42 djm Exp $ */
+/* $OpenBSD: packet.c,v 1.270 2018/05/25 03:20:59 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1338,8 +1338,10 @@ ssh_packet_read_seqnr(struct ssh *ssh, u_char *typep, u_int32_t *seqnr_p)
 			    NULL, NULL, timeoutp)) >= 0)
 				break;
 			if (errno != EAGAIN && errno != EINTR &&
-			    errno != EWOULDBLOCK)
-				break;
+			    errno != EWOULDBLOCK) {
+				r = SSH_ERR_SYSTEM_ERROR;
+				goto out;
+			}
 			if (state->packet_timeout_ms == -1)
 				continue;
 			ms_subtract_diff(&start, &ms_remain);

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list