Bug 138 - Incorrect OpenSSL version requirment?
Summary: Incorrect OpenSSL version requirment?
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Miscellaneous (show other bugs)
Version: -current
Hardware: All All
: P2 major
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
: 139 154 169 186 232 242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-08 03:47 AEDT by Weldon Godfrey
Modified: 2005-04-15 05:52 AEST (History)
8 users (show)

See Also:


Attachments
Patch for openssh 3.4p1, which corrects problems with blowfish + ssh1 + OpenSSL 0.9.5a (854 bytes, patch)
2002-06-29 07:46 AEST, Robert Halubek
no flags Details | Diff
12 (2.67 KB, patch)
2005-04-15 05:52 AEST, geox
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Weldon Godfrey 2002-03-08 03:47:23 AEDT
In the "INSTALL" file of the portible 3.1p1.

It says you will need:
"OpenSSL 0.9.5a or greater:"

On Linux and FreeBSD, I cannot get it to compile with SSL lower than
0.9.6
Comment 1 Ben Lindstrom 2002-03-08 04:49:51 AEDT
*** Bug 139 has been marked as a duplicate of this bug. ***
Comment 2 Ben Lindstrom 2002-03-08 04:51:14 AEDT
Documentation has been corrected.  Yes 0.9.6 is required at this time.
Comment 3 Ben Lindstrom 2002-03-08 04:51:44 AEDT
Documentation has been corrected.  Yes 0.9.6 is required at this time.
Comment 4 Markus Friedl 2002-03-08 06:39:30 AEDT
does this patch help

http://bugzilla.mindrot.org/showattachment.cgi?attach_id=32
Comment 5 Burt Holzman 2002-03-09 04:01:48 AEDT
Markus,

Your patch did allow us to compile with OpenSSL 0.9.5a.
Comment 6 Burt Holzman 2002-03-09 04:24:52 AEDT
... but apparently breaks ssh1 compatibility (or something miscompiled to do so:

$ ssh  -v -1 bar.chm.bnl.gov
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090581f
[ ... ]
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.1p1
debug1: match: OpenSSH_3.1p1 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_3.1p1
[ ... ]
debug1: Sent encrypted session key.
debug1: Installing crc compensation attack detector.
Disconnecting: Corrupted check bytes on input.
debug1: Calling cleanup 0x8060fb8(0x0)
Comment 7 Markus Friedl 2002-03-09 04:35:07 AEDT
what happens if you additionally replace

cipher_init from cipher.c with

void
cipher_init(CipherContext *cc, Cipher *cipher,
    const u_char *key, u_int keylen, const u_char *iv, u_int ivlen,
    int encrypt) 
{   
        static int dowarn = 1;
        EVP_CIPHER *type; 
        int klen;
    
        if (cipher->number == SSH_CIPHER_DES) {
                if (dowarn) { 
                        error("Warning: use of DES is strongly discouraged "
                            "due to cryptographic weaknesses");
                        dowarn = 0; 
                }       
                if (keylen > 8)
                        keylen = 8;
        }               
        cc->plaintext = (cipher->number == SSH_CIPHER_NONE);
        
        if (keylen < cipher->key_len)
                fatal("cipher_init: key length %d is insufficient for %s.",
                    keylen, cipher->name);
        if (iv != NULL && ivlen < cipher->block_size)
                fatal("cipher_init: iv length %d is insufficient for %s.",
                    ivlen, cipher->name);
        cc->cipher = cipher;

        type = (*cipher->evptype)();
        if (type->key_len < cipher->key_len)
                type->key_len = cipher->key_len;
                
        EVP_CIPHER_CTX_init(&cc->evp);
        EVP_CipherInit(&cc->evp, type, (u_char *)key, (u_char *)iv,
            (encrypt == CIPHER_ENCRYPT));
}

Comment 8 Damien Miller 2002-03-09 09:29:35 AEDT
*** Bug 154 has been marked as a duplicate of this bug. ***
Comment 9 Seth Vidal 2002-03-09 09:43:25 AEDT
the cipher_init change does not help the problem
debug1: cipher_init: set keylen (16 -> 32)
debug1: cipher_init: set keylen (16 -> 32)
debug1: Installing crc compensation attack detector.
Disconnecting: Corrupted check bytes on input.
debug1: Calling cleanup 0x8063550(0x0)

still throwing an error on any ssh1 connection
Comment 10 Markus Friedl 2002-03-09 20:30:37 AEDT
this should help for 3des/ssh1 
http://bugzilla.mindrot.org/showattachment.cgi?attach_id=35
Comment 11 Patrick J. LoPresti 2002-03-10 11:03:32 AEDT
With http://bugzilla.mindrot.org/showattachment.cgi?attach_id=35 applied I get
exactly the same failure as with the earlier patch:

host1$ ./ssh -v -1 host2
[stuff elided]
debug1: Encryption type: 3des
debug1: Sent encrypted session key.
debug1: Installing crc compensation attack detector.
Disconnecting: Corrupted check bytes on input.
debug1: Calling cleanup 0x8063930(0x0)


I am running Red Hat 6.2 with all current updates.
Comment 12 Markus Friedl 2002-03-11 06:30:32 AEDT
http://bugzilla.mindrot.org/showattachment.cgi?attach_id=37

^^

this works for me with 3des-ssh1 and aes256-cbc (as used by PUTTY)
Comment 13 Patrick J. LoPresti 2002-03-11 06:41:51 AEDT
Yup, that makes 3des with protocol 1 work.  Thanks!

"blowfish" is still broken, though.  Any chance of fixing it, too?  We have some
automated scripts here which specify Blowfish for speed.  Yes, we should migrate
to protocol 2 and AES.  But not this weekend :-).
Comment 14 Markus Friedl 2002-03-17 04:26:42 AEDT
*** Bug 169 has been marked as a duplicate of this bug. ***
Comment 15 wzeikat 2002-03-17 05:03:24 AEDT
http://bugzilla.mindrot.org/showattachment.cgi?attach_id=37 - how do i apply 
that? if i simply replace cipher.c with it, i get this error:

