carl at bl.echidna.id.au
2001-Feb-20 23:56 UTC
segfault on RH 6.2 with 2.5.1p1 going to a host not in ~/.ssh/known_hosts
I recently upgraded all my boxes to 2.5.1p1 (it was a convenient opportunity to
get rid of a lot of versions all floating around ...) I used the RPM for RH 6.2
from openssh.com. We have an openssl RPM, that I think I got from openssh.com
too
(but that was a while ago :) ) - openssl-0.9.5a-2
I am seeing a problem, when ssh'ing from a redhat 6.2 box to a host that
is not in a user's .ssh/known_hosts file, and /etc/ssh/known_hosts does
not exist :
strace shows this :
[root at ironhand ssh]# strace -u mhurst /usr/bin/ssh -v kaos
.
.
.
open("/etc/ssh/ssh_known_hosts", O_RDONLY) = -1 ENOENT (No such file
or directory)
open("/home/mhurst/.ssh/known_hosts", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=338, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40015000
read(4, "chief,203.16.200.66 1024 35 1575"..., 4096) = 338
read(4, "", 4096) = 0
close(4) = 0
munmap(0x40015000, 4096) = 0
open("/etc/ssh/ssh_known_hosts", O_RDONLY) = -1 ENOENT (No such file
or directory)
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
If I run it as another user, that does have "kaos" in its known_hosts
file, there's
no problem, everything works just fine.
ssh is SUID root, shouldn't it create the /etc/ssh/ssh_known_hosts file?
My upgrade process was simply to do an rpm -Fvh openssh, which seemed to work
just fine.
I'm guessing that at the least, it shouldn't segfault :)
Carl
Seemingly Similar Threads
- further problems with OpenSSH 2.5.1p1 on RH 6.2
- [Bug 1993] ssh tries to add keys to ~/.ssh/known_hosts though StrictHostKeyChecking yes is set
- Support for here documents with sftp client in OpenSSH 2.5.1p1-1 (RH Linux 6.2 [2.2.x kernel])
- 2.5.1p1/p2 PermitRootLogin broke (Solaris)
- Winbind Issue?
