summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2018-02-28 21:28:59 +0800
committerMatt Johnston <matt@ucc.asn.au>2018-02-28 21:28:59 +0800
commit9bbce01e1b9d6b42869bbba9f36d6849a42276fe (patch)
treec9b9503211280a5ff84bff15e9e482137c8a4404
parent5df73215f887bbc4ebd122e725fe5497d92f511f (diff)
parentbbe02dc3cfd5f0367a43dac6521afc65254d74a8 (diff)
downloaddropbear-9bbce01e1b9d6b42869bbba9f36d6849a42276fe.tar.gz
merge from main
--HG-- branch : fuzz
-rw-r--r--.hgsigs1
-rw-r--r--.hgtags1
-rw-r--r--CHANGES41
-rw-r--r--Makefile.in3
-rw-r--r--README4
-rw-r--r--configure.ac11
-rw-r--r--debian/changelog6
-rw-r--r--debian/dropbear.docs1
-rw-r--r--runopts.h6
-rw-r--r--svr-auth.c5
-rw-r--r--svr-runopts.c9
-rw-r--r--svr-tcpfwd.c2
-rw-r--r--sysoptions.h2
13 files changed, 70 insertions, 22 deletions
diff --git a/.hgsigs b/.hgsigs
index dbdd8b9..9b4962d 100644
--- a/.hgsigs
+++ b/.hgsigs
@@ -23,3 +23,4 @@ fd1981f41c626a969f07b4823848deaefef3c8aa 0 iQIcBAABCgAGBQJW4W2TAAoJEESTFJTynGdzu
70705edee9dd29cd3d410f19fbd15cc3489313e2 0 iQIcBAABCgAGBQJW7CQRAAoJEESTFJTynGdzTj0QAJL38CKSZthBAeI9c6B+IlwIeT6kPZaPqk1pkycCTWOe87NiNU9abrsF+JrjTuRQiO1EpM2IvfQEIXTijUcMxvld3PnzrZDDv6UvBLtOkn3i++HSVRO0MOuTKI8gFDEPUxRtcaCKXEbqYnf1OTK25FT09Vb//qP9mK1thvlLJmbV+D2a9MkMK66rom1d1h+347IsuwsM+ycHjB80VVAQLA7VYLC5YIwmL17dSmcQLvetfikAMwwmUE+KES4qiLSaqOcAWcKcU67RZzgMMv5o0rESlQmv1nj0mHZtHoUR71sd21emPaRXLOr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iXuHiJ9saKk5TR70aNp+iRy0hjAgiYEsVMF9YKHzULOJcHr70x9XVKquubQkwNqJA+/b2JbK2j46wM5nVK/alGSI2kMmEzXmAHQxsvf1OLMvgH8ou/l0xsg/CuFEK299XKfZAbsFEXrjuoWZ1aSa6rTeOWsWli5T+czyyJHI4Eu0Sz/gaR8+MPhJSYes8YjvzEdv32rRMDVOdBq4e+HoTgFt/THYABP6/R1H5fX3Lm4K8u9F9SwJbb/YKRAIrfWDob8ApnGFHk2dyYO20Fskbbg6b1pC7ulDWsufu8lYkQyMlTc3dR6P4eTB6mKO4x+gMG6tIYZ60fiULoEnMJCgegPtevmz+TG1rzdjh3ljiw9Dxz5lNtL+W7sBKKHwhyG0u+bavgmvBMKNL/rdHEM+0yCIz1U6Lb8sVaST1E4zbdm7cWHbSozBij3G0GBSkLFEq7ZLlh8wco9rELRh0Y9fFsWY9j6H/PTOu0GfHrYluFb9WGywHAquQY8j2croRx+MrvTbR1wZrbevPNm9gqk3vgOiDWu7KwxLLqcj+dEQ7tccptVYtbM=
diff --git a/.hgtags b/.hgtags
index cdaec28..7c4e454 100644
--- a/.hgtags
+++ b/.hgtags
@@ -55,3 +55,4 @@ cbd674d63cd4f3781464a8d4056a5506c8ae926f DROPBEAR_2015.67
309e1c4a87682b6ca7d80b8555a1db416c3cb7ac DROPBEAR_2016.73
0ed3d2bbf956cb8a9bf0f4b5a86b7dd9688205cb DROPBEAR_2016.74
c31276613181c5cff7854e7ef586ace03424e55e DROPBEAR_2017.75
+1c66ca4f3791c82501c88e7637312182c7294978 DROPBEAR_2018.76
diff --git a/CHANGES b/CHANGES
index 2b66e44..106c694 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
-Upcoming...
+2018.76 - 27 February 2018
-- IMPORTANT:
+> > > Configuration/compatibility changes
+ IMPORTANT
Custom configuration is now specified in local_options.h rather than options.h
Available options and defaults can be seen in default_options.h
@@ -9,10 +10,10 @@ Upcoming...
be put in localoptions.h
- "configure --enable-static" should now be used instead of "make STATIC=1"
+ This will avoid 'hardened build' flags that conflict with static binaries
-- Add group14-256 and group16 key exchange options
-
-- Set hardened build flags by default if supported by the compiler.
+- Set 'hardened build' flags by default if supported by the compiler.
+ These can be disabled with configure --disable-harden if needed.
-Wl,-pie
-Wl,-z,now -Wl,-z,relro
-fstack-protector-strong
@@ -21,9 +22,24 @@ Upcoming...
-mfunction-return=thunk
-mindirect-branch=thunk
- These can be disabled with configure --disable-harden if needed
Spectre patch from Loganaden Velvindron
+- "dropbear -r" option for hostkeys no longer attempts to load the default
+ hostkey paths as well. If desired these can be specified manually.
+ Patch from CamVan Nguyen
+
+- group1-sha1 key exchange is disabled in the server by default since
+ the fixed 1024-bit group may be susceptible to attacks
+
+- twofish ciphers are now disabled in the default configuration
+
+- Default generated ECDSA key size is now 256 (rather than 521)
+ for better interoperability
+
+- Minimum RSA key length has been increased to 1024 bits
+
+> > > Other features and fixes
+
- Add runtime -T max_auth_tries option from Kevin Darbyshire-Bryant
- Add 'dbclient -J &fd' to allow dbclient to connect over an existing socket.
@@ -31,18 +47,25 @@ Upcoming...
- Add "-c forced_command" option. Patch from Jeremy Kerr
+- Restricted group -G option added with patch from stellarpower
+
- Support server-chosen TCP forwarding ports, patch from houseofkodai
- Allow choosing outgoing address for dbclient with -b [bind_address][:bind_port]
Patch from houseofkodai
-- Update bundled libtomcrypt to 1.18.1, libtommath to 1.0.1
+- Makefile will now rebuild object files when header files are modified
-- Minimum RSA key length has been increased to 1024 bits
+- Add group14-256 and group16 key exchange options
+
+- curve25519-sha256 also supported without @libssh.org suffix
+
+- Update bundled libtomcrypt to 1.18.1, libtommath to 1.0.1
+ This fixes building with some recent versions of clang
- Set PAM_RHOST which is needed by modules such as pam_abl
-- Improvements to DSS public key validation, found by OSS-Fuzz.
+- Improvements to DSS and RSA public key validation, found by OSS-Fuzz.
- Don't exit when an authorized_keys file has malformed entries. Found by OSS-Fuzz
diff --git a/Makefile.in b/Makefile.in
index 90598a6..b7b487c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -19,6 +19,7 @@ LIBTOM_LIBS=@LIBTOM_LIBS@
ifeq (@BUNDLED_LIBTOM@, 1)
LIBTOM_DEPS=$(STATIC_LTC) $(STATIC_LTM)
+LIBTOM_CLEAN=ltc-clean ltm-clean
CFLAGS+=-I$(srcdir)/libtomcrypt/src/headers/
LIBTOM_LIBS=$(STATIC_LTC) $(STATIC_LTM)
endif
@@ -226,7 +227,7 @@ ltm-clean:
sizes: dropbear
objdump -t dropbear|grep ".text"|cut -d "." -f 2|sort -rn
-clean: ltc-clean ltm-clean thisclean
+clean: $(LIBTOM_CLEAN) thisclean
thisclean:
-rm -f dropbear$(EXEEXT) dbclient$(EXEEXT) dropbearkey$(EXEEXT) \
diff --git a/README b/README
index 60ab95c..ace1d83 100644
--- a/README
+++ b/README
@@ -8,8 +8,8 @@ which performs multiple tasks, to save disk space)
SMALL has some tips on creating small binaries.
-See TODO for a few of the things I know need looking at, and please contact
-me if you have any questions/bugs found/features/ideas/comments etc :)
+Please contact me if you have any questions/bugs found/features/ideas/comments etc :)
+There is also a mailing list http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/dropbear
Matt Johnston
matt@ucc.asn.au
diff --git a/configure.ac b/configure.ac
index 6a61d82..4f54cf2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -339,9 +339,9 @@ AC_SUBST(DROPBEAR_FUZZ)
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([fcntl.h limits.h netinet/in.h netinet/tcp.h stdlib.h \
- string.h sys/socket.h sys/time.h termios.h unistd.h crypt.h \
- pty.h ioctl.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
+AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h \
+ crypt.h \
+ pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \
utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \
pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h])
@@ -498,7 +498,6 @@ AC_CHECK_FUNCS(mach_absolute_time)
AC_CHECK_FUNCS(explicit_bzero memset_s)
-
AC_ARG_ENABLE(bundled-libtom,
[ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists.
--disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist.
@@ -794,7 +793,9 @@ fi
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_SELECT_ARGTYPES
-AC_CHECK_FUNCS([dup2 getpass getspnam getusershell memset putenv select socket strdup clearenv strlcpy strlcat daemon basename _getpty getaddrinfo freeaddrinfo getnameinfo fork writev])
+AC_CHECK_FUNCS([getpass getspnam getusershell putenv])
+AC_CHECK_FUNCS([clearenv strlcpy strlcat daemon basename _getpty getaddrinfo ])
+AC_CHECK_FUNCS([freeaddrinfo getnameinfo fork writev getgrouplist])
AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME))
diff --git a/debian/changelog b/debian/changelog
index 037805f..8d5d2b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+dropbear (2018.76-0.1) unstable; urgency=low
+
+ * New upstream release.
+
+ -- Matt Johnston <matt@ucc.asn.au> Tue, 27 Feb 2018 22:51:57 +0800
+
dropbear (2017.75-0.1) unstable; urgency=low
* New upstream release.
diff --git a/debian/dropbear.docs b/debian/dropbear.docs
index 94fec74..4e43adc 100644
--- a/debian/dropbear.docs
+++ b/debian/dropbear.docs
@@ -1,4 +1,3 @@
README
-TODO
debian/README.runit
debian/README.Debian.diet
diff --git a/runopts.h b/runopts.h
index 67d5c48..3123383 100644
--- a/runopts.h
+++ b/runopts.h
@@ -92,8 +92,14 @@ typedef struct svr_runopts {
#endif
int norootlogin;
+
+#ifdef HAVE_GETGROUPLIST
+ /* restrict_group is the group name if group restriction was enabled,
+ NULL otherwise */
char *restrict_group;
+ /* restrict_group_gid is only valid if restrict_group is set */
gid_t restrict_group_gid;
+#endif
int noauthpass;
int norootpass;
diff --git a/svr-auth.c b/svr-auth.c
index 82e68f2..7b400d1 100644
--- a/svr-auth.c
+++ b/svr-auth.c
@@ -197,6 +197,7 @@ out:
m_free(methodname);
}
+#ifdef HAVE_GETGROUPLIST
/* returns DROPBEAR_SUCCESS or DROPBEAR_FAILURE */
static int check_group_membership(gid_t check_gid, const char* username, gid_t user_gid) {
int ngroups, i, ret;
@@ -230,7 +231,7 @@ static int check_group_membership(gid_t check_gid, const char* username, gid_t u
return match;
}
-
+#endif
/* Check that the username exists and isn't disallowed (root), and has a valid shell.
* returns DROPBEAR_SUCCESS on valid username, DROPBEAR_FAILURE on failure */
@@ -300,6 +301,7 @@ static int checkusername(const char *username, unsigned int userlen) {
}
/* check for login restricted to certain group if desired */
+#ifdef HAVE_GETGROUPLIST
if (svr_opts.restrict_group) {
if (check_group_membership(svr_opts.restrict_group_gid,
ses.authstate.pw_name, ses.authstate.pw_gid) == DROPBEAR_FAILURE) {
@@ -310,6 +312,7 @@ static int checkusername(const char *username, unsigned int userlen) {
return DROPBEAR_FAILURE;
}
}
+#endif HAVE_GETGROUPLIST
TRACE(("shell is %s", ses.authstate.pw_shell))
diff --git a/svr-runopts.c b/svr-runopts.c
index 00854df..2c65009 100644
--- a/svr-runopts.c
+++ b/svr-runopts.c
@@ -70,7 +70,9 @@ static void printhelp(const char * progname) {
"-m Don't display the motd on login\n"
#endif
"-w Disallow root logins\n"
+#ifdef HAVE_GETGROUPLIST
"-G Restrict logins to members of specified group\n"
+#endif
#if DROPBEAR_SVR_PASSWORD_AUTH || DROPBEAR_SVR_PAM_AUTH
"-s Disable password logins\n"
"-g Disable password logins for root\n"
@@ -135,8 +137,10 @@ void svr_getopts(int argc, char ** argv) {
svr_opts.forced_command = NULL;
svr_opts.forkbg = 1;
svr_opts.norootlogin = 0;
+#ifdef HAVE_GETGROUPLIST
svr_opts.restrict_group = NULL;
svr_opts.restrict_group_gid = 0;
+#endif
svr_opts.noauthpass = 0;
svr_opts.norootpass = 0;
svr_opts.allowblankpass = 0;
@@ -235,9 +239,11 @@ void svr_getopts(int argc, char ** argv) {
case 'w':
svr_opts.norootlogin = 1;
break;
+#ifdef HAVE_GETGROUPLIST
case 'G':
next = &svr_opts.restrict_group;
break;
+#endif
case 'W':
next = &recv_window_arg;
break;
@@ -340,6 +346,7 @@ void svr_getopts(int argc, char ** argv) {
buf_setpos(svr_opts.banner, 0);
}
+#ifdef HAVE_GETGROUPLIST
if (svr_opts.restrict_group) {
struct group *restrictedgroup = getgrnam(svr_opts.restrict_group);
@@ -348,8 +355,8 @@ void svr_getopts(int argc, char ** argv) {
} else {
dropbear_exit("Cannot restrict logins to group '%s' as the group does not exist", svr_opts.restrict_group);
}
-
}
+#endif
if (recv_window_arg) {
opts.recv_window = atol(recv_window_arg);
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c
index 83f233d..cf6e07b 100644
--- a/svr-tcpfwd.c
+++ b/svr-tcpfwd.c
@@ -86,7 +86,7 @@ void recv_msg_global_request_remotetcp() {
}
if (strcmp("tcpip-forward", reqname) == 0) {
- int allocated_listen_port;
+ int allocated_listen_port = 0;
ret = svr_remotetcpreq(&allocated_listen_port);
/* client expects-port-number-to-make-use-of-server-allocated-ports */
if (DROPBEAR_SUCCESS == ret) {
diff --git a/sysoptions.h b/sysoptions.h
index 3eba13b..1666a1e 100644
--- a/sysoptions.h
+++ b/sysoptions.h
@@ -4,7 +4,7 @@
*******************************************************************/
#ifndef DROPBEAR_VERSION
-#define DROPBEAR_VERSION "2017.75"
+#define DROPBEAR_VERSION "2018.76"
#endif
#define LOCAL_IDENT "SSH-2.0-dropbear_" DROPBEAR_VERSION