Wind River Support Network


LIN6-13832 : OpenSSH failed to login when encryption enable is on

Created: Oct 10, 2017    Updated: Dec 3, 2018
Resolved Date: Nov 27, 2017
Found In Version:
Fix Version:
Severity: Standard
Applicable for: Wind River Linux 6
Component/s: Host Tools


When trying to login using ssh or scp with compression enabled, the connection is closed by the remote server and the following logs are found in /var/log/message: 

Aug 16 11:11:23 overwidth sshd[9834]: Accepted publickey for overwidth from port 41038 ssh2 
Aug 16 11:11:23 overwidth auth.crit sshd[9836]: fatal: buffer_uncompress: inflate returned -3 
(when I use ssh or scp client in Linux with -C option to enable compression) 

Aug 16 11:26:05 overwidth sshd[9967]: Accepted publickey for overwidth from port 49949 ssh2 
Aug 16 11:26:05 overwidth kernel: sshd[9969]: segfault at 8d8bb0 ip 00000037baa07eeb sp 00007ffc0fa5e200 error 4 in[37baa00000+15000] 
(when I use putty and check the Enable compression option) 


No workaround. Just stop using compression.

Steps to Reproduce

Configure a new WRL6 RCPL34 project with the following parameters and the attached custom template template.conf added into the /layers/local/templates/default/ directory:
$ /opt/data1/installs/WRL_60x_CGP_LATEST/wrlinux-6/wrlinux/configure --enable-board=intel-x86-64 --enable-kernel=standard --enable-rootfs=glibc_small --enable-parallel-pkgbuilds=32 --enable-jobs=32 --with-template=feature/initramfs-integrated --enable-sdkmachine=i686 --enable-reconfig=yes
$make export-sdk
$make fs

Start Quemu to test on the local host and login with root/root:
$make start-target
root@qemu0:~# uname -a
Linux qemu0 3.10.62-ltsi-WR6.0.0.34_standard #4 SMP PREEMPT Fri Sep 22 10:58:22 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux

On a different console on the same host, connect via SSH to the local host:
$ ssh -vvv -p 4440 root@localhost
It works. Now disconnect and reconnect again with compression enabled:
$ssh -vvv -C -p 4440 root@localhost 

We can observe in the verbose log that before the remote server closes the SSH connection, compression does get enabled
....debug1: Enabling compression at level 6.
but later the server closes the connection:
....debug1: Exit status -1
debug1: compress outgoing: raw data 91, compressed 84, factor 0.92
debug1: compress incoming: raw data 0, compressed 0, factor 0.00

Here is a tail of /var/log/messages on my Quemu instance:
Oct  9 14:42:50 qemu0 authpriv.notice sshd[287]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=  user=root
Oct  9 14:43:05 qemu0 sshd[287]: Accepted password for root from port 54739 ssh2
Oct  9 14:43:05 qemu0 sshd[287]: pam_unix(sshd:session): session opened for user root by (uid=0)
Oct  9 14:43:05 qemu0 auth.crit sshd[287]: fatal: buffer_uncompress: inflate returned -2
Oct  9 14:43:05 qemu0 sshd[287]: pam_unix(sshd:session): session closed for user root

Other Downloads

Live chat