# make install
(cd openbsd-compat && make)
gcc -g -O2 -Wall -Wpointer-arith -Wno-uninitialized -I. -I. -I/opt  
-DSSHDIR=\"/opt/etc\" -D_PATH_SSH_PROGRAM=\"/opt/bin/ssh\" 
-D_PATH_SSH_ASKPASS_DEFAULT=\"/opt/libexec/ssh-askpass\" 
-D_PATH_SFTP_SERVER=\"/opt/libexec/sftp-server\" -D_PATH_SSH_PIDDIR=\"/var/run\" 
-DSSH_RAND_HELPER=\"/opt/libexec/ssh-rand-helper\" -DHAVE_CONFIG_H -c cipher.c
cipher.c:74: unterminated comment
make: *** [cipher.o] Error 1
make: *** Waiting for unfinished jobs....
make[1]: Entering directory 
`/home/software/install/openssh-3.1p1/openbsd-compat'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/software/install/openssh-3.1p1/openbsd-compat'
Comment 16 wzeikat 2002-03-17 06:25:52 AEDT
thanks, that solved the problem with "make install" for me on RedHat 6.2
Comment 17 wzeikat 2002-03-17 06:29:30 AEDT
In the previous episode (16.03.2002, 13:47:51), Pat said:

> > http://bugzilla.mindrot.org/showattachment.cgi?attach_id=37 - how do i
> apply 
> > that?
> 
> You use the "patch" utility.  Something like this:
> 
>     cd /usr/local/src/openssh-3.1p1
>     patch -p0 < ../patch.txt
> 
>  - Pat
> 

thanks, that solved the problem with "make install" for me on RedHat 6.2
Comment 18 Markus Friedl 2002-03-27 10:28:25 AEDT
*** Bug 186 has been marked as a duplicate of this bug. ***
Comment 19 Ben Lindstrom 2002-04-06 05:25:55 AEST
This should be fixed in the CVS tree.  If this is still an issue please reopen 
before OpenSSH 3.2 goes gold.
Comment 20 Markus Friedl 2002-04-07 02:53:55 AEST
blowfish w/ ssh1 could still be broken. please check.
Comment 21 Eric Seppanen 2002-04-11 08:13:20 AEST
As far as I can tell, blowfish is indeed broken in ssh1.

[eds@ike eds]$ ssh -v -1 postal
OpenSSH_3.1p1, SSH protocols 1.5/2.0, OpenSSL 0x0090581f
... snip some output ...
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.1p1
debug1: match: OpenSSH_3.1p1 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_3.1p1
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (1024 bits).
debug1: Host 'postal' is known and matches the RSA1 host key.
debug1: Found key in /home/eds/.ssh/known_hosts:25
debug1: Encryption type: blowfish
debug1: Sent encrypted session key.
debug1: Installing crc compensation attack detector.
Disconnecting: Corrupted check bytes on input.
debug1: Calling cleanup 0x8062778(0x0)
Comment 22 Patrick J. LoPresti 2002-05-13 00:55:33 AEST
I can confirm that blowfish + ssh1 + OpenSSL 0.9.5a is still broken with this
most recent patch.  I suggest reopening this bug ticket or creating a new one,
unless there are no plans to fix this.
Comment 23 Damien Miller 2002-05-13 15:19:42 AEST
*** Bug 232 has been marked as a duplicate of this bug. ***
Comment 24 Markus Friedl 2002-05-14 00:33:35 AEST
can anyone look into ssh1+bf+old-openssl?
Comment 25 Damien Miller 2002-05-14 13:13:05 AEST
*** Bug 242 has been marked as a duplicate of this bug. ***
Comment 26 Robert Halubek 2002-06-29 07:46:36 AEST
Created attachment 121 [details]
Patch for openssh 3.4p1, which corrects problems with blowfish + ssh1 + OpenSSL 0.9.5a
Comment 27 Damien Miller 2002-09-10 22:27:23 AEST
Patch applied - thanks
Comment 28 Damien Miller 2004-04-14 12:24:18 AEST
Mass change of RESOLVED bugs to CLOSED
Comment 29 geox 2005-04-15 05:52:36 AEST
Created attachment 875 [details]
12