openssh-7.3_p1-fix-ssh1-with-no-ssh1-host-key.patch 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. https://bugs.gentoo.org/592122
  2. From e600348a7afd6325cc5cd783cb424065cbc20434 Mon Sep 17 00:00:00 2001
  3. From: "dtucker@openbsd.org" <dtucker@openbsd.org>
  4. Date: Wed, 3 Aug 2016 04:23:55 +0000
  5. Subject: [PATCH] upstream commit
  6. Fix bug introduced in rev 1.467 which causes
  7. "buffer_get_bignum_ret: incomplete message" errors when built with WITH_SSH1
  8. and run such that no Protocol 1 ephemeral host key is generated (eg "Protocol
  9. 2", no SSH1 host key supplied). Reported by rainer.laatsch at t-online.de,
  10. ok deraadt@
  11. Upstream-ID: aa6b132da5c325523aed7989cc5a320497c919dc
  12. ---
  13. sshd.c | 4 ++--
  14. 1 file changed, 2 insertions(+), 2 deletions(-)
  15. diff --git a/sshd.c b/sshd.c
  16. index 799c7711f49c..9fc829a91bc8 100644
  17. --- a/sshd.c
  18. +++ b/sshd.c
  19. @@ -1071,7 +1071,7 @@ send_rexec_state(int fd, struct sshbuf *conf)
  20. fatal("%s: buffer error: %s", __func__, ssh_err(r));
  21. } else
  22. #endif
  23. - if ((r = sshbuf_put_u32(m, 1)) != 0)
  24. + if ((r = sshbuf_put_u32(m, 0)) != 0)
  25. fatal("%s: buffer error: %s", __func__, ssh_err(r));
  26. #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY)
  27. --
  28. 2.11.0.rc2