The 16/01/2015 17:30, Dmitry Orlov wrote:
> Hi :)
>
> In last snapshot (ISO). All ssh* configs are default
>
> OpenBSD 5.7-beta (GENERIC) #731: Fri Jan 16 01:37:07 MST 2015
>
> Welcome to OpenBSD: The proactively secure Unix-like operating system.
>
> Please use the sendbug(1) utility to report bugs in the system.
> Before reporting a bug, please try to reproduce it with the latest
> version of the code. With bug reports, please try to ensure that
> enough information to reproduce the problem is enclosed, and if a
> known fix for it exists, include that as well.
>
> # rm -v /etc/ssh/*key*
> rm: unknown option -- v
> usage: rm [-dfiPRr] file ...
> # rm /etc/ssh/*key*
> # ls /etc/ssh/
> ssh_config sshd_config
> # ssh-keygen -A
> ssh-keygen: generating new host keys: RSA1 write key failed
> ssh-keygen: generating new host keys: RSA write key failed
> ssh-keygen: generating new host keys: DSA write key failed
> ssh-keygen: generating new host keys: ECDSA write key failed
> ssh-keygen: generating new host keys: ED25519 write key failed
> # ssh-keygen -A
> #
>
I reproduced the error, it happens the same to me, but it actually
generates the keys, but you get that error. I did a trace. I'm rather
new in OpenBSD, looks like it could be related with mprotect(2), but not
sure. Maybe you should submit the bug:
2620 ssh-keygen CALL mprotect(0x5913d95f000,0x2000,0x3<PROT_READ|PROT_WRITE>)
2620 ssh-keygen RET mprotect 0
2620 ssh-keygen CALL mprotect(0x5913d95f000,0x2000,0x1<PROT_READ>)
2620 ssh-keygen RET mprotect 0
2620 ssh-keygen CALL sigprocmask(SIG_SETMASK,0<>)
2620 ssh-keygen RET sigprocmask ~0x10100<SIGKILL|SIGSTOP>
2620 ssh-keygen CALL fstat(3,0x7f7ffffd2360)
2620 ssh-keygen STRU struct stat { dev=1104, ino=182877, mode=-rw-r----- ,
nlink=1, uid=0<"root">, gid=0<"wheel">, rdev=0, atime=1421529614<"Jan 17
21:20:14 2015">.111741058, mtime=1421529614<"Jan 17 21:20:14 2015">.111741058,
ctime=1421529614<"Jan 17 21:20:14 2015">.111741058, size=0, blocks=0,
blksize=16384, flags=0x0, gen=0xa991ad63 }
2620 ssh-keygen RET fstat 0
2620 ssh-keygen CALL
mmap(0,0x4000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,-1,0)
2620 ssh-keygen RET mmap 6134226927616/0x5943c6ac000
2620 ssh-keygen CALL write(2,0x5913d737da1,0x11)
2620 ssh-keygen GIO fd 2 wrote 17 bytes
"write key failed
"
2620 ssh-keygen RET write 17/0x11
2620 ssh-keygen CALL write(3,0x5943c6ac000,0x17c)
2620 ssh-keygen GIO fd 3 wrote 380 bytes
"ssh-rsa ---DELETED---
"
2620 ssh-keygen RET write 380/0x17c
2620 ssh-keygen CALL close(3)
Regards,
--
Oriol Demaria
0x58415679