[openssh-commits] [openssh] 03/03: upstream: degrade gracefully if a sftp-server offers the
git+noreply at mindrot.org
git+noreply at mindrot.org
Sun Jun 6 13:24:49 AEST 2021
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit bda270d7fb8522d43c21a79a4b02a052d7c64de8
Author: djm at openbsd.org <djm at openbsd.org>
Date: Sun Jun 6 03:17:02 2021 +0000
upstream: degrade gracefully if a sftp-server offers the
limits at openssh.com extension but fails when the client tries to invoke it.
Reported by Hector Martin via bz3318
OpenBSD-Commit-ID: bd9d1839c41811616ede4da467e25746fcd9b967
---
sftp-client.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/sftp-client.c b/sftp-client.c
index cadaee6b..1167027f 100644
--- a/sftp-client.c
+++ b/sftp-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.c,v 1.142 2021/04/03 06:18:41 djm Exp $ */
+/* $OpenBSD: sftp-client.c,v 1.143 2021/06/06 03:17:02 djm Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm at openbsd.org>
*
@@ -577,8 +577,12 @@ do_limits(struct sftp_conn *conn, struct sftp_limits *limits)
if (id != msg_id)
fatal("ID mismatch (%u != %u)", msg_id, id);
if (type != SSH2_FXP_EXTENDED_REPLY) {
- fatal("Expected SSH2_FXP_EXTENDED_REPLY(%u) packet, got %u",
+ debug_f("expected SSH2_FXP_EXTENDED_REPLY(%u) packet, got %u",
SSH2_FXP_EXTENDED_REPLY, type);
+ /* Disable the limits extension */
+ conn->exts &= ~SFTP_EXT_LIMITS;
+ sshbuf_free(msg);
+ return 0;
}
memset(limits, 0, sizeof(*limits));
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list