mkj / dropbear Goto Github PK
View Code? Open in Web Editor NEWDropbear SSH
Home Page: https://matt.ucc.asn.au/dropbear/dropbear.html
License: Other
Dropbear SSH
Home Page: https://matt.ucc.asn.au/dropbear/dropbear.html
License: Other
Hello,
the following bug can be observed with Dropbear v2020.81 on armv7l and an OpenSSH_8.9p1 client. It was also observed with older versions of server and client. Unfortunately I'm not able to compile and test a newer version of Dropbear.
When the total size of variables sent by the client via the SendEnv option exceed a certain size, the connection will fail with a Broken pipe. The size seems to be between 30 kB and 40 kB. OpenSSH servers do not have this problem.
Repro:
> export test123=$(dd if=/dev/urandom bs=1000 count=30)
30+0 records in
30+0 records out
30000 bytes (30 kB, 29 KiB) copied, 0.000698384 s, 43.0 MB/s
> ssh -o SendEnv=test123 server
[root@server ~]# yay
[root@server ~]# exit
Connection to server closed.
> export test123=$(dd if=/dev/urandom bs=1000 count=40)
40+0 records in
40+0 records out
40000 bytes (40 kB, 39 KiB) copied, 0.000916885 s, 43.6 MB/s
> ssh -o SendEnv=test123 server
client_loop: send disconnect: Broken pipe
Thanks!
Hi Matt,
you implemented the "-a" option to allow remote hosts to connect to forwarded ports and this is fine.
I'm using OpenSSH and I'd like to migrate to your lightweight implementation, but I need the "GatewayPorts=yes" behaviour of OpenSSH:
GatewayPorts=no (EQUIVALENT TO YOUR -a UNSET)
This prevents connecting to forwarded ports from outside the server computer.
GatewayPorts=yes (MISSING BEHAVIOUR)
This allows anyone to connect to the forwarded ports. If the server is on the public Internet, anyone on the Internet can connect to the port.
GatewayPorts=clientspecified (EQUIVALENT TO YOUR -a SET)
This means that the client can specify an IP address from which connections to the port are allowed.
For example the Dropbear server is launched with -a option, so if I execute ssh client like this:
ssh -fN -R 8192:localhost:80 [email protected]
the missing part will be treated as:
ssh -fN -R localhost:8192:localhost:80 [email protected]
But the expected result would be (adding GatewayPorts=yes):
ssh -fN -R 0.0.0.0:8192:localhost:80 [email protected]
Could you manage this situation? Thank you!
After the account password expires, the user must forcibly change the password before continuing to use it.
The compilation ends with an error:
a - bn_s_mp_sqr.o
a - bn_s_mp_sqr_fast.o
a - bn_s_mp_sub.o
a - bn_s_mp_toom_mul.o
a - bn_s_mp_toom_sqr.o
ranlib libtommath.a
make[1]: Leaving directory '/work/RO/dropbear-2020.81/libtommath'
gcc -c -I./libtomcrypt/src/headers/ -DLOCALOPTIONS_H_EXISTS -I. -I. -Os -W -Wall -Wno-pointer-sign -fno-strict-overflow -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -DDROPBEAR_SERVER -DDROPBEAR_CLIENT dbutil.c -o dbutil.o
In file included from includes.h:141,
from dbutil.c:64:
compat.h:44:7: error: conflicting types for 'basename'
char basename(const char path);
^~~~~~~~
In file included from includes.h:122,
from dbutil.c:64:
/usr/include/libgen.h:60:14: note: previous declaration of 'basename' was here
extern char *basename(char *);
^~~~~~~~
make: *** [Makefile:152: dbutil.o] Error 1
I have AIX 7.1
and some packages from AIX Linux Toolbox (including gcc version 8.3.0)
Just trying to compile this over MacOS 10.15. After ./configure and make, I received a compilation error as "Undefined symbols for architecture x86_64:"
I've also tried ./configure flags and some changes to the default_options.h but that didn't help.
The rest of the error message below:
ld: warning: ignoring file libtommath/libtommath.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )
ld: warning: ignoring file libtomcrypt/libtomcrypt.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )
Undefined symbols for architecture x86_64:
"_aes_desc", referenced from:
_crypto_init in crypto_desc.o
_dropbear_aes256 in common-algo.o
"_base64_decode", referenced from:
_cmp_base64_key in signkey.o
"_base64_encode", referenced from:
_sign_key_fingerprint in signkey.o
"_crypt_argchk", referenced from:
_dropbear_prng_read in ltc_prng.o
_dropbear_prng_export in ltc_prng.o
"_ctr_decrypt", referenced from:
_dropbear_mode_ctr in common-algo.o
"_ctr_encrypt", referenced from:
_dropbear_mode_ctr in common-algo.o
"_ctr_start", referenced from:
_dropbear_big_endian_ctr_start in common-algo.o
"_ecc_ansi_x963_export", referenced from:
_buf_put_ecc_raw_pubkey_string in ecc.o
"_ecc_free", referenced from:
_buf_get_pub_key in signkey.o
_buf_get_priv_key in signkey.o
_sign_key_free in signkey.o
_buf_get_ecc_raw_pubkey in ecc.o
_buf_get_ecdsa_priv_key in ecdsa.o
_buf_put_ecdsa_sign in ecdsa.o
_free_kexecdh_param in common-kex.o
...
"_ecc_make_key_ex", referenced from:
_gen_ecdsa_priv_key in ecdsa.o
_buf_put_ecdsa_sign in ecdsa.o
_gen_kexecdh_param in common-kex.o
"_find_cipher", referenced from:
_send_msg_newkeys in common-kex.o
"_find_hash", referenced from:
_send_msg_newkeys in common-kex.o
"_hmac_done", referenced from:
_make_mac in packet.o
"_hmac_init", referenced from:
_make_mac in packet.o
"_hmac_process", referenced from:
_make_mac in packet.o
"_ltc_deinit_multi", referenced from:
_buf_put_ecdsa_sign in ecdsa.o
_buf_ecdsa_verify in ecdsa.o
"_ltc_ecc_del_point", referenced from:
_dropbear_ecc_shared_secret in ecc.o
_buf_ecdsa_verify in ecdsa.o
"_ltc_ecc_new_point", referenced from:
_dropbear_ecc_shared_secret in ecc.o
_buf_ecdsa_verify in ecdsa.o
"_ltc_ecc_sets", referenced from:
_dropbear_ecc_fill_dp in ecc.o
"_ltc_init_multi", referenced from:
_buf_put_ecdsa_sign in ecdsa.o
_buf_ecdsa_verify in ecdsa.o
"_ltc_mp", referenced from:
_dropbear_ecc_shared_secret in ecc.o
_buf_put_ecdsa_sign in ecdsa.o
_buf_ecdsa_verify in ecdsa.o
_crypto_init in crypto_desc.o
"_ltm_desc", referenced from:
_crypto_init in crypto_desc.o
"_mp_add", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
"_mp_add_d", referenced from:
_gen_dss_priv_key in gendss.o
"_mp_addmod", referenced from:
_buf_put_dss_sign in dss.o
"_mp_clear", referenced from:
_buf_put_dss_sign in dss.o
_m_mp_free_multi in bignum.o
_buf_put_rsa_sign in rsa.o
_dropbear_ecc_shared_secret in ecc.o
_getrsaprime in genrsa.o
_session_cleanup in common-session.o
_send_msg_newkeys in common-kex.o
...
"_mp_clear_multi", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
_buf_rsa_verify in rsa.o
_buf_put_rsa_sign in rsa.o
_buf_get_ecc_raw_pubkey in ecc.o
_gen_dss_priv_key in gendss.o
_gen_rsa_priv_key in genrsa.o
...
"_mp_cmp", referenced from:
_buf_get_dss_pub_key in dss.o
_buf_dss_verify in dss.o
_buf_rsa_verify in rsa.o
_gen_random_mpint in dbrandom.o
_buf_get_ecc_raw_pubkey in ecc.o
_kexdh_comb_key in common-kex.o
"_mp_cmp_d", referenced from:
_buf_get_dss_pub_key in dss.o
_buf_dss_verify in dss.o
_gen_random_mpint in dbrandom.o
_buf_get_ecc_raw_pubkey in ecc.o
_gen_dss_priv_key in gendss.o
_getrsaprime in genrsa.o
_kexdh_comb_key in common-kex.o
...
"_mp_copy", referenced from:
_dropbear_ecc_shared_secret in ecc.o
"_mp_count_bits", referenced from:
_buf_putmpint in buffer.o
_buf_get_dss_pub_key in dss.o
_buf_get_rsa_pub_key in rsa.o
_gen_random_mpint in dbrandom.o
_gen_dss_priv_key in gendss.o
_gen_rsa_priv_key in genrsa.o
_getrsaprime in genrsa.o
...
"_mp_div", referenced from:
_gen_dss_priv_key in gendss.o
"_mp_div_2", referenced from:
_gen_kexdh_param in common-kex.o
"_mp_exptmod", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
_buf_rsa_verify in rsa.o
_buf_put_rsa_sign in rsa.o
_gen_dss_priv_key in gendss.o
_gen_kexdh_param in common-kex.o
_kexdh_comb_key in common-kex.o
...
"_mp_from_ubin", referenced from:
_buf_getmpint in buffer.o
_bytes_to_mp in bignum.o
_buf_rsa_verify in rsa.o
_buf_get_ecc_raw_pubkey in ecc.o
"_mp_gcd", referenced from:
_getrsaprime in genrsa.o
"_mp_init", referenced from:
_m_mp_init in bignum.o
_m_mp_init_multi in bignum.o
_m_mp_alloc_init_multi in bignum.o
(maybe you meant: _m_mp_init, _m_mp_init_multi )
"_mp_invmod", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
_buf_put_rsa_sign in rsa.o
_gen_rsa_priv_key in genrsa.o
"_mp_lcm", referenced from:
_gen_rsa_priv_key in genrsa.o
"_mp_mod", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
_buf_get_ecc_raw_pubkey in ecc.o
_gen_dss_priv_key in gendss.o
"_mp_mul", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
_gen_rsa_priv_key in genrsa.o
"_mp_mul_d", referenced from:
_gen_dss_priv_key in gendss.o
"_mp_mulmod", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
_buf_put_rsa_sign in rsa.o
"_mp_prime_is_prime", referenced from:
_gen_dss_priv_key in gendss.o
"_mp_prime_next_prime", referenced from:
_gen_dss_priv_key in gendss.o
_getrsaprime in genrsa.o
"_mp_prime_rabin_miller_trials", referenced from:
_gen_dss_priv_key in gendss.o
_getrsaprime in genrsa.o
"_mp_rand_source", referenced from:
_crypto_init in crypto_desc.o
"_mp_read_radix", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
_dropbear_ecc_shared_secret in ecc.o
"_mp_set", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
_gen_dss_priv_key in gendss.o
"_mp_set_ul", referenced from:
_gen_rsa_priv_key in genrsa.o
_gen_kexdh_param in common-kex.o
"_mp_sqr", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
"_mp_sub", referenced from:
_buf_get_ecc_raw_pubkey in ecc.o
_gen_dss_priv_key in gendss.o
"_mp_sub_d", referenced from:
_gen_dss_priv_key in gendss.o
_getrsaprime in genrsa.o
_gen_kexdh_param in common-kex.o
_kexdh_comb_key in common-kex.o
"_mp_to_ubin", referenced from:
_buf_putmpint in buffer.o
_buf_put_dss_sign in dss.o
_buf_put_rsa_sign in rsa.o
"_mp_ubin_size", referenced from:
_buf_put_dss_sign in dss.o
_buf_rsa_verify in rsa.o
_rsa_pad_em in rsa.o
_buf_put_rsa_sign in rsa.o
"_mp_zero", referenced from:
_buf_getmpint in buffer.o
"_register_cipher", referenced from:
_crypto_init in crypto_desc.o
"_register_hash", referenced from:
_crypto_init in crypto_desc.o
"_register_prng", referenced from:
_crypto_init in crypto_desc.o
"_sha1_desc", referenced from:
_rsa_pad_em in rsa.o
l___const.crypto_init.reghashes in crypto_desc.o
_dropbear_sha1 in common-algo.o
_kex_dh_group14_sha1 in common-algo.o
"_sha1_done", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
"_sha1_init", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
"_sha1_process", referenced from:
_buf_dss_verify in dss.o
_buf_put_dss_sign in dss.o
"_sha256_desc", referenced from:
_rsa_pad_em in rsa.o
_ecc_curve_nistp256 in ecc.o
l___const.crypto_init.reghashes in crypto_desc.o
_dropbear_sha2_256 in common-algo.o
_kex_curve25519 in common-algo.o
_kex_ecdh_nistp256 in common-algo.o
_kex_dh_group14_sha256 in common-algo.o
...
"_sha256_done", referenced from:
_sign_key_fingerprint in signkey.o
_addrandom in dbrandom.o
_seedrandom in dbrandom.o
_genrandom in dbrandom.o
_buf_sk_ecdsa_verify in sk-ecdsa.o
_buf_sk_ed25519_verify in sk-ed25519.o
"_sha256_init", referenced from:
_sign_key_fingerprint in signkey.o
_addrandom in dbrandom.o
_seedrandom in dbrandom.o
_genrandom in dbrandom.o
_buf_sk_ecdsa_verify in sk-ecdsa.o
_buf_sk_ed25519_verify in sk-ed25519.o
"_sha256_process", referenced from:
_sign_key_fingerprint in signkey.o
_addrandom in dbrandom.o
_seedrandom in dbrandom.o
_genrandom in dbrandom.o
_buf_sk_ecdsa_verify in sk-ecdsa.o
_buf_sk_ed25519_verify in sk-ed25519.o
"_sha384_desc", referenced from:
_ecc_curve_nistp384 in ecc.o
l___const.crypto_init.reghashes in crypto_desc.o
_kex_ecdh_nistp384 in common-algo.o
"_sha512_desc", referenced from:
_ecc_curve_nistp521 in ecc.o
l___const.crypto_init.reghashes in crypto_desc.o
_kex_ecdh_nistp521 in common-algo.o
"_sha512_done", referenced from:
_crypto_hash in curve25519.o
_dropbear_ed25519_sign in curve25519.o
_dropbear_ed25519_verify in curve25519.o
"_sha512_init", referenced from:
_crypto_hash in curve25519.o
_dropbear_ed25519_sign in curve25519.o
_dropbear_ed25519_verify in curve25519.o
"_sha512_process", referenced from:
_crypto_hash in curve25519.o
_dropbear_ed25519_sign in curve25519.o
_dropbear_ed25519_verify in curve25519.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dropbear] Error 1
Thanks for the reply.
I am cross-compiling dropbear on Ubuntu host for arm-linux-gnueabihf target. I had been using Ubuntu Bionic (glibc 2.27) building dropbear release v2017.75. I want to upgrade to Ubuntu Focal host which uses glibc 2.31 and build the most recent dropbear release. It seems versions 2018+ fail on Ubuntu Focal host with the following:
During configure
configure: Using bundled libtomcrypt and libtommath
configure:
configure: crypt() not available, dropbear server will not have password authentication
configure:
configure: Now edit options.h to choose features.
Then during make:
make -C libtomcrypt
make[1]: Entering directory '/root/etx8-linux/recovery/dropbear/libtomcrypt'
arm-linux-gnueabihf-gcc -Isrc/headers/ -I./src/headers/ -I../ -I./../ -DLTC_SOURCE -I../libtommath/ -I./../libtommath/ -I./libtomcrypt/src/headers/ -DLOCALOPTIONS_H_EXISTS -I. -I. -Os -W -Wall -Wno-pointer-sign -fno-strict-overflow -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=2 -DDROPBEAR_SERVER -DDROPBEAR_CLIENT -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes.o
In file included from ../options.h:23,
from src/headers/tomcrypt_dropbear.h:2,
from src/headers/tomcrypt_custom.h:13,
from src/headers/tomcrypt.h:22,
from src/ciphers/aes/aes.c:31:
../sysoptions.h:237:3: error: #error "DROPBEAR_SVR_PASSWORD_AUTH requires `crypt()'."
237 | #error "DROPBEAR_SVR_PASSWORD_AUTH requires `crypt()'."
| ^~~~~
make[1]: *** [Makefile:246: src/ciphers/aes/aes.o] Error 1
make[1]: Leaving directory '/root/etx8-linux/recovery/dropbear/libtomcrypt'
make: *** [Makefile:209: libtomcrypt/libtomcrypt.a] Error 2
Errors encountered, aborting!
As I understand from this thread crypt is no longer bundled in glibc. I have tried the various solutions in that post but to no avail. Wondering if someone can help me with directions for building against glibc 2.31.
I have tried adding the following to localoptions.h
but it doesn't seem to help:
#define _GNU_SOURCE
#include <crypt.h>
My configure and make commands look like this:
./configure --host=arm-linux-gnueabihf --prefix=/usr \
--disable-syslog \
--enable-bundled-libtom \
--disable-lastlog \
--disable-utmp \
--disable-utmpx \
--disable-wtmp \
--disable-wtmpx \
--disable-zlib
make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp"
I think maybe I need to add CFLAGS
and LDFLAGS
?
Issue occurs in this situation:
trusted hosts file contains a host key for a target, with format type: ecdsa-sha2-nistp256
new version of ssh now supports host key format: ssh-ed25519
when ssh tries to connect, it will use host key format ssh-ed25519, and will not find it in the known_hosts file, and proceed to say the target is not in the trusted hosts file.
However, the target is in fact in the trusted host file, just under a different key format.
Perhaps ssh should check the host key format used in the trusted hosts file, and try to verify host using that key/format.
Using ssh-audit on dropbear 2020.81 gave some recommendations for hardening:
With openssh, these can be toggled in the config, but I understand they need to be removed in the source for dropbear. What do you think about the report below?
# general
(gen) banner: SSH-2.0-dropbear
(gen) compatibility: OpenSSH 7.4+, Dropbear SSH 2018.76+
(gen) compression: disabled
# key exchange algorithms
(kex) curve25519-sha256 -- [info] available since OpenSSH 7.4, Dropbear SSH 2018.76
(kex) [email protected] -- [info] available since OpenSSH 6.5, Dropbear SSH 2013.62
(kex) diffie-hellman-group14-sha256 -- [info] available since OpenSSH 7.3, Dropbear SSH 2016.73
(kex) diffie-hellman-group14-sha1 -- [warn] using weak hashing algorithm
`- [info] available since OpenSSH 3.9, Dropbear SSH 0.53
(kex) [email protected] -- [info] available since Dropbear SSH 2013.57
# host-key algorithms
(key) ssh-ed25519 -- [info] available since OpenSSH 6.5
(key) rsa-sha2-256 (2048-bit) -- [info] available since OpenSSH 7.2
(key) ssh-rsa (2048-bit) -- [fail] using weak hashing algorithm
`- [info] available since OpenSSH 2.5.0, Dropbear SSH 0.28
`- [info] a future deprecation notice has been issued in OpenSSH 8.2: https://www.openssh.com/txt/release-8.2
# encryption algorithms (ciphers)
(enc) [email protected] -- [info] available since OpenSSH 6.5
`- [info] default cipher since OpenSSH 6.9.
(enc) aes128-ctr -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52
(enc) aes256-ctr -- [info] available since OpenSSH 3.7, Dropbear SSH 0.52
# message authentication code algorithms
(mac) hmac-sha1 -- [warn] using encrypt-and-MAC mode
`- [warn] using weak hashing algorithm
`- [info] available since OpenSSH 2.1.0, Dropbear SSH 0.28
(mac) hmac-sha2-256 -- [warn] using encrypt-and-MAC mode
`- [info] available since OpenSSH 5.9, Dropbear SSH 2013.56
# fingerprints
(fin) ssh-ed25519: SHA256:YyovHVKyDg7iB9XhdHvKIIFxCbExKgI97M3sFcdtVcA
(fin) ssh-rsa: SHA256:n6d1G3um65lzJUvWp2pLkHwjAdyndx9Wksxd+pDkPgA
# algorithm recommendations
(rec) -ssh-rsa -- key algorithm to remove
(rec) -diffie-hellman-group14-sha1 -- kex algorithm to remove
(rec) -hmac-sha1 -- mac algorithm to remove
(rec) -hmac-sha2-256 -- mac algorithm to remove
# additional info
(nfo) For hardening guides on common OSes, please see: <https://www.ssh-audit.com/hardening_guides.html>
Dropbear v2022.82
Wireguard v1.0.20200827
Cortex A5
Usually the kernel spits out "Unable to handle kernel paging request at virtual address ..." but occasionally it's "Unable to handle kernel NULL pointer dereference at virtual address ..."
I have stack traces, but they don't look especially useful.
Looking at signkey.c
dropbear only support SHA1 or MD5 checksums, would it be possible to add SHA256 support?
Hello, Is it possible to hide the DHCP info on the unlock screen?
The project's wiki page (and most of the online resources) point to matt.ucc.asn.au/dropbear/dropbear.html as the default project homepage (including the project release archives). As a matter of fact, even the description of this GitLab repository points to the same page. It seems like that domain is completely down (and has been for a while) while there is active development here. Can a maintainer clarify this so we can tweak things accordingly at the level of build system integrations?
loginrec.c: In function 'utmpx_perform_login':
loginrec.c:832:31: error: 'ut' undeclared (first use in this function); did you mean 'utx'?
if (!utmpx_write_direct(li, &ut)) {
^~
utx
loginrec.c:832:31: note: each undeclared identifier is reported only once for each function it appears in
Workaround: --disable-utmp --disable-utmpx
When I log in with my ed25519 key, the log shows:
authpriv.notice dropbear[2480]: Pubkey auth succeeded for 'root' with key sha1!! XX:XX:XX from 192.168.0.2:43248
I think what it's saying is that it generated a sha1 fingerprint from my Ed25519 key, but the "!!" give the impression that the key is somehow using sha1. Can you improve the message not to confuse people? Maybe you can also add the keytype, and show the fingerprint as sha256.
Probably it is expected due to limited PAM support in Dropbear, but I didn't want to miss reporting it, just in case it is easy to implement without causing much overhead and loosing the light nature of Dropbear.
In a Dropbear SSH session on a systemd-driven system, DBUS_SESSION_BUS_ADDRESS
is not set, which allows to run systemd services in user mode via systemctl --user ...
. I'm not sure about details, but it's the libpam-systemd
> dbus
> systemd-logind
stack which normally enables this, so I guess it means to implement support for the pam_systemd
module.
Using latest dropbear 2022.82, with only one option defined in localoptions.h:
#define DROPBEAR_SVR_PUBKEY_AUTH 0
The build fails with the following error message:
In file included from session.h:32:0,
from svr-chansession.c:28:
auth.h: In function 'svr_pubkey_set_forced_command':
auth.h:57:67: warning: unused parameter 'chansess' [-Wunused-parameter]
static inline void svr_pubkey_set_forced_command(struct ChanSess *chansess) { }
^
svr-chansession.c: In function 'execchild':
svr-chansession.c:1043:26: error: 'struct AuthState' has no member named 'pubkey_info'
if (ses.authstate.pubkey_info != NULL) {
^
svr-chansession.c:1044:58: error: 'struct AuthState' has no member named 'pubkey_info'
addnewvar("SSH_PUBKEYINFO", ses.authstate.pubkey_info);
^
make: *** [svr-chansession.o] Error 1
OpenSSH ships with a post quantum key exchange algorithm enabled by default. It would be great if Dropbear also supported it. Thanks!
OpenSSH 9.0/9.0p1 (2022-04-08)
ssh(1), sshd(8): use the hybrid Streamlined NTRU Prime + x25519 key
exchange method by default ([email protected]
).
The NTRU algorithm is believed to resist attacks enabled by future
quantum computers and is paired with the X25519 ECDH key exchange
(the previous default) as a backstop against any weaknesses in
NTRU Prime that may be discovered in the future. The combination
ensures that the hybrid exchange offers at least as good security
as the status quo.
We are making this change now (i.e. ahead of cryptographically-
relevant quantum computers) to prevent "capture now, decrypt
later" attacks where an adversary who can record and store SSH
session ciphertext would be able to decrypt it once a sufficiently
advanced quantum computer is available.
There's a very long list of files to scroll past before getting to the README.
I highly recommend organizing the repo's presentation by putting the source code in 'src' and updating the Makefile / INSTALL files.
please add a standalone version of OpenSSH's sftp-server program, so a make like:
./configure --enable-static
make PROGRAMS="dropbear dbclient scp" MULTI=1
for make a static dropbearmulti with sftp-server func is possible.
So, I was considering using dropbear as my SSH server, but I encountered this problem. When I SSH onto a machine and try to develop/debug stuff, I find out that coredumps are not only disabled for that session, but also that changing it is not allowed.
I discovered that the following source code line is the culprit:
Line 56 in 26feb8f
The original idea (to disable coredumps for dropbear
itself, so that if it crashes, it doesn't end up revealing sensitive information in the coredump), seems very reasonable, but it seems like this setting also spreads onto whatever session is being launched under it, which in turn makes me unable to get coredumps from any of the programs I'm running in it.
Is there a way to prevent that from happening, or to otherwise re-enable core dumps for the session?
At the moment local port forwarding can either be disabled completely or allowed to all destinations. With the permitopen option it would be possible to limit local port forwarding only to selected host(s) and port(s).
I am getting this error when running dropbear on initrd.
"dropbear -E" command.
Can we add an option to dropbear (say, -o or --allow-root-only) flag to allow only root login ?
Or, accept the list of users to allow login using another option either --only-allow-users "root,postgres" or --only-allow-group root,group1
This is useful when we use dropbear as a secondary emergency ssh server, and only restricted set of users should be allowed to login for emergency troubleshooting.
I want to test out an application that uses SSH to access devices which use the clish
CLI project. I'm trying to create a docker container that runs Dropbear.
The application tries to log in as a user called tech
. Here is the contents of my /etc/passwd
file:
root:x:0:0:root:/root:/bin/sh
nobody:x:502:502:nobody,,,:/home/nobody:/bin/false
tech:x:0:0:tech,,,:/home/tech:/bin/sh
In case you're wondering why the tech
user has a UID of 0, it's because in the custom CLI that's being run in the container via clish
, the tech
user needs root privileges for certain commands.
So far, this is working well for the root user, as shown below
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 24576 rmax 32759
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
** LOGIN SUCCEEDS HERE **
However, when trying to log in as the tech
user, the connection succeeds, but is then immediately terminated.
Here is the output of ssh
with -vvv
after the connection succeeds
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 24576 rmax 32759
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
**LOGIN SUCCEEDS HERE, THEN TERMINATES**
debug3: receive packet: type 96
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: chan_shutdown_write (i0 o1 sock -1 wfd 5 efd 6 [write])
debug2: channel 0: output drain -> closed
debug3: receive packet: type 98
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug3: receive packet: type 97
debug2: channel 0: rcvd close
debug2: channel 0: chan_shutdown_read (i0 o3 sock -1 wfd 4 efd 6 [write])
debug2: channel 0: input open -> closed
debug3: channel 0: will not send data after close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug3: send packet: type 97
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i3/0 o3/0 e[write]/0 fd -1/-1/6 sock -1 cc -1)
debug3: send packet: type 1
debug3: fd 1 is not O_NONBLOCK
Connection to 172.17.0.3 closed.
Transferred: sent 2840, received 2688 bytes, in 0.0 seconds
Bytes per second: sent 807603.8, received 764379.9
debug1: Exit status 1
Any help debugging this would be appreciated.
As detailed in #136, ed25519 keys still don't work with 2022.82
I generated a key in openssh format, converted it to dropbear format and back again and the result is different:
@@ -1,7 +1,7 @@
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAMwAAAAtz
c2gtZWQyNTUxOQAAACDIzXf/koZjnF6H5AsDuXkINdVnhvwcEuYVkP9fK3IY5AAA
-AIjYc7Y72HO2OwAAAAtzc2gtZWQyNTUxOQAAACDIzXf/koZjnF6H5AsDuXkINdVn
+AIgAAAAAAAAAAAAAAAtzc2gtZWQyNTUxOQAAACDIzXf/koZjnF6H5AsDuXkINdVn
hvwcEuYVkP9fK3IY5AAAAEB7sWGXbFtbZvROQvx/6MWWTZGxkDaKjAhjVwARqXQI
F8jNd/+ShmOcXofkCwO5eQg11WeG/BwS5hWQ/18rchjkAAAAAAECAwQF
-----END OPENSSH PRIVATE KEY-----
Currently, no-touch-required and verify-required options are not supported for ecdsa-sk
and ed25519-sk
keys in authorized_keys file -- user presence check is always mandatory and user verification check is always optional.
If DROPBEAR_X11FWD
is being set to 1
, compilation will fail.
x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe -march=native -O2 -pipe -Wno-pointer-sign -fno-strict-overflow -I./libtomcrypt/src/headers/ -DLOCALOPTIONS_H_EXISTS -I. -I. -DDROPBEAR_SERVER -DDROPBEAR_CLIENT -DDBMULTI_dropbear -DDBMULTI_dbclient -DDBMULTI_dropbearkey -DDBMULTI_dropbearconvert -DDBMULTI_scp -DDROPBEAR_MULTI svr-x11fwd.c -o svr-x11fwd.o
svr-x11fwd.c: In function ‘x11_inithandler’:
svr-x11fwd.c:209:25: error: ‘DROPBEAR_CHANNEL_PRIO_INTERACTIVE’ undeclared (first use in this function)
209 | channel->prio = DROPBEAR_CHANNEL_PRIO_INTERACTIVE;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
svr-x11fwd.c:209:25: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:154: svr-x11fwd.o] Error 1
Lots of routers and other devices now have some form of crypto acceleration usually available with /dev/crypto.
Is it possible to add support for crypto acceleration and remove the software crypto library? It would make dropbear smaller and increase file transfer speed a lot, especially on low-power CPUs.
Thanks.
If I generate ssh-keygen -t rsa
and add the key to the server everything works as expected.
If I generate ssh-keygen -t ed25519
and add the key to the server the key is not accepted.
I tried to use dropbearconvert openssh dropbear id_ed25519 id_ed25519-dropbear
, but the output file seems broken.
How can I diagnose this issue?
I've created a wireguard-initramfs setup for debian bullseye, which enables dropbear to be used over wireguard connections on boot: https://github.com/r-pufky/wireguard-initramfs
Fundamentally, it means you can unlock a crypt FS anywhere in the world without exposing SSH or ports on the remote host; there just needs to be a Internet connection and an accessible wireguard endpoint.
Is there a spot for linking to additional utilities for dropbear? I couldn't find one.
The main dropbear process is terminated if we send a TERM signal to the process group of a dropbear session process to terminate a specific session.
The problem seems to be that the setsid is never called on the child process after a fork in main_noinetd since version 2020.79.
The setsid is presently called in main_noinetd only if DEBUG_NOFORK is not defined and DEBUG_NOFORK is defined in debug.h.
The problem seems to have been introduced in commit 2a81289 when the usage of the DEBUG_NOFORK was reworked.
Are there any plans supporting these ?
If you are interested, I can help you in maintaining dropbear.
I can help you with code reviews for pull requests, testing new features and managing issues.
I just noticed that as of today I can no longer log into any of my servers with a public key. The error message is Unable to negotiate with [...]: no matching host key type found. Their offer: ssh-rsa
Since I'm not rebooting my server very often, I'm not sure when the problem started, but I assume it did with the update of OpenSSH to the version 8.8 on my client. According to their changelogs there could be issues if you use SHA-1. Most of the solutions I found recommend changing the ssh server config, but I couldn't find a way to do that with dropbear. Is that even possible?
Currently using the 2019.78-2build1
of focal (20.04LTS).
Gentoo Linux, kernel without IPv6, dropbear v2020.81 with debug option.
I can't connect to github. This is the log.
TRACE (11175) 0.597292: matching key
TRACE (11175) 0.597303: enter send_msg_userauth_pubkey sigtype 5
TRACE (11175) 0.597317: enter buf_put_ed25519_pub_key
TRACE (11175) 0.597328: leave buf_put_ed25519_pub_key
TRACE (11175) 0.597339: realsign
TRACE (11175) 0.597352: buf_put_sign type 5 ssh-ed25519
TRACE (11175) 0.597365: enter buf_put_ed25519_sign
TRACE (11175) 0.610341: leave buf_put_ed25519_sign
TRACE (11175) 0.610401: leave send_msg_userauth_pubkey
TRACE (11175) 0.610413: leave recv_msg_userauth_pk_ok
TRACE (11175) 0.610425: leave cli_sessionloop: waiting, req_sent
TRACE (11175) 0.610549: empty queue dequeing
TRACE (11175) 0.746895: process_packet: packet type = 52, len 6
TRACE (11175) 0.746965: received msg_userauth_success
TRACE (11175) 0.746984: enter cli_send_chansess_request
TRACE (11175) 0.746996: enter send_msg_channel_open_init()
TRACE (11175) 0.747008: enter newchannel
TRACE (11175) 0.747021: leave newchannel
TRACE (11175) 0.747032: setnonblocking: 0
TRACE (11175) 0.747046: leave setnonblocking
TRACE (11175) 0.747059: leave send_msg_channel_open_init()
TRACE (11175) 0.747083: leave cli_send_chansess_request
TRACE (11175) 0.747096: enter setup_localtcp
TRACE (11175) 0.747107: leave setup_localtcp
TRACE (11175) 0.747118: enter setup_remotetcp
TRACE (11175) 0.747129: leave setup_remotetcp
TRACE (11175) 0.747139: leave cli_sessionloop: running
TRACE (11175) 0.747262: empty queue dequeing
TRACE (11175) 0.747646: process_packet: packet type = 80, len 478
TRACE (11175) 0.747678: recv_msg_global_request_cli
TRACE (11175) 0.747842: empty queue dequeing
TRACE (11175) 0.879202: process_packet: packet type = 91, len 22
TRACE (11175) 0.879274: enter recv_msg_channel_open_confirmation
TRACE (11175) 0.879286: new chan remote 43 local 0
TRACE (11175) 0.879299: setnonblocking: 1
TRACE (11175) 0.879314: leave setnonblocking
TRACE (11175) 0.879325: setnonblocking: 0
TRACE (11175) 0.879337: leave setnonblocking
TRACE (11175) 0.879348: setnonblocking: 2
TRACE (11175) 0.879360: leave setnonblocking
TRACE (11175) 0.879372: enter send_chansess_shell_req
TRACE (11175) 0.879397: leave send_chansess_shell_req
TRACE (11175) 0.879410: update_channel_prio
TRACE (11175) 0.879421: Dropbear priority transitioning 11 -> 12
TRACE (11175) 0.879443: Couldn't set IPV6_TCLASS (Protocol not available)
TRACE (11175) 0.879461: leave recv_msg_channel_open_confirmation
TRACE (11175) 0.879604: empty queue dequeing
TRACE (11175) 0.879811: Exited, cleaning up: Remote closed the connection
TRACE (11175) 0.879835: enter session_cleanup
TRACE (11175) 0.879847: enter chancleanup
TRACE (11175) 0.879858: channel 0 closing
TRACE (11175) 0.879871: enter remove_channel
TRACE (11175) 0.879882: channel index is 0
TRACE (11175) 0.879894: update_channel_prio
TRACE (11175) 0.879906: leave update_channel_prio: no socket
TRACE (11175) 0.879917: leave remove_channel
TRACE (11175) 0.879929: leave chancleanup
TRACE (11175) 0.879945: enter cli_tty_cleanup
TRACE (11175) 0.879957: leave cli_tty_cleanup: not in raw mode
TRACE (11175) 0.880100: leave session_cleanup
dbclient: Connection to [email protected]:22 exited: Remote closed the connection
Notice the error: Couldn't set IPV6_TCLASS (Protocol not available)
Is IPv6 required for dropbear client to work?
Hi, thank you very much for creating this wonderful project.
Lately, I'm trying to setup dropbear
on my old android device.
The cross-complie process is too complicated to me, so I took the binary from another github repo, and setup dropbear
on the android device like this answer did.
After that, ran dropbear -r <key file path> -r <key file path> -E
on the android device, then the dropbear
serve on the background now.
and there's no /etc/passwd
and /etc/shells
files on the android device, so I created them manually with these
# /etc/passwd
root:x:0:0:root:/root:/su/bin/sush
# /etc/shells
/bin/bash
/su/bin/sush
But when I connect the device from WSL2 through ssh root@<device's lan ip>
, it comes back
root@<device's lan ip>: Permission deined (publickey)
and the dropbear
on the android device log
[8048] Jun 22 13:36:37 Child connection from <host ip>:49956
[8048] Jun 22 13:36:38 User 'root' has invalid shell, rejected
[8048] Jun 22 13:36:38 Exit before auth from <<host ip>:49956>: (user 'root', 0 fails): Exited normally
Here's is strace
log I got:
7880 [ Process PID=7880 runs in 32 bit mode. ]
7880 pselect6(7, [5 6], NULL, NULL, NULL, NULL) = 1 (in [6])
7880 accept4(6, {sa_family=AF_INET, sin_port=htons(49956), sin_addr=inet_addr("192.168.31.128")}, [128 => 16], 0) = 7
7880 socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 8
7880 getsockopt(8, SOL_SOCKET, SO_DOMAIN, [1], [4]) = 0
7880 connect(8, {sa_family=AF_UNIX, sun_path="/dev/socket/fwmarkd"}, 110) = 0
7880 getsockopt(8, SOL_SOCKET, SO_DOMAIN, [1], [4]) = 0
7880 sendmsg(8, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=12}], msg_iovlen=1, msg_control=[{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[7]}], msg_controllen=16, msg_flags=0}, 0) = 12
7880 recvfrom(8, "\0\0\0\0", 4, 0, NULL, NULL) = 4
7880 close(8) = 0
7880 openat(AT_FDCWD, "/dev/urandom", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "\245h?\7m:\6k\17c\222\327\344\243\372\177\n\2F\272,<\263\370\365s+F \10\255\227", 32) = 32
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/timer_list", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "Timer List Version: v0.7\nHRTIMER"..., 4096) = 79
7880 read(8, "cpu: 4\n clock 0:\n .base: "..., 4096) = 4096
7880 read(8, "3322078198439 nsecs]\n #23: <0000"..., 4096) = 4096
7880 read(8, ".so/5549\n # expires at 324484740"..., 4096) = 4096
7880 read(8, "LSender0/2916\n # expires at 3458"..., 4096) = 4096
7880 read(8, "mer, msm_watchdog/76\n # expires "..., 4096) = 4096
7880 read(8, "000000000000000\n .index: 0"..., 4096) = 4096
7880 read(8, "ndex: 2\n .resolution: 1 ns"..., 4096) = 2889
7880 read(8, "", 4096) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/interrupts", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, " CPU4 CPU5 "..., 4096) = 4031
7880 read(8, "200: 0 0 "..., 4096) = 4031
7880 read(8, "280: 0 527 "..., 4096) = 4051
7880 read(8, "521: 0 0 "..., 4096) = 941
7880 read(8, "", 4096) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/loadavg", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "7.85 5.64 2.59 2/2503 8047\n", 4096) = 27
7880 read(8, "", 4096) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/sys/kernel/random/entropy_avail", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "1030\n", 4096) = 5
7880 read(8, "", 4096) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/net/netstat", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "TcpExt: SyncookiesSent Syncookie"..., 4096) = 2153
7880 read(8, "", 1943) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/net/dev", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "Inter-| Receive "..., 4096) = 3136
7880 read(8, "", 960) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/net/tcp", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, " sl local_address rem_address "..., 4096) = 900
7880 read(8, "", 3196) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/net/rt_cache", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "Iface\tDestination\tGateway \tFlags"..., 4096) = 128
7880 read(8, "", 3968) = 0
7880 close(8) = 0
7880 openat(AT_FDCWD, "/proc/vmstat", O_RDONLY|O_LARGEFILE) = 8
7880 read(8, "nr_free_pages 18960\nnr_alloc_bat"..., 4096) = 1863
7880 read(8, "", 4096) = 0
7880 close(8) = 0
7880 gettimeofday({tv_sec=1655876197, tv_usec=786885}, NULL) = 0
7880 clock_gettime(CLOCK_PROCESS_CPUTIME_ID, {tv_sec=0, tv_nsec=8833069}) = 0
7880 openat(AT_FDCWD, "/dev/urandom", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 8
7880 fstat64(8, {st_mode=S_IFCHR|0666, st_rdev=makedev(0x1, 0x9), ...}) = 0
7880 ioctl(8, TCGETS, 0xfffbad60) = -1 EINVAL (Invalid argument)
7880 getsockopt(8, SOL_SOCKET, SO_DOMAIN, 0xfffbad4c, [4]) = -1 ENOTSOCK (Socket operation on non-socket)
7880 write(8, "\177\n\260\302=\260\345>4\214\37\250N%\20[\336\256})\357\310(\3234]qU7\6n\354", 32) = 32
7880 close(8) = 0
7880 pipe2([8, 10], 0) = 0
7880 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xf73b5b3c) = 8048
7880 close(10) = 0
7880 close(7) = 0
7880 pselect6(9, [5 6 8], NULL, NULL, NULL, NULL <unfinished ...>
8048 gettimeofday({tv_sec=1655876197, tv_usec=788854}, NULL) = 0
8048 getsockopt(2, SOL_SOCKET, SO_DOMAIN, 0xfffba47c, [4]) = -1 ENOTSOCK (Socket operation on non-socket)
8048 write(2, "[8048] Jun 22 13:36:37 Child con"..., 66) = 66
8048 close(5) = 0
8048 close(6) = 0
8048 close(8) = 0
8048 fcntl64(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
8048 fcntl64(7, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
8048 setsockopt(7, SOL_IPV6, IPV6_TCLASS, [72], 4) = -1 ENOPROTOOPT (Protocol not available)
8048 setsockopt(7, SOL_IP, IP_TOS, [72], 4) = 0
8048 setsockopt(7, SOL_SOCKET, SO_PRIORITY, [6], 4) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=540346229}) = 0
8048 pipe2([5, 6], 0) = 0
8048 fcntl64(5, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
8048 fcntl64(6, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
8048 getpeername(7, {sa_family=AF_INET, sin_port=htons(49956), sin_addr=inet_addr("192.168.31.128")}, [128 => 16]) = 0
8048 sigaction(SIGCHLD, {sa_handler=0xaaca7f60, sa_mask=[], sa_flags=SA_RESTORER|SA_NOCLDSTOP, sa_restorer=0xf72d8548}, NULL) = 0
8048 getpeername(7, {sa_family=AF_INET, sin_port=htons(49956), sin_addr=inet_addr("192.168.31.128")}, [128 => 16]) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=543992010}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=544806697}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=545076020}) = 0
8048 pselect6(8, [5], [7], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (out [7], left {tv_sec=299, tv_nsec=999989010})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=545308833}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=545882479}) = 0
8048 getsockname(7, {sa_family=AF_INET, sin_port=htons(22), sin_addr=inet_addr("192.168.31.92")}, [28 => 16]) = 0
8048 futex(0xf713f030, FUTEX_WAKE_PRIVATE, 2147483647) = 0
8048 socket(AF_UNIX, SOCK_STREAM, 0) = 8
8048 connect(8, {sa_family=AF_UNIX, sun_path="/dev/socket/nims"}, 18) = 0
8048 socket(AF_UNIX, SOCK_STREAM, 0) = 11
8048 connect(11, {sa_family=AF_UNIX, sun_path="/dev/socket/dpmwrapper"}, 24) = 0
8048 sendmsg(11, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0_\0\2\0\0\26\300\250\37\\\0\0\0\0\0\0\0\0\374\3103\367\0\0\0\0\0\0\0\0"..., iov_len=95}], msg_iovlen=1, msg_control=[{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, cmsg_data=[7]}], msg_controllen=16, msg_flags=0}, 0) = 95
8048 recvmsg(11, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\2\0\36\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=30}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 30
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=548069041}) = 0
8048 writev(7, [{iov_base="SSH-2.0-dropbear_2022.82\r\n", iov_len=26}, {iov_base="\0\0\1\334\10\24!\f\305\371\7J&\300\245,U\333\266\36(\257\0\0\0\273curve2"..., iov_len=480}], 2) = 506
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=548474875}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=999989896})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=548678833}) = 0
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997709})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=548850708}) = 0
8048 read(7, "S", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=549143000}) = 0
8048 read(7, "S", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998177})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=549391281}) = 0
8048 read(7, "H", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998177})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=549640343}) = 0
8048 read(7, "-", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=549889875}) = 0
8048 read(7, "2", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=550205395}) = 0
8048 read(7, ".", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997969})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=550479822}) = 0
8048 read(7, "0", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998177})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=550732375}) = 0
8048 read(7, "-", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=550990552}) = 0
8048 read(7, "O", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=551242687}) = 0
8048 read(7, "p", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=551492635}) = 0
8048 read(7, "e", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=551744614}) = 0
8048 read(7, "n", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=551997218}) = 0
8048 read(7, "S", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=552247947}) = 0
8048 read(7, "S", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=552498729}) = 0
8048 read(7, "H", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=552749927}) = 0
8048 read(7, "_", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998125})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=553001281}) = 0
8048 read(7, "8", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=553251385}) = 0
8048 read(7, ".", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=553524979}) = 0
8048 read(7, "4", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=553814250}) = 0
8048 read(7, "p", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=554076437}) = 0
8048 read(7, "1", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999998073})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=554354614}) = 0
8048 read(7, " ", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997969})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=554761854}) = 0
8048 read(7, "D", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997865})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=556448677}) = 0
8048 read(7, "e", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997916})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=558546229}) = 0
8048 read(7, "b", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999996458})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=560308000}) = 0
8048 read(7, "i", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997969})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=560837322}) = 0
8048 read(7, "a", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999989792})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=563598208}) = 0
8048 read(7, "n", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999991302})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=565652791}) = 0
8048 read(7, "-", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999996875})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=567338572}) = 0
8048 read(7, "5", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997812})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=569006333}) = 0
8048 read(7, "\r", 1) = 1
8048 pselect6(8, [7], NULL, NULL, {tv_sec=1, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=0, tv_nsec=999997917})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=570517791}) = 0
8048 read(7, "\n", 1) = 1
8048 mmap2(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xf7080000
8048 prctl(PR_SET_VMA, PR_SET_VMA_ANON_NAME, 0xf7080000, 262144, "libc_malloc") = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=572825291}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=999995365})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=573963052}) = 0
8048 read(7, "\0\0\5\344\n\0244\32", 8) = 8
8048 read(7, "\240'{\225\27\26~S\305\250\266\323\337\256\0\0\0\361curve25519-sha"..., 1504) = 1504
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=575814510}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=576429718}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=999995417})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=578149302}) = 0
8048 read(7, "\0\0\0,\6\36\0\0", 8) = 8
8048 read(7, "\0 \243\27\267z\345d\377\277\301\343\217\247\2!\237\"\7\t\35\347\7UZ\202\345jE\206\372\4"..., 40) = 40
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=580191906}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=714008729}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=714624666}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=715268208}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=717477531}) = 0
8048 writev(7, [{iov_base="\0\0\2d\v\37\0\0\1\27\0\0\0\7ssh-rsa\0\0\0\3\1\0\1\0\0\1\1"..., iov_len=616}, {iov_base="\0\0\0\f\n\25\304\361&\272t]\271\372K\342", iov_len=16}, {iov_base="r\324Dpb\2704\222\253\213\t\16@\5J\332\256\5\n.+\201\377\346V\6No\31On\275"..., iov_len=220}], 3) = 852
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=719063729}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=991759010})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=728294770}) = 0
8048 read(7, "\0\0\0\f\n\25\0\0", 8) = 8
8048 read(7, "\0\0\0\0\0\0\0\0", 8) = 8
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=729523937}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=730153624}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=730775916}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=997460677})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=734552166}) = 0
8048 read(7, "t}\310\23v$g\37", 8) = 8
8048 read(7, ")\3418\352p\251\5)\17\31\0076\342\353\305\241{\366\272\302\233?\r2V\312o4w&c\242"..., 36) = 36
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=736271593}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=736858312}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=739290708}) = 0
8048 writev(7, [{iov_base="\367\224\324\244\314/\217\2A\301\315\327p\367E\31\335\314\377\351p\344\261uS&@\314\234\343\227\353"..., iov_len=44}], 1) = 44
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=740858416}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=995997969})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=747181906}) = 0
8048 read(7, "\376\27\272;\230\222zA", 8) = 8
8048 read(7, "\177-k\316:-.\257\267\254\321\351\6O\27B\10b\234\355R\367\327\200\203\324\2636l\216ME"..., 52) = 52
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=747539822}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=747619302}) = 0
8048 geteuid32() = 0
8048 openat(AT_FDCWD, "/etc/shells", O_RDONLY|O_LARGEFILE) = 13
8048 fstat64(13, {st_mode=S_IFREG|0600, st_size=23, ...}) = 0
8048 fstat64(13, {st_mode=S_IFREG|0600, st_size=23, ...}) = 0
8048 read(13, "/bin/bash\n/su/bin/sush\n", 4096) = 23
8048 close(13) = 0
8048 gettimeofday({tv_sec=1655876198, tv_usec=5443}, NULL) = 0
8048 getsockopt(2, SOL_SOCKET, SO_DOMAIN, 0xfffba14c, [4]) = -1 ENOTSOCK (Socket operation on non-socket)
8048 write(2, "[8048] Jun 22 13:36:38 User 'roo"..., 63) = 63
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=754508104}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=754968624}) = 0
8048 writev(7, [{iov_base="U\235\33\360CuQkb3\"\f\231\262\355h\317\225\241\255rU\365wo\344\f\37au\261\v"..., iov_len=44}], 1) = 44
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=755286645}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=993876563})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=762029927}) = 0
8048 read(7, "~\206@Ab\304\335\37", 8) = 8
8048 read(7, "\335\225\10\5r\214+\276Q\346\3650)fp\263\307?\1\r\212y\213\216\367:up\356\6q8"..., 620) = 620
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=762358364}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=762438520}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=762546489}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=762882479}) = 0
8048 writev(7, [{iov_base="\2\360n\234\360\306\236\\\3277BN\210\373\354\337\315\367\35\347)!\f\226e\33\372\261\22\271\250\276"..., iov_len=44}], 1) = 44
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=763211906}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=994648021})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=768951489}) = 0
8048 read(7, "CT\204u\225\213\212X", 8) = 8
8048 read(7, "C\245\377 \351T\201&\16\367\356\224\223s2p\"\376g\"\245\246\267\271\230\fF*yJ\203\254"..., 132) = 132
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=769238885}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=769315968}) = 0
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=769421020}) = 0
8048 getsockopt(7, SOL_SOCKET, SO_DOMAIN, [2], [4]) = 0
8048 getuid32() = 0
8048 getsockopt(7, SOL_SOCKET, SO_TYPE, [1], [4]) = 0
8048 clock_gettime(CLOCK_BOOTTIME, {tv_sec=323, tv_nsec=769749927}) = 0
8048 writev(7, [{iov_base="\26\367y\227U\r\210\336\260\207(\372\361j\234\312\345\364\303vR9\255\205\257>\227\37\357\340\357\233"..., iov_len=44}], 1) = 44
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=770056697}) = 0
8048 pselect6(8, [5 7], [], NULL, {tv_sec=300, tv_nsec=0}, NULL) = 1 (in [7], left {tv_sec=299, tv_nsec=990341458})
8048 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323, tv_nsec=780272062}) = 0
8048 read(7, "", 8) = 0
8048 close(7) = 0
8048 gettimeofday({tv_sec=1655876198, tv_usec=38498}, NULL) = 0
8048 getsockopt(2, SOL_SOCKET, SO_DOMAIN, 0xfffb9f44, [4]) = -1 ENOTSOCK (Socket operation on non-socket)
8048 write(2, "[8048] Jun 22 13:36:38 Exit befo"..., 109) = 109
8048 futex(0xf73405b4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ|PROT_WRITE) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ) = 0
8048 close(0) = 0
8048 close(1) = 0
8048 close(2) = 0
8048 futex(0xf7339640, FUTEX_WAKE_PRIVATE, 2147483647) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ|PROT_WRITE) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ|PROT_WRITE) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ|PROT_WRITE) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ|PROT_WRITE) = 0
8048 mprotect(0xf736b000, 4096, PROT_READ) = 0
8048 munmap(0xf736b000, 4096) = 0
8048 exit_group(0) = ?
8048 +++ exited with 0 +++
7880 <... pselect6 resumed>) = 1 (in [8])
7880 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=8048, si_uid=0, si_status=0, si_utime=13, si_stime=0} ---
7880 wait4(-1, NULL, WNOHANG, NULL) = 8048
7880 wait4(-1, NULL, WNOHANG, NULL) = -1 ECHILD (No child processes)
7880 sigaction(SIGCHLD, {sa_handler=0xaacaa694, sa_mask=[], sa_flags=SA_RESTORER|SA_NOCLDSTOP, sa_restorer=0xf72d8548}, NULL) = 0
7880 sigreturn({mask=[]}) = 1
7880 close(8) = 0
7880 pselect6(9, [5 6], NULL, NULL, NULL, NULL
Hi! We are using dropbearkey in embedded systems, and noticed that the average delay for generating a RSA key of 2048 bits has doubled with 2022.82 version, compared to our previous 2018.76 version.
For example on these two low-power platforms:
It is of course an average, because the generation time varies greatly. Note that above numbers are based on 40 keys generated (20 keys for each version, alternately generated). I know it's not a tremendous amount of tests, but seems enough to see a trend.
Were you aware of such impact?
Dropbear is ssh server on my device and I use testssh.sh to test the support of ssl/tls ciphers. and it report "Obsoleted CBC ciphers (AES, ARIA etc.) offered" :
NULL ciphers (no encryption) not offered (OK)
Anonymous NULL Ciphers (no authentication) not offered (OK)
Export ciphers (w/o ADH+NULL) not offered (OK)
LOW: 64 Bit + DES, RC[2,4], MD5 (w/o export) not offered (OK)
Triple DES Ciphers / IDEA not offered
Obsoleted CBC ciphers (AES, ARIA etc.) offered
Strong encryption (AEAD ciphers) with no FS not offered
Forward Secrecy strong encryption (AEAD ciphers) offered (OK)
I want to disable Obsoleted CBC ciphers by dropbear server side, Is there any way to configure it? Thank you in advance:)
Unable to copy authorized_keys using scp. There is no errors. It just sits there
$ scp authorized_keys [email protected]:authorized keys
It worked 3 months ago. I checked history & nothing has changed... Same clean image of raspberry pi. Only Termux has been updated. Note: I can ssh into the server.
I ended up installing openssh to copy the file. On a whim, I switched back to dropbear & scp works with keys...
I'm using dropbear (2020.81-1) on a pixel 3 with android 11 via termux. ssh server is running on a raspberry pi 4 with raspberry pi os 32bit release 1/11/2021
Hi,
I was reading this post
and I found a comment about dropbear.
# These two libs are needed for dropbear,
# even if it's built statically,
# because we don't use PAM
# and dropbear uses libnss to find user
# to authenticate against
cp -L /lib64/libnss_compat.so.2 /rootfs/lib64/
cp -L /lib64/libnss_files.so.2 /rootfs/lib64/
Does that still apply?
Support port number in trusted hosts file, for multiple host keys from a single target host.
Hello, I am trying to solve my issue since hours and can't figure it out, that's why I seek out for help.
The issue
When I reboot my server, it takes about 10-16min to boot, actually you can see the usual initramfs screen with network config and the prompt to enter luks password and usually I could unlock the server remotely. But it takes a long time, till the server gets pingable. Once it is, everything is normal. The server wasn't rebooted for a while 160days+ and I did some updates frequently
Infos
Logs
systemd-analyze
Startup finished in 8.621s (firmware) + 374ms (loader) + 16min 50.537s (kernel) + 11.406s (userspace) = 17min 10.940s
dmesg -T
[Di Jun 28 12:40:13 2022] xor: automatically using best checksumming function avx
[Di Jun 28 12:40:13 2022] async_tx: api initialized (async)
[Di Jun 28 12:40:13 2022] device-mapper: uevent: version 1.0.3
[Di Jun 28 12:40:13 2022] device-mapper: ioctl: 4.43.0-ioctl (2020-10-01) initialised: [email protected]
[Di Jun 28 12:40:13 2022] process '/usr/bin/ipconfig' started with executable stack
[Di Jun 28 12:40:16 2022] e1000e 0000:00:1f.6 enp0s31f6: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[Di Jun 28 12:40:16 2022] IPv6: ADDRCONF(NETDEV_CHANGE): enp0s31f6: link becomes ready
[Di Jun 28 12:56:58 2022] NET: Registered protocol family 38
[Di Jun 28 12:56:59 2022] Btrfs loaded, crc32c=crc32c-intel
[Di Jun 28 12:56:59 2022] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null)
[Di Jun 28 12:56:59 2022] e1000e 0000:00:1f.6 enp0s31f6: NIC Link is Down
[Di Jun 28 12:56:59 2022] Not activating Mandatory Access Control as /sbin/tomoyo-init does not exist.
[Di Jun 28 12:56:59 2022] systemd[1]: Inserted module 'autofs4'
[Di Jun 28 12:56:59 2022] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[Di Jun 28 12:56:59 2022] systemd[1]: Detected architecture x86-64.
What I already tried
Configs
/etc/default/dropbear
# disabled because OpenSSH is installed
# change to NO_START=0 to enable Dropbear
NO_START=1
# the TCP port that Dropbear listens on
DROPBEAR_PORT=22
# any additional arguments for Dropbear
DROPBEAR_EXTRA_ARGS=
# specify an optional banner file containing a message to be
# sent to clients before they connect, such as "/etc/issue.net"
DROPBEAR_BANNER=""
# RSA hostkey file (default: /etc/dropbear/dropbear_rsa_host_key)
#DROPBEAR_RSAKEY="/etc/dropbear/dropbear_rsa_host_key"
# DSS hostkey file (default: /etc/dropbear/dropbear_dss_host_key)
#DROPBEAR_DSSKEY="/etc/dropbear/dropbear_dss_host_key"
# ECDSA hostkey file (default: /etc/dropbear/dropbear_ecdsa_host_key)
#DROPBEAR_ECDSAKEY="/etc/dropbear/dropbear_ecdsa_host_key"
# Receive window size - this is a tradeoff between memory and
# network performance
DROPBEAR_RECEIVE_WINDOW=65536
/etc/dropbear-initramfs/config
#
# Configuration options for the dropbear-initramfs boot scripts.
# You must run update-initramfs(8) to effect changes to this file (like
# for other files under the '/etc/dropbear-initramfs' directory).
#
# Command line options to pass to dropbear(8)
#
DROPBEAR_OPTIONS="-I 180 -j -k -p 59876 -s -T 3 -R"
#
# On local (non-NFS) mounts, interfaces matching this pattern are
# brought down before exiting the ramdisk to avoid dirty network
# configuration in the normal kernel.
# The special value 'none' keeps all interfaces up and preserves routing
# tables and addresses.
#
#IFDOWN=*
/etc/initramfs-tools/initramfs.conf
# initramfs.conf
# Configuration file for mkinitramfs(8). See initramfs.conf(5).
#
# Note that configuration options from this file can be overridden
# by config files in the /etc/initramfs-tools/conf.d directory.
#
# MODULES: [ most | netboot | dep | list ]
#
# most - Add most filesystem and all harddrive drivers.
#
# dep - Try and guess which modules to load.
#
# netboot - Add the base modules, network modules, but skip block devices.
#
# list - Only include modules from the 'additional modules' list
#
MODULES=most
#
# BUSYBOX: [ y | n | auto ]
#
# Use busybox shell and utilities. If set to n, klibc utilities will be used.
# If set to auto (or unset), busybox will be used if installed and klibc will
# be used otherwise.
#
BUSYBOX=auto
#
# KEYMAP: [ y | n ]
#
# Load a keymap during the initramfs stage.
#
KEYMAP=n
#
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]
#
COMPRESS=gzip
#
# NFS Section of the config.
#
#
# DEVICE: ...
#
# Specify a specific network interface, like eth0
# Overridden by optional ip= or BOOTIF= bootarg
#
DEVICE=enp0s31f6
IP=10.2.0.69::10.2.0.1:255.255.255.0::enp0s31f6:off
#
# NFSROOT: [ auto | HOST:MOUNT ]
#
NFSROOT=auto
#
# RUNSIZE: ...
#
# The size of the /run tmpfs mount point, like 256M or 10%
# Overridden by optional initramfs.runsize= bootarg
#
RUNSIZE=10%
grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISABLE_OS_PROBER=true
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video=SVIDEO-1:d"
GRUB_CMDLINE_LINUX=""
GRUB_GFXMODE=1280x800x24
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_DISABLE_SUBMENU=y
Thanks a lot for reading, any help is apprechiated.
Anyone able to assist?
Hello. Some my PAM modules setup environment. Noticed that does not work on root logging by ssh and the following message appears in log:
authpriv.err dropbear[4612]: PAM pam_getenvlist: NULL pam handle passed
When logging by ssh to another user/shell - setting environment works ok.
Any ideas?
dropbear -V
Dropbear v2019.78
Thanks for this great project. This issue is about config irregularities and hopeful cleanup.
This question is only regarding Dropbear inside initramfs. (not running Dropbear as a service or once booted)
The readme mentions having DROPBEAR_PORT inside /etc/default/dropbear
However I've found in Debian 10 Buster and Debian 11 Bullseye, DROPBEAR_PORT in /etc/default/dropbear is completely ignored when Dropbear starts up inside initramfs. Instead, Dropbear looks at
DROPBEAR_OPTIONS='-p 123'
inside /etc/dropbear-initramfs/config
I find it strange that Dropbear inside initramfs actually uses stuff like DROPBEAR_(key-type) inside /etc/default/dropbear, but it ignores DROPBEAR_PORT inside /etc/default/dropbear
. It's bizarre.
Some clarity on this would be great.
Perhaps some cleanup is in order?
Ideally Dropbear for initramfs could be configured with a single config file? ( only /etc/dropbear-initramfs/config
)
Considering that /etc/dropbear-initramfs/
already holds
/etc/dropbear-initramfs/config
/etc/dropbear-initramfs/authorized_keys
/etc/dropbear-initramfs/dropbear_foo_key
/etc/dropbear-initramfs/dropbear_bar_key
/etc/dropbear-initramfs/dropbear_baz_key
/etc/default/dropbear
to exist at allDROPBEAR_PORT
should work inside /etc/dropbear-initramfs/config
and DROPBEAR_OPTIONS='-p...
should not be required to set the port.We got a hostname in the /etc/hosts file which has mixed case, so f.i.
192.168.1.100 TestHost.localdomain TestHost
if we try to make a connection to dbclient root@testhost it does not find entry end we get:
Connect failed: Error resolving 'testhost' port '22'. Name does not resolve
if we do it with an exactly matching hostname it works.... so : dbclient root@TestHost
However if we do this with openssh it works... so : ssh root@testhost works..
So somehow it seems that the content of /etc/hosts is casesensitive with dbclient but not with openssh...
Any ideas ?
We use dropbear on the server side, to create an ssh session with a command-line application.
An ssh client connects to it. Sometimes the connection fails.
We repeat the connection sequence a large number of times in an automated test.
The problem started after upgrading from 2018-76 to 2022-82. We believe that the regression appeared in 2022-82 because it seems related to issue #85 (https://github.com/mkj/dropbear/pull/85/files)
We found the failure mechanism, as well as two potential fixes
Failure mechanism :
Potential fixes :
The current README file is not formatted for GitHub. Change the formatting to markdown with the necessary changes to formatting.
On an embedded device, having dropbear attempt to generate keys too early in the boot process may result in the device getting forever stuck, as embedded devices such as routers often have very little interrupt activity to properly seed getrandom() during the earlier boot stage.
Currently, dropbear runs one non-blocking getrandom(), followed by a blocking one. I suggest making the second getrandom() also non-blocking, so that way dropbear can fallback to using another source (such as /dev/urandom) rather than getting forever stuck.
One possible improvement would be to loop the non-blocking getrandom() calls with increasing wait time ( sleep(n*n++) ), until after a certain period of time (like 30 seconds) then a fallback to /dev/urandom is used.
I am trying to enable auditd on openbmc - and our platform of openbmc uses dropbear ssh for authentication.
From my understanding , there are certain type of login events USER_AUTH that should be sent by the login daemon , so that utilities like aureport, and ausearch could report the login attempts & whether they are successful or failed.
In the current state, i was able to see the authentication logs in /var/log/auth.log
but i am not seeing any audit events when we login via dropbear ssh, while i was searching i found a similar bug on lightdm & openssh where they needed the audit logging support. Is this missing in dropbear ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.