OpenSSH_3.7.1p2 Floating point exception on Opteron

Andy Polyakov appro at fy.chalmers.se
Thu Feb 12 19:51:18 EST 2004


> > I'm getting a floating point exception from ssh on an opteron running Linux
> > (in 64 bit). It happens only when I ssh out to a server not supporting
> > SSHv2 and when its public key is not already in the key file. Right after I
> > answer "yes" to the "Are you sure?" prompt I get the exception.
> >
> > Here is the stack trace:
> >
> > Program received signal SIGFPE, Arithmetic exception
> > 0x0000002a95a0d58c in bn_div_words () from /usr/lib/libcrypto.so.0.9.7
> > (gdb) bt
> > #0  0x0000002a95a0d58c in bn_div_words () from /usr/lib/libcrypto.so.0.9.7
> > #1  0x0000002a95a0a905 in BN_div_word () from /usr/lib/libcrypto.so.0.9.7
> > #2  0x0000002a95a09a09 in BN_bn2dec () from /usr/lib/libcrypto.so.0.9.7
> > #3  0x000000000041ec59 in write_bignum (f=0x5567c0, num=0x8ac7230489e80000) at key.c:368
> > #4  0x000000000041f060 in key_write (key=0x556050, f=0x5567c0) at key.c:504
> > #5  0x0000000000418971 in add_host_to_hostfile (
> 
> This looks like an error inside OpenSSL.

Yes, it was brought to OpenSSL attention last week, see
http://www.aet.tu-cottbus.de/rt2/Ticket/Display.html?id=821. It's typo
in inline assembler line in bn_div_words() in
crypto/bn/asm/x86_64-gcc.c, which should read "divq %4" and not "divq
%3." My comment on the function never being called is obviously
refuted...

>  Does OpenSSL's self-test (ie "make test") pass?

... so I have to refine it. The function in question is never called
during 'make test', which is how the bug slipped through. A.




More information about the openssh-unix-dev mailing list