diff options
author | Michael Weber <xmw@gentoo.org> | 2010-09-20 04:08:23 +0000 |
---|---|---|
committer | Michael Weber <xmw@gentoo.org> | 2010-09-20 04:08:23 +0000 |
commit | 5ebe34ddd4f1c08265af07e22433fcfcbe8a5b5e (patch) | |
tree | 8d1b872c12566a380c228c71a9822fbd926c2e03 /net-misc/aget | |
parent | Revert media-fonts/cronyx-fonts mask. (diff) | |
download | historical-5ebe34ddd4f1c08265af07e22433fcfcbe8a5b5e.tar.gz historical-5ebe34ddd4f1c08265af07e22433fcfcbe8a5b5e.tar.bz2 historical-5ebe34ddd4f1c08265af07e22433fcfcbe8a5b5e.zip |
Fix buffer overflow (bug #337874)
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'net-misc/aget')
-rw-r--r-- | net-misc/aget/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/aget/Manifest | 4 | ||||
-rw-r--r-- | net-misc/aget/aget-0.4.1-r1.ebuild | 29 | ||||
-rw-r--r-- | net-misc/aget/files/aget-0.4.1-r1.patch | 88 |
4 files changed, 127 insertions, 2 deletions
diff --git a/net-misc/aget/ChangeLog b/net-misc/aget/ChangeLog index 3d6339431a2b..1af28b289ac3 100644 --- a/net-misc/aget/ChangeLog +++ b/net-misc/aget/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/aget # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/aget/ChangeLog,v 1.16 2010/08/31 00:11:41 xmw Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/aget/ChangeLog,v 1.17 2010/09/20 04:08:23 xmw Exp $ + +*aget-0.4.1-r1 (20 Sep 2010) + + 20 Sep 2010; Michael Weber <xmw@gentoo.org> +aget-0.4.1-r1.ebuild, + +files/aget-0.4.1-r1.patch: + Fix buffer overflow (bug #337874), thanks to Kevin Pyle. *aget-0.4.1 (30 Aug 2010) diff --git a/net-misc/aget/Manifest b/net-misc/aget/Manifest index b91f672ffcea..ddc3d4d28c9c 100644 --- a/net-misc/aget/Manifest +++ b/net-misc/aget/Manifest @@ -1,7 +1,9 @@ +AUX aget-0.4.1-r1.patch 2423 RMD160 ce74611344cc45ef7c75dfbe6cb0c8eda254cd5a SHA1 a8ccbfbc85259f90d8498d282340f3d40a408833 SHA256 e0db4c7d975177f1981941dabba6f39ceccf33a5e43d72c33150f08b98000c54 DIST aget-0.4.1.tar.gz 12783 RMD160 4a23d722b0e4d6c632c40006aa5e67d5acfd4b88 SHA1 6f7bc1676fd506207a1a168c587165b902d9d609 SHA256 d17393c7f44aab38028ae71f14b572ba1839b6e085fb2092b6ebe68bc931df4d DIST aget-0.4.tar.gz 11152 RMD160 f2a342ee513c9225e6f124ebc35b3d297cdfcb62 SHA1 acd428c919c105401f4b1c19a082c71f470fe9af SHA256 6909b57cc097e333b852574229052841778b79b13038ff33e84760e124337b5b DIST aget_0.4-4.diff.gz 2447 RMD160 0c4798835d8445efc1a0a92c07c8b112538802df SHA1 9222c75b59d50eae91bcb1faabd260ed547c6435 SHA256 8b1e91ec857c5c94ec4c6441103e3f19373aefe9310d344ded0ed65f2185efdd +EBUILD aget-0.4.1-r1.ebuild 718 RMD160 e4375fcd85efb0be2e0336d905be635c68d30276 SHA1 7a9563ab997b5c24d178942f749895ecd9a38dc3 SHA256 4ff18de5f9b33b8d37345b3235c2b57cb96a42d932726f47b51e000e6fb770ae EBUILD aget-0.4.1.ebuild 950 RMD160 7ea177f585ec37a8d83d2a2a4ec8cb4ad3bd25dd SHA1 1415724320c3135ca5261ab6b4bb9e11e7c158ce SHA256 19199b584d507cbb07517bb9d529eb4ee5f4b4c0a96634343ec861aa9c6d772e EBUILD aget-0.4.ebuild 870 RMD160 c1c5cf5c2a5bdc9dc44418deeca2b2df724d0c47 SHA1 2e1d3aa3aad64de2f6124743e0d5fb0ca5dbea2f SHA256 6af48f5e9a51666005778b1757bde23068582ec17d036982a60caa0da124a542 -MISC ChangeLog 1922 RMD160 9d24d8c12e3aa83f5473ce55e253c8886776c963 SHA1 27114ed90bbc44c1afbbd0a881877c728adc93ed SHA256 76bb44730a265d7abe29db4eb9c4889a4a5de6085f982397ce3d825168fc6b09 +MISC ChangeLog 2111 RMD160 032a91800a482a22d2b340b88fc20fda749a22d0 SHA1 dd35732b45ceadbc236e93e5896624e0001da4e3 SHA256 2010b959ab30e95c3edc4b895d360fa7521a6ed9803061a45e008cb9354ebe97 MISC metadata.xml 988 RMD160 8f834d90632d61cc48a3c64c4a6647dc8c039b9b SHA1 5275619adf2b3998b4bfe8f3dff3012d293db5b2 SHA256 5a657d8c263f771aeb4ce72bac96670f98c92b67df650e48c96f7447b38caed6 diff --git a/net-misc/aget/aget-0.4.1-r1.ebuild b/net-misc/aget/aget-0.4.1-r1.ebuild new file mode 100644 index 000000000000..996f243163f9 --- /dev/null +++ b/net-misc/aget/aget-0.4.1-r1.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/aget/aget-0.4.1-r1.ebuild,v 1.1 2010/09/20 04:08:23 xmw Exp $ + +EAPI=2 + +inherit eutils toolchain-funcs + +DESCRIPTION="multithreaded HTTP download accelerator" +HOMEPAGE="http://www.enderunix.org/aget/" +SRC_URI="http://www.enderunix.org/${PN}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="" + +src_prepare() { + epatch "${FILESDIR}"/${PF}.patch +} + +src_compile() { + emake CC="$(tc-getCC)" || die +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc AUTHORS ChangeLog README* THANKS TODO || die +} diff --git a/net-misc/aget/files/aget-0.4.1-r1.patch b/net-misc/aget/files/aget-0.4.1-r1.patch new file mode 100644 index 000000000000..fe804901528c --- /dev/null +++ b/net-misc/aget/files/aget-0.4.1-r1.patch @@ -0,0 +1,88 @@ + +Subsequent snprintf calls treat the buffer as having size GETREQSIZ, so +drop the subtraction. Fix for http://bugs.gentoo.org/337874 by Kevin Pyle + +--- aget-0.4.1/Aget.c ++++ aget-0.4.1/Aget.c +@@ -86,7 +86,7 @@ + } + + /* Get the starting time, prepare GET format string, and start the threads */ +- fmt = (char *)calloc(GETREQSIZ - 2, sizeof(char)); ++ fmt = (char *)calloc(GETREQSIZ, sizeof(char)); + time(&t_start); + for (i = 0; i < nthreads; i++) { + soffset = calc_offset(req->clength, i, nthreads); +@@ -139,7 +139,7 @@ + + nthreads = h->nthreads; + +- fmt = (char *)calloc(GETREQSIZ - 2, sizeof(char)); ++ fmt = (char *)calloc(GETREQSIZ, sizeof(char)); + + wthread = (struct thread_data *)malloc(nthreads * sizeof(struct thread_data)); + memcpy(req, &h->req, sizeof(struct request)); + +Fix useless memset that set 0 bytes to the value of GETRECVSIZ, rather +than setting GETRECVSIZ bytes to the value of 0. By Kevin Pyle. + +--- aget-0.4.1/Download.c ++++ aget-0.4.1/Download.c +@@ -107,7 +107,7 @@ + pthread_mutex_unlock(&bwritten_mutex); + + while (td->offset < foffset) { +- memset(rbuf, GETRECVSIZ, 0); ++ memset(rbuf, 0, GETRECVSIZ); + dr = recv(sd, rbuf, GETRECVSIZ, 0); + if ((td->offset + dr) > foffset) + dw = pwrite(td->fd, rbuf, foffset - td->offset, td->offset); +--- aget-0.4.1/Head.c 2010-09-20 03:41:27.236019179 +0200 ++++ aget-0.4.1/Head.c 2010-09-20 03:43:00.087098655 +0200 +@@ -1,5 +1,4 @@ + #ifndef SOLARIS +-#define _XOPEN_SOURCE 500 + #endif + + +--- aget-0.4.1/Misc.c ++++ aget-0.4.1/Misc.c +@@ -129,7 +129,7 @@ + fprintf(stderr, "\t\t-h this screen\n"); + fprintf(stderr, "\t\t-v version info\n"); + fprintf(stderr, "\n"); +- fprintf(stderr, "http//www.enderunix.org/aget/\n"); ++ fprintf(stderr, "http://www.enderunix.org/aget/\n"); + } + + /* reverse a given string */ +--- aget-0.4.1/Makefile ++++ aget-0.4.1/Makefile +@@ -2,20 +2,21 @@ + # http://www.enderunix.org/aget/ + + OBJS = main.o Aget.o Misc.o Head.o Signal.o Download.o Resume.o +-CFLAGS = -g -W +-LDFLAGS = -pthread ++CFLAGS += ++LDFLAGS += -pthread + CC = gcc + STRIP = strip + +-all: $(OBJS) +- $(CC) -o aget $(OBJS) $(LDFLAGS) ++all: aget ++aget: $(OBJS) ++ $(LINK.o) $^ $(OUTPUT_OPTION) + + strip: $(all) + $(STRIP) aget + + install: +- cp -f aget /usr/local/bin/aget +- cp -f aget.1 /usr/share/man/man1/ ++ install -m 0755 -D aget $(DESTDIR)/usr/bin/aget ++ install -m 0644 -D aget.1 $(DESTDIR)/usr/share/man/man1/aget.1 + + clean: + rm -f aget *.o core.* *~ |