The unified diff between revisions [a4cab2b4..] and [9169f571..] is displayed below. It can also be downloaded as a raw diff.

#
#
# patch "CHANGES"
#  from [6abc3fce3a2c017cf6acbb9802538acdc124f913]
#    to [74b24783afa6a56a4e12d6670aa813c1b2cd9a6b]
#
# patch "common-channel.c"
#  from [97ae918fb65d16853d0994b99fa1961d1c47fd32]
#    to [d914c792431d2325269764a295ba24352c011d4a]
#
# patch "configure.in"
#  from [efc775ba6fb049596194158e06479c2a29a0e165]
#    to [f31b2e55da16d6f8894a606901158a83d0ccfb81]
#
# patch "debian/changelog"
#  from [24a7644afdd8af3aae19d513bf105eca67db29e0]
#    to [96ae7b54c2ba221b09f7bbae7ad86b2429006d19]
#
# patch "debian/control"
#  from [d8fc53738944f7433a83c506ceb0e0946056f8bb]
#    to [8215d9641b75513057eb8f0f18e01e678b08c645]
#
# patch "debian/dropbear.init"
#  from [8a1d7d2adb4d35a13b594a0bfe8faf0f6c38a0cf]
#    to [4e253cf881369fb60a74951bb77d668d9dbd7bee]
#
# patch "includes.h"
#  from [9baa00e2da012281cecc528405cf06e48b53fda8]
#    to [9b4d01884eeff97ea41091be27ba2a7cbd707443]
#
# patch "options.h"
#  from [562d600e35b6a1ef1ab8d8df1dd61654056bd697]
#    to [35c6abccbdb8c81688562448070402b8bc296384]
#
# patch "svr-chansession.c"
#  from [8b52f1a622321b7cf4ed3ac6f69e7241d14d324d]
#    to [ab83b6c177a51cefc83b038932c9fc1e9b296692]
#
============================================================
--- CHANGES	6abc3fce3a2c017cf6acbb9802538acdc124f913
+++ CHANGES	74b24783afa6a56a4e12d6670aa813c1b2cd9a6b
@@ -1,3 +1,39 @@
+0.47 - Thurs Dec 8 2005
+
+- SECURITY: fix for buffer allocation error in server code, could potentially
+  allow authenticated users to gain elevated privileges. All multi-user systems
+  running the server should upgrade (or apply the patch available on the
+  Dropbear webpage).
+
+- Fix channel handling code so that redirecting to /dev/null doesn't use
+  100% CPU.
+
+- Turn on zlib compression for dbclient.
+
+- Set "low delay" TOS bit, can significantly improve interactivity
+  over some links.
+
+- Added client keyboard-interactive mode support, allows operation with
+  newer OpenSSH servers in default config.
+
+- Log when pubkey auth fails because of bad ~/.ssh/authorized_keys permissions
+
+- Improve logging of assertions
+
+- Added aes-256 cipher and sha1-96 hmac.
+
+- Fix twofish so that it actually works.
+
+- Improve PAM prompt comparison.
+
+- Added -g (dbclient) and -a (dropbear server) options to allow
+  connections to listening forwarded ports from remote machines.
+
+- Various other minor fixes
+
+- Compile fixes for glibc 2.1 (ss_family vs __ss_family) and NetBSD
+  (netinet/in_systm.h needs to be included).
+
 0.46 - Sat July 9 2005

 - Fix long-standing bug which caused connections to be closed if an ssh-agent
============================================================
--- common-channel.c	97ae918fb65d16853d0994b99fa1961d1c47fd32
+++ common-channel.c	d914c792431d2325269764a295ba24352c011d4a
@@ -203,24 +203,6 @@ void channelio(fd_set *readfds, fd_set *
 				send_msg_channel_data(channel, 1, SSH_EXTENDED_DATA_STDERR);
 		}

