You are not logged in.
Hello, sshd no longer starts and i get segmentation fault when i try to run it manually.
Problem appeared after issuing pacman -Syu :
One thing that caught my eye is : Start request repeated too quickly
How can i fix this? Thanks a ton guyz..
sshd.service - OpenSSH Daemon
Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled; vendor preset: disabled)
Active: failed (Result: core-dump) since Wed 2017-07-05 22:57:52 EEST; 1min 36s ago
Process: 412 ExecStart=/usr/bin/sshd -D (code=dumped, signal=SEGV)
Main PID: 412 (code=dumped, signal=SEGV)Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Main process exited, code=dumped, status=11/SEGV
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Unit entered failed state.
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Failed with result 'core-dump'.
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Service hold-off time over, scheduling restart.
Ιούλ 05 22:57:52 archlinux systemd[1]: Stopped OpenSSH Daemon.
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Start request repeated too quickly.
Ιούλ 05 22:57:52 archlinux systemd[1]: Failed to start OpenSSH Daemon.
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Unit entered failed state.
Ιούλ 05 22:57:52 archlinux systemd[1]: sshd.service: Failed with result 'core-dump'.
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 399
debug2: parse_server_config: config /etc/ssh/sshd_config len 399
debug3: /etc/ssh/sshd_config:13 setting Port 22
debug3: /etc/ssh/sshd_config:15 setting ListenAddress 0.0.0.0
debug3: /etc/ssh/sshd_config:16 setting ListenAddress ::
debug3: /etc/ssh/sshd_config:21 setting HostKey /etc/ssh/ssh_host_ed25519_key
debug3: /etc/ssh/sshd_config:23 setting AllowUsers lab
debug3: /etc/ssh/sshd_config:39 setting PubkeyAuthentication yes
debug3: /etc/ssh/sshd_config:43 setting AuthorizedKeysFile .ssh/authorized_keys
debug3: /etc/ssh/sshd_config:59 setting PasswordAuthentication no
debug3: /etc/ssh/sshd_config:63 setting ChallengeResponseAuthentication no
debug3: /etc/ssh/sshd_config:84 setting UsePAM yes
debug3: /etc/ssh/sshd_config:93 setting PrintMotd no
debug3: /etc/ssh/sshd_config:112 setting Subsystem sftp /usr/lib/ssh/sftp-server
debug1: sshd version OpenSSH_7.5, OpenSSL 1.1.0f 25 May 2017
(segmentation fault)
Last edited by Zapman (2017-07-07 20:45:21)
Offline
Please paste (using a paste service) your full pacman log.
Offline
Here it is
Offline
debug3: /etc/ssh/sshd_config:112 setting Subsystem sftp /usr/lib/ssh/sftp-server
debug1: sshd version OpenSSH_7.5, OpenSSL 1.1.0f 25 May 2017
(segmentation fault)
[2017-07-04 17:17] [ALPM] warning: /etc/ssh/sshd_config installed as /etc/ssh/sshd_config.pacnew
[2017-07-04 17:17] [ALPM] upgraded openssh (7.3p1-1 -> 7.5p1-2)
Out of curiosity: Why is there
[2014-03-19 14:53] [PACMAN] Running 'pacman -S yaourt'
[2014-03-19 15:10] [PACMAN] Running 'pacman -Sy yaourt'
[2014-03-19 15:10] [PACMAN] synchronizing package lists
[2014-03-19 15:11] [PACMAN] installed yajl (2.0.4-2)
[2014-03-19 15:11] [PACMAN] installed package-query (1.2-2)
[2014-03-19 15:11] [PACMAN] installed yaourt (1.3-1)
Did arch ever have yaourt in the repos??
Online
Did arch ever have yaourt in the repos??
User probably has added the archlinuxfr repository in the past I would think.
Matt
"It is very difficult to educate the educated."
Offline
Yes, thats right. Was it the cause of the problem? What should i do?
Offline
I'd rather look at the deviating sshd_config file (and hope that you removed the archlinuxfr repo ... ;-)
Online
Yes archlinuxfr is long gone. sshd_config
Last edited by Zapman (2017-07-06 17:24:44)
Offline
Nope, looks sane.
Try to gdb sshd.
Online
program received signal SIGSEGV
in __memset_ia32() from /usr/lib/lib.c.so.6
Thats all i got. i don't know much about gdb though
Offline
try "bt" (as in "backtrace)
Online
program received signal SIGSEGV
#0 in __memset_ia32() from /usr/lib/lib.c.so.6
#1 in __explicit_bzero_chk_internal () from /usr/lib/lib.c.so.6
#2 in main()
Offline
google on "sshd __explicit_bzero_chk_internal segfault" :
https://bugs.launchpad.net/ubuntu/+sour … ug/1268719
https://bugs.launchpad.net/ubuntu/+sour … bug/371659
https://bugs.debian.org/cgi-bin/bugrepo … bug=764799
The first two are about messup with your network/hosts and the 3rd about a missing host key.
Online
ssh-keygen -A solved nothing
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
inet 192.168.1.20/24 brd 192.168.1.255 scope global enp0s3
valid_lft forever preferred_lft forever
I dont know what else to do.. i give up. Thank you for your help mate, much appreciated
Offline
Maybe the present /etc/ssh/ssh_host_ed25519_key is garbled?
wc /etc/hosts
Online
9 23 195 /etc/hosts
I also tried pacman -Rsn openssh and removed /etc/ssh. No luck..
Offline
Please paste the output of `pacman -Qi openssh && type ssh`.
Offline
Name : openssh
Version : 7.5p1-2
Description : Free version of the SSH connectivity tools
Architecture : i686
URL : https://www.openssh.com/portable.html
Licenses : custom:BSD
Groups : None
Provides : None
Depends On : krb5 openssl libedit ldns
Optional Deps : xorg-xauth: X11 forwarding [installed]
x11-ssh-askpass: input passphrase in X
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 5.49 MiB
Packager : Gaetan Bisson <bisson@archlinux.org>
Build Date : Mon 20 Mar 2017 11:40:50 PM EET
Install Date : Fri 07 Jul 2017 11:08:37 AM EEST
Install Reason : Explicitly installed
Install Script : No
Validated By : Signaturessh is /usr/bin/ssh
Offline
There're only 3 explicit_bzero calls in sshd.c and only one directly in the main() routine. It deals with the privsep password.
Did you setup a sshd user to run sshd under this UID?
Online
no i did no such thing. At least i dont recall doing it. should i make a user?
edit: confirmed no such user exists
Last edited by Zapman (2017-07-07 14:47:19)
Offline
grep ssh /etc/passwd
No, but I wonder whether it really falls flat nuking a static array or there's sth. so badly broken that it enters the false code branch...
gcc7+ia32 related issue?
Online
any alternatives to openssh???
Offline
I'd not ignore that - the problem will in this case rather not be in sshd itself.
That said: just tried. Runs fine on a i686 CPU - here.
=> "valgrind sshd"
Online
==507== Memcheck, a memory error detector
==507== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==507== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==507== Command: /usr/bin/sshd
==507==
==507== Warning: invalid file descriptor 1024 in syscall close()
==507== Warning: invalid file descriptor 1025 in syscall close()
==507== Warning: invalid file descriptor 1026 in syscall close()
==507== Warning: invalid file descriptor 1027 in syscall close()
==507== Use --log-fd=<number> to select an alternative log fd.
==507== Warning: invalid file descriptor 1028 in syscall close()
==507== Warning: invalid file descriptor 1029 in syscall close()
==507== Warning: invalid file descriptor 1030 in syscall close()
==507==
==507== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==507== Bad permissions for mapped region at address 0x5379D53
==507== at 0x4CC158E: __GI_memset (in /usr/lib/libc-2.25.so)
==507== by 0x4D45F07: __explicit_bzero_chk (in /usr/lib/libc-2.25.so)
==507== by 0x10F268: main (in /usr/bin/sshd)
==507==
==507== HEAP SUMMARY:
==507== in use at exit: 42,289 bytes in 2,685 blocks
==507== total heap usage: 2,822 allocs, 137 frees, 106,399 bytes allocated
==507==
==507== 634 (80 direct, 554 indirect) bytes in 1 blocks are definitely lost in loss record 667 of 683
==507== at 0x482F556: calloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==507== by 0x188D97: ??? (in /usr/bin/sshd)
==507== by 0x10EABE: main (in /usr/bin/sshd)
==507==
==507== LEAK SUMMARY:
==507== definitely lost: 80 bytes in 1 blocks
==507== indirectly lost: 554 bytes in 19 blocks
==507== possibly lost: 0 bytes in 0 blocks
==507== still reachable: 41,655 bytes in 2,665 blocks
==507== suppressed: 0 bytes in 0 blocks
==507== Reachable blocks (those to which a pointer was found) are not shown.
interesting indeed
Offline
Bad permissions for mapped region at address 0x5379D53
That's a bad heap access and that cries it's "explicit_bzero(privsep_pw->pw_passwd" and that means "getpwnam(SSH_PRIVSEP_USER)" is not null ...
And ("tada") the reason is that arch compiles "nobody" as the privsep_user ...
sudo grep nobody /etc/passwd /etc/shadow
The passwd match is safe to post, the shadow output should look like
nobody:x:14871::::::
If it does not, figure why. Do not post password hashes!
Online