mkj / dropbear

Dropbear SSH

Home Page:https://matt.ucc.asn.au/dropbear/dropbear.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dropbear - Segmentation fault

T72B opened this issue · comments

Hello, all.
I got an issue with Dropbear on Alma Linux.

Dropbear version: v2022.83/v2020.80
Compilation: static

OS: Alma Linux 9.1

Compilation steps:
./configure --enable-static
make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"

Result:
[root@localhost ~]# ./dbclient
Segmentation fault (core dumped)

Journalctl log:

Jul 28 04:02:04 localhost.localdomain kernel: dbclient[3618511]: segfault at 0 ip 00007fee8978d0df sp 00007fff39f0ee70 error 4 in libnss_sss.so.2[7fee8978a000+8000]
Jul 28 04:02:04 localhost.localdomain kernel: Code: 00 00 00 41 89 45 00 e9 7f fe ff ff 0f 1f 80 00 00 00 00 48 8d 3d 01 7f 00 00 e8 fc d2 ff ff 48 8d ac 24 b0 00 00 00 48 89 e>
Jul 28 04:02:04 localhost.localdomain systemd[1]: Started Process Core Dump (PID 3618512/UID 0).
░░ Subject: A start job for unit systemd-coredump@36-3618512-0.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░
░░ A start job for unit systemd-coredump@36-3618512-0.service has finished successfully.
░░
░░ The job identifier is 1280344.
Jul 28 04:02:04 localhost.localdomain systemd-coredump[3618513]: Resource limits disable core dumping for process 3618511 (dbclient).
Jul 28 04:02:04 localhost.localdomain systemd-coredump[3618513]: [🡕] Process 3618511 (dbclient) of user 0 dumped core.
░░ Subject: Process 3618511 (dbclient) dumped core
░░ Defined-By: systemd
░░ Support: https://access.redhat.com/support
░░ Documentation: man:core(5)
░░
░░ Process 3618511 (dbclient) crashed and dumped core.

dbclient/dropbearkey works as expected after deleting sssd-client package from OS.

Please, give me any advice to get static compiled Dropbear tools for Alma Linux.

Was the static binary built on the same system as it's running? (or at least the same library versions?). Glibc doen't make fully static binaries.

You could try compiling against musl libc instead, see https://wiki.musl-libc.org/getting-started.html

I tried to run on the same system where I built Dropbear and also I tried on different systems.
On CentOS7 it works and on Alma 9 in docker too. The docker image doesn't include any sssd packages.

Closing this, seems likely to be an issue with static+nss+glibc.