-		/* if we can read from the writefd, it might be closed, so we try to
-		 * see if it has errors */
-		if (channel->writefd >= 0 && channel->writefd != channel->readfd
-				&& FD_ISSET(channel->writefd, readfds)) {
-			if (channel->initconn) {
-				/* Handling for "in progress" connection - this is needed
-				 * to avoid spinning 100% CPU when we connect to a server
-				 * which doesn't send anything (tcpfwding) */
-				checkinitdone(channel);
-				continue; /* Important not to use the channel after
-							 checkinitdone(), as it may be NULL */
-			}
-			ret = write(channel->writefd, NULL, 0); /* Fake write */
-			if (ret < 0 && errno != EINTR && errno != EAGAIN) {
-				closewritefd(channel);
-			}
-		}
-
 		/* write to program/pipe stdin */
 		if (channel->writefd >= 0 && FD_ISSET(channel->writefd, writefds)) {
 			if (channel->initconn) {
@@ -445,17 +427,7 @@ void setchannelfds(fd_set *readfds, fd_s
 			}
 		}

-		/* For checking FD status (ie closure etc) - we don't actually
-		 * read data from writefd */
-		TRACE(("writefd = %d, readfd %d, errfd %d, bufused %d",
-					channel->writefd, channel->readfd,
-					channel->errfd,
-					cbuf_getused(channel->writebuf) ))
-		if (channel->writefd >= 0 && channel->writefd != channel->readfd) {
-			FD_SET(channel->writefd, readfds);
-		}
-
-		/* Stuff from the wire, to local program/shell/user etc */
+		/* Stuff from the wire */
 		if ((channel->writefd >= 0 && cbuf_getused(channel->writebuf) > 0 )
 				|| channel->initconn) {

============================================================
--- configure.in	efc775ba6fb049596194158e06479c2a29a0e165
+++ configure.in	f31b2e55da16d6f8894a606901158a83d0ccfb81
@@ -339,8 +339,9 @@ AC_CHECK_MEMBERS([struct utmp.ut_host, s
 #endif
 ])

-AC_CHECK_MEMBERS([struct utmpx.ut_host, struct utmpx.ut_syslen, struct utmpx.ut_type, struct utmpx.ut_id, struct utmpx.ut_addr, struct utmpx.ut_addr_v6, struct utmpx.ut_time, struct utmpx.ut_tv],,,[
+AC_CHECK_MEMBERS([struct utmpx.ut_host, struct utmpx.ut_syslen, struct utmpx.ut_type, struct utmpx.ut_id, struct utmpx.ut_addr, struct utmpx.ut_addr_v6, struct utmpx.ut_time, struct utmpx.ut_tv, struct sockaddr_storage.ss_family, struct sockadd_storage.__family],,,[
 #include <sys/types.h>
+#include <sys/socket.h>
 #if HAVE_UTMPX_H
 #include <utmpx.h>
 #endif
============================================================
--- debian/changelog	24a7644afdd8af3aae19d513bf105eca67db29e0
+++ debian/changelog	96ae7b54c2ba221b09f7bbae7ad86b2429006d19
@@ -1,3 +1,20 @@
+dropbear (0.47-0.1) unstable; urgency=high
+
+  * New upstream release.
+  * SECURITY: Fix incorrect buffer sizing.
+
+ -- Matt Johnston <matt@ucc.asn.au>  Thu, 8 Dec 2005 19:20:21 +0800
+
+dropbear (0.46-2) unstable; urgency=low
+
+  * debian/control: Standards-Version: 3.6.2.1; update descriptions to
+    mention included server and client (thx Tino Keitel).
+  * debian/dropbear.init: allow '/etc/init.d/dropbear stop' even though
+    'NO_START is not set to zero.' (closes: #336723).
+
+ -- Gerrit Pape <pape@smarden.org>  Tue,  6 Dec 2005 13:30:49 +0000
+
+dropbear (0.46-1) unstable; urgency=medium
 cokedropbear (0.46-0.1-dispense) unstable; urgency=medium

   * With dispense stuff.
@@ -7,6 +24,9 @@ dropbear (0.46-0.1) unstable; urgency=me
 dropbear (0.46-0.1) unstable; urgency=medium

   * New upstream release, various fixes.
+  * debian/diff/dbclient-usage-typo.diff, debian/diff/manpages.diff: remove;
+    obsolete.
+  * debian/dbclient.1: move to ./dbclient.1.

  -- Matt Johnston <matt@ucc.asn.au>  Fri, 8 July 2005 21:32:55 +0800

============================================================
--- debian/control	d8fc53738944f7433a83c506ceb0e0946056f8bb
+++ debian/control	8215d9641b75513057eb8f0f18e01e678b08c645
@@ -3,7 +3,7 @@ Build-Depends: libz-dev
 Priority: optional
 Maintainer: Matt Johnston <matt@ucc.asn.au>
 Build-Depends: libz-dev
-Standards-Version: 3.6.1.0
+Standards-Version: 3.6.2.1

 Package: cokedropbear
 Architecture: any
============================================================
--- debian/dropbear.init	8a1d7d2adb4d35a13b594a0bfe8faf0f6c38a0cf
+++ debian/dropbear.init	4e253cf881369fb60a74951bb77d668d9dbd7bee
@@ -27,6 +27,7 @@ case "$1" in

 case "$1" in
   start)
+	test "$NO_START" = "0" || cancel 'NO_START is not set to zero.'
 	echo -n "Starting $DESC: "
 	start-stop-daemon --start --quiet --pidfile /var/run/"$NAME".pid \
 	  --exec "$DAEMON" -- -d "$DROPBEAR_DSSKEY" -r "$DROPBEAR_RSAKEY" \
@@ -39,6 +40,7 @@ case "$1" in
 	echo "$NAME."
 	;;
   restart|force-reload)
+	test "$NO_START" = "0" || cancel 'NO_START is not set to zero.'
 	echo -n "Restarting $DESC: "
 	start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/"$NAME".pid
 	sleep 1
============================================================
--- includes.h	9baa00e2da012281cecc528405cf06e48b53fda8
+++ includes.h	9b4d01884eeff97ea41091be27ba2a7cbd707443
@@ -135,6 +135,13 @@ typedef u_int16_t uint16_t;
 #define LOG_AUTHPRIV LOG_AUTH
 #endif

+/* glibc 2.1.3 systems have sockaddr_storage.__ss_family rather than
+ * sockaddr_storage.ss_family */
+#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY) \
+    && defined(HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY)
+#define ss_family __ss_family
+#endif
+
 /* so we can avoid warnings about unused params (ie in signal handlers etc) */
 #ifdef UNUSED
 #elif defined(__GNUC__)
============================================================
--- options.h	562d600e35b6a1ef1ab8d8df1dd61654056bd697
+++ options.h	35c6abccbdb8c81688562448070402b8bc296384
@@ -200,7 +200,7 @@ etc) slower (perhaps by 50%). Recommende
  *******************************************************************/

 #ifndef DROPBEAR_VERSION
-#define DROPBEAR_VERSION "0.46-dispense"
+#define DROPBEAR_VERSION "0.47"
 #endif

 #define LOCAL_IDENT "SSH-2.0-dropbear_" DROPBEAR_VERSION
============================================================
--- svr-chansession.c	8b52f1a622321b7cf4ed3ac6f69e7241d14d324d
+++ svr-chansession.c	ab83b6c177a51cefc83b038932c9fc1e9b296692
@@ -810,7 +810,7 @@ static void addchildpid(struct ChanSess
 	/* need to increase size */
 	if (i == svr_ses.childpidsize) {
 		svr_ses.childpids = (struct ChildPid*)m_realloc(svr_ses.childpids,
-				sizeof(struct ChildPid) * svr_ses.childpidsize+1);
+				sizeof(struct ChildPid) * (svr_ses.childpidsize+1));
 		svr_ses.childpidsize++;
 	}