Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
Dropbear for Debian
-------------------

This package will attempt to listen on port 22. If the OpenSSH
package ("ssh") is installed, the file /etc/default/dropbear
This package will attempt to listen on port 22. If the OpenSSH
package ("ssh") is installed, the file /etc/default/dropbear
will be set up so that the server does not start by default.

You can run Dropbear concurrently with OpenSSH 'sshd' by
modifying /etc/default/dropbear so that "NO_START" is set to
"0" and changing the port number that Dropbear runs on. Follow
You can run Dropbear concurrently with OpenSSH 'sshd' by
modifying /etc/default/dropbear so that "NO_START" is set to
"0" and changing the port number that Dropbear runs on. Follow
the instructions in the file.

This package suggests you install the "ssh" package. This package
provides the "ssh" client program, as well as the "/usr/bin/scp"
binary you will need to be able to retrieve files from a server
This package suggests you install the "ssh" package. This package
provides the "ssh" client program, as well as the "/usr/bin/scp"
binary you will need to be able to retrieve files from a server
running Dropbear via SCP.

Replacing OpenSSH "sshd" with Dropbear
--------------------------------------

You will still want to have the "ssh" package installed, as it
provides the "ssh" and "scp" binaries. When you install this
package, it checks for existing OpenSSH host keys and if found,
You will still want to have the "ssh" package installed, as it
provides the "ssh" and "scp" binaries. When you install this
package, it checks for existing OpenSSH host keys and if found,
converts them to the Dropbear format.

If this appears to have worked, you should be able to change over
If this appears to have worked, you should be able to change over
by following these steps:

1. Stop the OpenSSH server
% /etc/init.d/ssh stop
2. Prevent the OpenSSH server from starting in the future
% touch /etc/ssh/sshd_not_to_be_run
3. Modify the Dropbear defaults file, set NO_START to 0 and
3. Modify the Dropbear defaults file, set NO_START to 0 and
ensure DROPBEAR_PORT is set to 22.
% editor /etc/default/dropbear
4. Restart the Dropbear server.
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ It was downloaded from http://matt.ucc.asn.au/dropbear/

Upstream Author: Matt Johnston <[email protected]>

Copyright:
Copyright:

2 changes: 1 addition & 1 deletion debian/dropbear.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if test ! -e /etc/dropbear/dropbear_dss_host_key; then
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
fi
fi
if test ! -s /etc/default/dropbear; then
if test ! -s /etc/default/dropbear; then
# check whether OpenSSH seems to be installed.
if test -x /usr/sbin/sshd; then
cat <<EOT
Expand Down
18 changes: 9 additions & 9 deletions fuzz/fuzz-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ void fuzz_common_setup(void) {
#endif
if (getenv("DROPBEAR_KEEP_STDERR")) {
fprintf(stderr, "Dropbear fuzzer: DROPBEAR_KEEP_STDERR, not disabling stderr output\n");
}
else
}
else
{
fprintf(stderr, "Dropbear fuzzer: Disabling stderr output\n");
fuzz.fake_stderr = fopen("/dev/null", "w");
Expand Down Expand Up @@ -88,12 +88,12 @@ static void fuzz_dropbear_log(int UNUSED(priority), const char* UNUSED(format),

void fuzz_svr_setup(void) {
fuzz_common_setup();

_dropbear_exit = svr_dropbear_exit;

char *argv[] = {
char *argv[] = {
"dropbear",
"-E",
"-E",
};

int argc = sizeof(argv) / sizeof(*argv);
Expand All @@ -111,11 +111,11 @@ void fuzz_svr_hook_preloop() {

void fuzz_cli_setup(void) {
fuzz_common_setup();

_dropbear_exit = cli_dropbear_exit;
_dropbear_log = cli_dropbear_log;

char *argv[] = {
char *argv[] = {
"dbclient",
"-y",
"localhost",
Expand All @@ -130,7 +130,7 @@ void fuzz_cli_setup(void) {
setenv(DROPBEAR_PASSWORD_ENV, "password", 1);
}

#include "fuzz-hostkeys.c"
#include "fuzz-hostkeys.c"

static void load_fixed_client_key(void) {

Expand Down Expand Up @@ -247,7 +247,7 @@ int fuzz_spawn_command(int *ret_writefd, int *ret_readfd, int *ret_errfd, pid_t
/* Fake dropbear_listen, always returns failure for now.
TODO make it sometimes return success with wrapfd_new_dummy() sockets.
Making the listeners fake a new incoming connection will be harder. */
/* Listen on address:port.
/* Listen on address:port.
* Special cases are address of "" listening on everything,
* and address of NULL listening on localhost only.
* Returns the number of sockets bound on success, or -1 on failure. On
Expand Down
6 changes: 3 additions & 3 deletions fuzz/fuzz-sshpacketmutator.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
size_t LLVMFuzzerMutate(uint8_t *Data, size_t Size, size_t MaxSize);

static const char* FIXED_VERSION = "SSH-2.0-dbfuzz\r\n";
static const char* FIXED_IGNORE_MSG =
static const char* FIXED_IGNORE_MSG =
"\x00\x00\x00\x10\x06\x02\x00\x00\x00\x00\x11\x22\x33\x44\x55\x66";
static const unsigned int FIXED_IGNORE_MSG_LEN = 16;
#define MAX_FUZZ_PACKETS 500
Expand Down Expand Up @@ -214,7 +214,7 @@ size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size,
/* small chance of drop */
/* Drop it */
//printf("%d drop\n", i);
} else {
} else {
/* Odds of modification are proportional to packet position.
First packet has 20% chance, last has 100% chance */
int optC = nrand48(randstate) % 1000;
Expand All @@ -232,7 +232,7 @@ size_t LLVMFuzzerCustomMutator(uint8_t *Data, size_t Size,
/* Copy as-is */
out_packetB = packets[i];
// printf("%d as-is len %u\n", i, out_packetB->len);
}
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz-wrapfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ int wrapfd_write(int fd, const void* in, size_t count) {
return nrand48(rand_state) % (count+1);
}

int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds,
int wrapfd_select(int nfds, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds, struct timeval *timeout) {
int i, nset, sel;
int ret = 0;
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzzer-kexcurve25519.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
m_malloc_set_epoch(1);

if (setjmp(fuzz.jmp) == 0) {
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
with DROPBEAR_KEX_CURVE25519 */
ses.newkeys = keep_newkeys;

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzzer-kexdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
m_malloc_set_epoch(1);

if (setjmp(fuzz.jmp) == 0) {
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
with DROPBEAR_KEX_NORMAL_DH */
ses.newkeys = keep_newkeys;

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzzer-kexecdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
m_malloc_set_epoch(1);

if (setjmp(fuzz.jmp) == 0) {
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
/* Based on recv_msg_kexdh_init()/send_msg_kexdh_reply()
with DROPBEAR_KEX_ECDH */
ses.newkeys = keep_newkeys;

Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzzer-verify.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
}
if (buf_verify(fuzz.input, key, sigtype, verifydata) == DROPBEAR_SUCCESS) {
/* The fuzzer is capable of generating keys with a signature to match.
We don't want false positives if the key is bogus, since a client/server
We don't want false positives if the key is bogus, since a client/server
wouldn't be trusting a bogus key anyway */
int boguskey = 0;

Expand Down
Loading