Configure option '--with-ssh1' breaks openssh-7.3p1

rl rainer.laatsch at t-online.de
Wed Aug 3 14:51:17 AEST 2016


Darren: your patch worked for me, thanks a lot for your analysis!
Best regards, Rainer

On 08/03/16 05:51, Darren Tucker wrote:
> On Wed, Aug 03, 2016 at 01:38:15PM +1000, Darren Tucker wrote:
>> OK, with this additional information I can now reproduce it.
>>
>> Based on some quick experiments it seems to be triggered when sshd is
>> built --with-ssh1 and the config does not *load* a Protocol 1 host
>> key.
>
> Looks like it was introducted here:
> https://anongit.mindrot.org/openssh.git/commit/?id=1a31d02b
> wherein
>
> - buffer_put_int(&m, 0);
> + if ((r = sshbuf_put_u32(m, 1)) != 0)
>
> This patch should fix it:
>
> diff --git a/sshd.c b/sshd.c
> index 799c771..8f2b322 100644
> --- a/sshd.c
> +++ b/sshd.c
> @@ -1071,7 +1071,7 @@ send_rexec_state(int fd, struct sshbuf *conf)
>  			fatal("%s: buffer error: %s", __func__, ssh_err(r));
>  	} else
>  #endif
> -		if ((r = sshbuf_put_u32(m, 1)) != 0)
> +		if ((r = sshbuf_put_u32(m, 0)) != 0)
>  			fatal("%s: buffer error: %s", __func__, ssh_err(r));
>
>  #if defined(WITH_OPENSSL) && !defined(OPENSSL_PRNG_ONLY)
>


More information about the openssh-unix-dev mailing list