summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-02 01:24:52 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-02 01:24:52 +0000
commitfa24e1f4990365a6adfb23d1bb937e533a9c08d3 (patch)
tree33542ccd3abe235c84b3097ff22768bb72bc4f03 /net-misc/dropbear
parentMake gmp optional. (diff)
downloadhistorical-fa24e1f4990365a6adfb23d1bb937e533a9c08d3.tar.gz
historical-fa24e1f4990365a6adfb23d1bb937e533a9c08d3.tar.bz2
historical-fa24e1f4990365a6adfb23d1bb937e533a9c08d3.zip
Fix for security issue #119232.
Package-Manager: portage-2.1_pre4-r1
Diffstat (limited to 'net-misc/dropbear')
-rw-r--r--net-misc/dropbear/ChangeLog10
-rw-r--r--net-misc/dropbear/Manifest45
-rw-r--r--net-misc/dropbear/dropbear-0.47-r1.ebuild75
-rw-r--r--net-misc/dropbear/files/digest-dropbear-0.47-r11
-rw-r--r--net-misc/dropbear/files/dropbear-0.47-CVE-2006-0225.patch302
5 files changed, 427 insertions, 6 deletions
diff --git a/net-misc/dropbear/ChangeLog b/net-misc/dropbear/ChangeLog
index eefd7007c3b0..6b1be60d2b98 100644
--- a/net-misc/dropbear/ChangeLog
+++ b/net-misc/dropbear/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/dropbear
-# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/ChangeLog,v 1.30 2005/12/30 19:21:32 kumba Exp $
+# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/ChangeLog,v 1.31 2006/02/02 01:24:52 vapier Exp $
+
+*dropbear-0.47-r1 (02 Feb 2006)
+
+ 02 Feb 2006; Mike Frysinger <vapier@gentoo.org>
+ +files/dropbear-0.47-CVE-2006-0225.patch, +dropbear-0.47-r1.ebuild:
+ Fix for security issue #119232.
30 Dec 2005; Joshua Kinard <kumba@gentoo.org> dropbear-0.47.ebuild:
Marked stable on mips.
diff --git a/net-misc/dropbear/Manifest b/net-misc/dropbear/Manifest
index 684967eac09b..dad38458f0cd 100644
--- a/net-misc/dropbear/Manifest
+++ b/net-misc/dropbear/Manifest
@@ -1,24 +1,61 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
-MD5 53390af81b1985bc6b84ef1c5a9b5a38 ChangeLog 3886
+MD5 85a517ea48d00a65b1b9989f539e5839 ChangeLog 4075
+RMD160 35e43f975fe2ddb6c75187d6b6e771d5ab270372 ChangeLog 4075
+SHA256 150f6e7eebfe7681d39756e2c5f1444c25c3a4fc9ac7c3f7932ea2f64839758a ChangeLog 4075
MD5 eca949c2fcf358c97cbf8071bf15e3ae dropbear-0.43.ebuild 1685
+RMD160 5f056cc65964163312f34fd24c29b66d1d71489c dropbear-0.43.ebuild 1685
+SHA256 47073437a9dfe9476e2e1b79dc0c1f2221d67bcc160e4c4f18571d2b470c0e7b dropbear-0.43.ebuild 1685
MD5 68c50009dd00b23b70f2c214457a75cf dropbear-0.45.ebuild 1946
+RMD160 a9e6ac0d6f034bc396ba0f789a90ff389b3eb773 dropbear-0.45.ebuild 1946
+SHA256 5fb5592d9602575374d7591f6e0a8ac49ab99343bc0aeba8062bd351f2fdafda dropbear-0.45.ebuild 1946
MD5 2b6d2818a1d0d0355c398221d862b01b dropbear-0.46.ebuild 2030
+RMD160 c45a2cc642227b5d23fc3c8908cb75ff8df0806c dropbear-0.46.ebuild 2030
+SHA256 ceb6530d174f231c3db8e008b8dabff6968f98481ba1ed646e8ef361b53c13b2 dropbear-0.46.ebuild 2030
+MD5 4bb8cc97fd98fb93a3ad08ed619d5dfb dropbear-0.47-r1.ebuild 2117
+RMD160 72b06c78bd71e73b7d961ff73d0b947b84241091 dropbear-0.47-r1.ebuild 2117
+SHA256 4b67eb174740727918f2cb06a8a00a2cd90da772cfa6f425efa25befb7fdbc20 dropbear-0.47-r1.ebuild 2117
MD5 4fdcadec2002d7e1e9a00c81340d22d5 dropbear-0.47.ebuild 2033
+RMD160 22085692890bb474805a1d05c811cb39da5094ba dropbear-0.47.ebuild 2033
+SHA256 f447e4f2a40929e847c7ffc0d280e25d4b9b20e21764eb54ae61705ece65280d dropbear-0.47.ebuild 2033
MD5 c3634543250cd9f910161b351bb15ccc files/digest-dropbear-0.43 67
+RMD160 5ddd0dba4be9cd4d7c69ac48aabdfd90579cb0fc files/digest-dropbear-0.43 67
+SHA256 6d67acdd98cc51831df3cfb66a1ba60cf5dd23608c5d4e6b1c7fe38089acdc71 files/digest-dropbear-0.43 67
MD5 c9381e8354263ae69eda6efabca753ad files/digest-dropbear-0.45 67
+RMD160 fdfc68bb0d46920a0578b9d58b3996844c49c4be files/digest-dropbear-0.45 67
+SHA256 73273c1dd78ad054fb4bb85f07b4b54e11df73be6af063e83779f013d28554cc files/digest-dropbear-0.45 67
MD5 8ae09936c352dfd5a8ddb95182b1afc6 files/digest-dropbear-0.46 67
+RMD160 d23a7c6ef86ae50fe6c257e127579ac09c61a486 files/digest-dropbear-0.46 67
+SHA256 eaaf62a6e00b4ef92ebce08a1d30e7ea0df99a442be18884d4203e8862a84885 files/digest-dropbear-0.46 67
MD5 9d60e23c082173af1e4294b2c914c7d5 files/digest-dropbear-0.47 67
+RMD160 0a875b6068534244bb48ebbbde0f3e654d46a081 files/digest-dropbear-0.47 67
+SHA256 c3bdefd1f503b70f464ecab1c455313f607c9543ad6c6840ec7f5e31a58179b9 files/digest-dropbear-0.47 67
+MD5 9d60e23c082173af1e4294b2c914c7d5 files/digest-dropbear-0.47-r1 67
+RMD160 0a875b6068534244bb48ebbbde0f3e654d46a081 files/digest-dropbear-0.47-r1 67
+SHA256 c3bdefd1f503b70f464ecab1c455313f607c9543ad6c6840ec7f5e31a58179b9 files/digest-dropbear-0.47-r1 67
MD5 df7f6fb1df6f7a44da55ad2f09ba7d26 files/dropbear-0.45-urandom.patch 1889
+RMD160 3b259eeac0c52bbaa560a78cb30dfab835f03789 files/dropbear-0.45-urandom.patch 1889
+SHA256 629b6326de36c04668fb12b3912082459db426b1ab90159849b9104be2c9106b files/dropbear-0.45-urandom.patch 1889
MD5 c7d976a23e72e6dce3c022e588def172 files/dropbear-0.46-dbscp.patch 500
+RMD160 72d7aeee568eae941e3fc45935be1b2bb81f6319 files/dropbear-0.46-dbscp.patch 500
+SHA256 b133670f2417a112e06ae0e4ec7fe50eeb76015e44a5c19d4f55a8df3636ed2d files/dropbear-0.46-dbscp.patch 500
+MD5 e45b86b52cc64eede67ea6d156486b70 files/dropbear-0.47-CVE-2006-0225.patch 7743
+RMD160 450065d4b190045aff6495d302a58c7946a5aad3 files/dropbear-0.47-CVE-2006-0225.patch 7743
+SHA256 60048517d2d0a67bc2f526bd71eb762b290c22c1fc7ca73097ba9934cb555bc9 files/dropbear-0.47-CVE-2006-0225.patch 7743
MD5 af73c487e2be37d65d0e8bf80489357e files/dropbear.conf.d 190
+RMD160 c877b7ead880060ddafe8deaf4cf478dbb33c1b0 files/dropbear.conf.d 190
+SHA256 e891255a49d408eb11514662faa4d724a1df27cc2ee90268507dbd2573b67334 files/dropbear.conf.d 190
MD5 34fea1c967596ebcd6d10d38444f2b92 files/dropbear.init.d 913
+RMD160 be9cd23f061b0773966812b7f48552253c312d35 files/dropbear.init.d 913
+SHA256 b115e922fa679adca29e24464dd7ffb1a21a0962333d7822a11e0bcea29ea5ed files/dropbear.init.d 913
MD5 ef25f543b5438ee7595e2ae0f98a5093 metadata.xml 671
+RMD160 c3da2e0db6394b8eb2ec2b93453a7f6026b3172d metadata.xml 671
+SHA256 b0c681ade956473f39bb23f7c8ba9ea3774c981a2d543b9e4aa6a3587eadde7f metadata.xml 671
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-iD8DBQFDzGVW2+ySkm8kpY0RAl4qAJ9SfMCh3pNJPcnrmeGpXPcWSM5iIwCfe5qJ
-zL4cSVYP8Ff4rq3kUfovgpw=
-=ip18
+iD8DBQFD4V+P2+ySkm8kpY0RApaSAKCd8eYZE8KQ+ciWn4mGhdCOz9WhgACfVYsY
+DIv9pMgBcL6FbgfOTsDoEV8=
+=ljda
-----END PGP SIGNATURE-----
diff --git a/net-misc/dropbear/dropbear-0.47-r1.ebuild b/net-misc/dropbear/dropbear-0.47-r1.ebuild
new file mode 100644
index 000000000000..7d3988b172c6
--- /dev/null
+++ b/net-misc/dropbear/dropbear-0.47-r1.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dropbear/dropbear-0.47-r1.ebuild,v 1.1 2006/02/02 01:24:52 vapier Exp $
+
+inherit eutils
+
+DESCRIPTION="small SSH 2 client/server designed for small memory environments"
+HOMEPAGE="http://matt.ucc.asn.au/dropbear/dropbear.html"
+SRC_URI="http://matt.ucc.asn.au/dropbear/releases/${P}.tar.bz2
+ http://matt.ucc.asn.au/dropbear/testing/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~s390 ~sh ~sparc ~x86"
+IUSE="minimal multicall pam static zlib"
+
+RDEPEND="zlib? ( sys-libs/zlib )
+ pam? ( sys-libs/pam )"
+DEPEND="${RDEPEND}
+ >=sys-apps/portage-2.0.51"
+PROVIDE="virtual/ssh"
+
+set_options() {
+ use minimal \
+ && progs="dropbear dbclient dropbearkey" \
+ || progs="dropbear dbclient dropbearkey dropbearconvert scp"
+ use multicall && makeopts="${makeopts} MULTI=1"
+ use static && makeopts="${makeopts} STATIC=1"
+}
+
+pkg_setup() {
+ enewgroup sshd 22
+ enewuser sshd 22 -1 /var/empty sshd
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/dropbear-0.45-urandom.patch
+ epatch "${FILESDIR}"/dropbear-0.46-dbscp.patch
+ epatch "${FILESDIR}"/dropbear-0.47-CVE-2006-0225.patch
+}
+
+src_compile() {
+ local myconf
+ # --disable-syslog? wouldn't need logger in init.d
+ use minimal && myconf="--disable-lastlog"
+ econf ${myconf} $(use_enable zlib) $(use_enable pam) || die
+ set_options
+ emake ${makeopts} PROGRAMS="${progs}" || die "make ${makeopts} failed"
+}
+
+src_install() {
+ set_options
+ make install DESTDIR="${D}" ${makeopts} PROGRAMS="${progs}" || die "make install failed"
+ doman *.8
+ newinitd "${FILESDIR}"/dropbear.init.d dropbear
+ newconfd "${FILESDIR}"/dropbear.conf.d dropbear
+ dodoc CHANGES README TODO SMALL MULTI
+
+ # The multi install target does not install the links
+ if use multicall ; then
+ cd "${D}"/usr/bin
+ local x
+ for x in ${progs} ; do
+ ln -s dropbearmulti ${x}
+ done
+ rm -f dropbear
+ dodir /usr/sbin
+ dosym ../bin/dropbearmulti /usr/sbin/dropbear
+ cd "${S}"
+ fi
+
+ mv "${D}"/usr/bin/{,db}scp
+}
diff --git a/net-misc/dropbear/files/digest-dropbear-0.47-r1 b/net-misc/dropbear/files/digest-dropbear-0.47-r1
new file mode 100644
index 000000000000..981333b6a450
--- /dev/null
+++ b/net-misc/dropbear/files/digest-dropbear-0.47-r1
@@ -0,0 +1 @@
+MD5 cf634614d52278d44dfd9c224a438bf2 dropbear-0.47.tar.bz2 1418374
diff --git a/net-misc/dropbear/files/dropbear-0.47-CVE-2006-0225.patch b/net-misc/dropbear/files/dropbear-0.47-CVE-2006-0225.patch
new file mode 100644
index 000000000000..5608a05a7916
--- /dev/null
+++ b/net-misc/dropbear/files/dropbear-0.47-CVE-2006-0225.patch
@@ -0,0 +1,302 @@
+Index: misc.c
+===================================================================
+RCS file: /cvs/src/usr.bin/ssh/misc.c,v
+retrieving revision 1.41
+retrieving revision 1.42
+diff -u -p -r1.41 -r1.42
+--- scpmisc.c 5 Jan 2006 23:43:53 -0000 1.41
++++ scpmisc.c 31 Jan 2006 10:19:02 -0000 1.42
+@@ -383,12 +383,15 @@ void
+ addargs(arglist *args, char *fmt, ...)
+ {
+ va_list ap;
+- char buf[1024];
++ char *cp;
+- int nalloc;
++ u_int nalloc;
++ int r;
+
+ va_start(ap, fmt);
+- vsnprintf(buf, sizeof(buf), fmt, ap);
++ r = vasprintf(&cp, fmt, ap);
+ va_end(ap);
++ if (r == -1)
++ fatal("addargs: argument too long");
+
+ nalloc = args->nalloc;
+ if (args->list == NULL) {
+@@ -399,6 +402,40 @@ addargs(arglist *args, char *fmt, ...)
+
+ args->list = xrealloc(args->list, nalloc * sizeof(char *));
+ args->nalloc = nalloc;
+- args->list[args->num++] = xstrdup(buf);
++ args->list[args->num++] = cp;
+ args->list[args->num] = NULL;
++}
++
++void
++replacearg(arglist *args, u_int which, char *fmt, ...)
++{
++ va_list ap;
++ char *cp;
++ int r;
++
++ va_start(ap, fmt);
++ r = vasprintf(&cp, fmt, ap);
++ va_end(ap);
++ if (r == -1)
++ fatal("replacearg: argument too long");
++
++ if (which >= args->num)
++ fatal("replacearg: tried to replace invalid arg %d >= %d",
++ which, args->num);
++ xfree(args->list[which]);
++ args->list[which] = cp;
++}
++
++void
++freeargs(arglist *args)
++{
++ u_int i;
++
++ if (args->list != NULL) {
++ for (i = 0; i < args->num; i++)
++ xfree(args->list[i]);
++ xfree(args->list);
++ args->nalloc = args->num = 0;
++ args->list = NULL;
++ }
+ }
+Index: misc.h
+===================================================================
+RCS file: /cvs/src/usr.bin/ssh/misc.h,v
+retrieving revision 1.28
+retrieving revision 1.29
+diff -u -p -r1.28 -r1.29
+--- scpmisc.h 8 Dec 2005 18:34:11 -0000 1.28
++++ scpmisc.h 31 Jan 2006 10:19:02 -0000 1.29
+@@ -38,10 +38,20 @@ struct arglist {
+ typedef struct arglist arglist;
+ struct arglist {
+ char **list;
+- int num;
+- int nalloc;
++ u_int num;
++ u_int nalloc;
+ };
+-void addargs(arglist *, char *, ...);
++void addargs(arglist *, char *, ...)
++ __attribute__((format(printf, 2, 3)));
++void replacearg(arglist *, u_int, char *, ...)
++ __attribute__((format(printf, 3, 4)));
++void freeargs(arglist *);
++
++#define fatal(fmt, args...) \
++ do { \
++ fprintf(stderr, fmt, ## args); \
++ exit (255); \
++ } while (0)
+
+ /* from xmalloc.h */
+ void *xmalloc(size_t);
+Index: scp.c
+===================================================================
+RCS file: /cvs/src/usr.bin/ssh/scp.c,v
+retrieving revision 1.128
+retrieving revision 1.129
+diff -u -p -r1.128 -r1.129
+--- scp.c 6 Dec 2005 22:38:27 -0000 1.128
++++ scp.c 31 Jan 2006 10:19:02 -0000 1.129
+@@ -118,6 +118,48 @@ killchild(int signo)
+ _exit(1);
+ }
+
++static int
++do_local_cmd(arglist *a)
++{
++ u_int i;
++ int status;
++ pid_t pid;
++
++ if (a->num == 0)
++ fatal("do_local_cmd: no arguments");
++
++ if (verbose_mode) {
++ fprintf(stderr, "Executing:");
++ for (i = 0; i < a->num; i++)
++ fprintf(stderr, " %s", a->list[i]);
++ fprintf(stderr, "\n");
++ }
++ if ((pid = fork()) == -1)
++ fatal("do_local_cmd: fork: %s", strerror(errno));
++
++ if (pid == 0) {
++ execvp(a->list[0], a->list);
++ perror(a->list[0]);
++ exit(1);
++ }
++
++ do_cmd_pid = pid;
++ signal(SIGTERM, killchild);
++ signal(SIGINT, killchild);
++ signal(SIGHUP, killchild);
++
++ while (waitpid(pid, &status, 0) == -1)
++ if (errno != EINTR)
++ fatal("do_local_cmd: waitpid: %s", strerror(errno));
++
++ do_cmd_pid = -1;
++
++ if (!WIFEXITED(status) || WEXITSTATUS(status) != 0)
++ return (-1);
++
++ return (0);
++}
++
+ /*
+ * This function executes the given command as the specified user on the
+ * given host. This returns < 0 if execution fails, and >= 0 otherwise. This
+@@ -162,7 +204,7 @@ do_cmd(char *host, char *remuser, char *
+ close(pin[0]);
+ close(pout[1]);
+
+- args.list[0] = ssh_program;
++ replacearg(&args, 0, "%s", ssh_program);
+ if (remuser != NULL) {
+ addargs(&args, "-l");
+ addargs(&args, "%s", remuser);
+@@ -225,8 +267,9 @@ main(int argc, char **argv)
+ extern char *optarg;
+ extern int optind;
+
++ memset(&args, '\0', sizeof(args));
+ args.list = NULL;
+- addargs(&args, "ssh"); /* overwritten with ssh_program */
++ addargs(&args, "%s", ssh_program);
+ addargs(&args, "-x");
+ addargs(&args, "-oForwardAgent no");
+ addargs(&args, "-oClearAllForwardings yes");
+@@ -363,6 +406,10 @@ toremote(char *targ, int argc, char **ar
+ {
+ int i, len;
+ char *bp, *host, *src, *suser, *thost, *tuser;
++ arglist alist;
++
++ memset(&alist, '\0', sizeof(alist));
++ alist.list = NULL;
+
+ *targ++ = 0;
+ if (*targ == 0)
+@@ -380,55 +427,46 @@ toremote(char *targ, int argc, char **ar
+ tuser = NULL;
+ }
+
++ if (tuser != NULL && !okname(tuser))
++ return;
++
+ for (i = 0; i < argc - 1; i++) {
+ src = colon(argv[i]);
+ if (src) { /* remote to remote */
+- static char *ssh_options =
+- "-x -o'ClearAllForwardings yes'";
++ freeargs(&alist);
++ addargs(&alist, "%s", ssh_program);
++ if (verbose_mode)
++ addargs(&alist, "-v");
++ addargs(&alist, "-x");
++ addargs(&alist, "-oClearAllForwardings yes");
++ addargs(&alist, "-n");
++
+ *src++ = 0;
+ if (*src == 0)
+ src = ".";
+ host = strrchr(argv[i], '@');
+- len = strlen(ssh_program) + strlen(argv[i]) +
+- strlen(src) + (tuser ? strlen(tuser) : 0) +
+- strlen(thost) + strlen(targ) +
+- strlen(ssh_options) + CMDNEEDS + 20;
+- bp = xmalloc(len);
++
+ if (host) {
+ *host++ = 0;
+ host = cleanhostname(host);
+ suser = argv[i];
+ if (*suser == '\0')
+ suser = pwd->pw_name;
+- else if (!okname(suser)) {
+- xfree(bp);
+- continue;
+- }
+- if (tuser && !okname(tuser)) {
+- xfree(bp);
++ else if (!okname(suser))
+ continue;
+- }
+- snprintf(bp, len,
+- "%s%s %s -n "
+- "-l %s %s %s %s '%s%s%s:%s'",
+- ssh_program, verbose_mode ? " -v" : "",
+- ssh_options, suser, host, cmd, src,
+- tuser ? tuser : "", tuser ? "@" : "",
+- thost, targ);
++ addargs(&alist, "-l");
++ addargs(&alist, "%s", suser);
+ } else {
+ host = cleanhostname(argv[i]);
+- snprintf(bp, len,
+- "exec %s%s %s -n %s "
+- "%s %s '%s%s%s:%s'",
+- ssh_program, verbose_mode ? " -v" : "",
+- ssh_options, host, cmd, src,
+- tuser ? tuser : "", tuser ? "@" : "",
+- thost, targ);
+ }
+- if (verbose_mode)
+- fprintf(stderr, "Executing: %s\n", bp);
+- (void) system(bp);
++ addargs(&alist, "%s", host);
++ addargs(&alist, "%s", cmd);
++ addargs(&alist, "%s", src);
++ addargs(&alist, "%s%s%s:%s",
++ tuser ? tuser : "", tuser ? "@" : "",
++ thost, targ);
++ if (do_local_cmd(&alist) != 0)
++ errs = 1;
+- (void) xfree(bp);
+ } else { /* local to remote */
+ if (remin == -1) {
+ len = strlen(targ) + CMDNEEDS + 20;
+@@ -453,20 +492,23 @@ tolocal(int argc, char **argv)
+ {
+ int i, len;
+ char *bp, *host, *src, *suser;
++ arglist alist;
++
++ memset(&alist, '\0', sizeof(alist));
++ alist.list = NULL;
+
+ for (i = 0; i < argc - 1; i++) {
+ if (!(src = colon(argv[i]))) { /* Local to local. */
+- len = strlen(_PATH_CP) + strlen(argv[i]) +
+- strlen(argv[argc - 1]) + 20;
+- bp = xmalloc(len);
+- (void) snprintf(bp, len, "exec %s%s%s %s %s", _PATH_CP,
+- iamrecursive ? " -r" : "", pflag ? " -p" : "",
+- argv[i], argv[argc - 1]);
+- if (verbose_mode)
+- fprintf(stderr, "Executing: %s\n", bp);
+- if (system(bp))
++ freeargs(&alist);
++ addargs(&alist, "%s", _PATH_CP);
++ if (iamrecursive)
++ addargs(&alist, "-r");
++ if (pflag)
++ addargs(&alist, "-p");
++ addargs(&alist, "%s", argv[i]);
++ addargs(&alist, "%s", argv[argc-1]);
++ if (do_local_cmd(&alist))
+ ++errs;
+- (void) xfree(bp);
+ continue;
+ }
+ *src++ = 0;