diff options
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/iputils/ChangeLog | 12 | ||||
-rw-r--r-- | net-misc/iputils/Manifest | 19 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-20100418-aliasing.patch | 93 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-20100418-makefile.patch | 35 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-20100418-ping-CVE-2010-2529.patch | 22 | ||||
-rw-r--r-- | net-misc/iputils/files/iputils-20100418-printf-size.patch | 62 | ||||
-rw-r--r-- | net-misc/iputils/iputils-20100418.ebuild | 66 |
7 files changed, 302 insertions, 7 deletions
diff --git a/net-misc/iputils/ChangeLog b/net-misc/iputils/ChangeLog index 6d517199ddbe..7d1b6a814c33 100644 --- a/net-misc/iputils/ChangeLog +++ b/net-misc/iputils/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-misc/iputils # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.77 2010/01/07 15:52:15 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/ChangeLog,v 1.78 2010/08/14 05:41:57 vapier Exp $ + +*iputils-20100418 (14 Aug 2010) + + 14 Aug 2010; Mike Frysinger <vapier@gentoo.org> +iputils-20100418.ebuild, + +files/iputils-20100418-aliasing.patch, + +files/iputils-20100418-makefile.patch, + +files/iputils-20100418-ping-CVE-2010-2529.patch, + +files/iputils-20100418-printf-size.patch: + Version bump #306101 by Andrew Brouwers. Add fix for ping CVE-2010-2529 + #332527 by Tim Sammut. 07 Jan 2010; Christian Faulhammer <fauli@gentoo.org> iputils-20071127-r2.ebuild: diff --git a/net-misc/iputils/Manifest b/net-misc/iputils/Manifest index b92b2e9ccca5..42be043e3730 100644 --- a/net-misc/iputils/Manifest +++ b/net-misc/iputils/Manifest @@ -1,5 +1,5 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 AUX 021109-uclibc-no-ether_ntohost.patch 635 RMD160 234010cd5aadc5086beb638c19514659974939f8 SHA1 8e7fda98a1cc1fae5b8f75f9aec200fcb3afee49 SHA256 cf8135fd380918890a1da8de438d5283111f1e9ea0754b4f5c78bb703fcf617b AUX iputils-021109-gcc34.patch 2313 RMD160 354dcdc651bcfb88bd96d9008367854e91a5f7f7 SHA1 97baa39948144d83f0d484d2c5df0c8efc924590 SHA256 f015536e6b043aacdc7e55afd2394ecdea4d1aeeb33780e3857374788321bf9e @@ -11,20 +11,27 @@ AUX iputils-20070202-no-open-max.patch 367 RMD160 e69a4be1e3ff09a7a5c77a5aee871b AUX iputils-20071127-gcc34.patch 2312 RMD160 8f63290b181d68216fb2c849212e5a40a561a056 SHA1 1227638d432b1dd6b84d790133a976c3dd1ad409 SHA256 8780a50156a8dfa3126668e1bf2e041ee54dd9e1d558d7e2b9d772bc99a35845 AUX iputils-20071127-kernel-ifaddr.patch 1467 RMD160 25082fb7976aaefdd6f4da753871d7d744fc171d SHA1 8ea5c4fe3aeed984bd6f6e377b4e304f38127c5d SHA256 24d24c86676c8d6febb52650e53f202051ec9f185932b87d8400eee0f77f569e AUX iputils-20071127-nonroot-floodping.patch 497 RMD160 7dddcb6e07c67620a83ff4a9d827270404e3fc32 SHA1 337b226525895f5b02463597d95efc7ea204f399 SHA256 f0c7c2d4843873da96f795fb766a65ed39b6d8ab74ae4aa5a47444c9a3db0e52 +AUX iputils-20100418-aliasing.patch 2897 RMD160 210d763dbae8d31485a5bf1f1792cd9183e93c54 SHA1 de370b6fa6ff56c557741f4edbc4fb70c22f3c35 SHA256 8df8b1c510a1630d06d71f801d57c9182729f0308545026b999868ad55469914 +AUX iputils-20100418-makefile.patch 974 RMD160 81e2022321a3af15eb3f025e8ad74d19690aeb21 SHA1 abaffdf7a61e00907de221afada04d62c58e00a4 SHA256 910914b0184a65aa15d42979bb7e3d272697310231005673cf2f46648deb6a4b +AUX iputils-20100418-ping-CVE-2010-2529.patch 513 RMD160 a7de880c7033a19c889e57a6d8a63c0f7d7a08ba SHA1 2c25c562cb01f0705f1d8276db24e98f3525df3e SHA256 a78f0a7977b5b3860495523e3728ae5e604e7b97f036edc93cac5856cd9c9a1a +AUX iputils-20100418-printf-size.patch 1658 RMD160 5ddc3104d1819d009a5cc0280a9d5450a4210d6e SHA1 47d280f6ce48086ec256ef1680db9de712d49e7f SHA256 95ce6cdf73cd5dbfbd962131fc1f6513713d4874ca161f5b24eaed21d58a1cfc DIST iputils-s20070202.tar.bz2 88678 RMD160 f6c3600a350537210d6ca43d1b82806bc0fa88f7 SHA1 44a299db16543a68fb80b06d5e6c88760af2aa6e SHA256 86f9f9970b4e2258e5e985d4d74b6ba9145410006c73b6482170525deb0c1957 DIST iputils-s20071127-manpages.tar.bz2 11796 RMD160 ce07a3837501c32af297914260273c89e134f42a SHA1 76a333ef987bab15abdea77d7edcf5977f5d781e SHA256 891363d013e8c939892a5860e8b2d1e0f002d6f2372c546490346d9348318d0c DIST iputils-s20071127.tar.bz2 88796 RMD160 2ca3d0ca25c7e0a197176a7438d803171d4e74e6 SHA1 56c8b6c5999b96f47f5b3b37dcf014a33cc7cb22 SHA256 dbbd87554d66e438245487ac31aa4a542a1c6c1ec8273cfacbbfeda09eb44a93 +DIST iputils-s20100418-manpages.tar.bz2 21613 RMD160 cc42f88053c120f875b33c4f1567931b307aff85 SHA1 6522c2ccf713143de0fbc4e9d39497a2143a1713 SHA256 db42afbd393260cc72b53532b5812b35e377a38714e253fdcd7e2a6637b6a948 +DIST iputils-s20100418.tar.bz2 94237 RMD160 64ea24bb57ae2b8d666b4bf5d35c2d37236882d5 SHA1 eb787a65341d7bced3458766f7094b08f02b712f SHA256 d0e8cbe6ce6a484ffb81697425b3b933746882f6f1521ac71c5c88971cee7684 EBUILD iputils-20070202.ebuild 2043 RMD160 7974abd26a600ffb24f24e3adea2f846b2887a93 SHA1 1b0ddb948fc99c6f38809d4100e0fd19299fe101 SHA256 99beb35a92a3f915f617aa840c9355ce458de7c2bd01a4dcfb0feefa52c11939 EBUILD iputils-20071127-r1.ebuild 2192 RMD160 2f2538abfb9d787cc148abdfa1f1fd6e965ac5e5 SHA1 15157576ee579cf1e582c0a141519020e5541f8e SHA256 3fb3d190062b61ab9c3586d5b31432003bddfafcb425e13099d95f9d69f7cfa3 EBUILD iputils-20071127-r2.ebuild 2323 RMD160 a0473c2c8841ac32b12a6118807a67028289582a SHA1 ca78bceb7c7497c7f36f645fc6db4f179f84367f SHA256 4f469e2813d16791318e01e33cc35ee85ff5ac570d08fa1fc8ebee7320f1b1ca EBUILD iputils-20071127.ebuild 2059 RMD160 bea5e3eb0cb791489dd732699b680b7131429732 SHA1 45be95f84871b9d68bb14dbc88c4dea5aa2aca4d SHA256 8cac35689da454772354202289eb01a36b29059dbf7929938c12b0bb09e97954 +EBUILD iputils-20100418.ebuild 2048 RMD160 58972af6f2bdd5212fc960ec90e4d21f29d1d6be SHA1 1f0fbe12675f3cd3c911be377bcf62bb0ed29490 SHA256 5f40c7c0e5e8c68c01ca251562b1568cc5554edc75af1c7c789b12bcaa4bcfd0 EBUILD iputils-99999999.ebuild 1690 RMD160 6a12ea8de1be1877c69117bccb296381f0a88fd4 SHA1 340e3dc9d7e354629db429930cb5a64082a62798 SHA256 5e15b7bf264c4ef2e5c69d6e2f78a2aa279a89e05e10651ec08f85788893b103 -MISC ChangeLog 11144 RMD160 2805253c055a998f6c432998a4205c812a1ce335 SHA1 5e52b21c4131a502802597f111e2e6b8cac22b70 SHA256 dca2863c638bf9ed7cb21cfed01d83df300303041b0aa868cafcba445a23ca01 +MISC ChangeLog 11535 RMD160 23d34488c1f5b0613305280de02a5c9008bda401 SHA1 0c5a50a8bde2b984ee0916c38e5e6948d6ec120a SHA256 1f8e8f7ad93fe1f136e498af34a663013c43f43332b928eef0869a85f8b1a7c1 MISC metadata.xml 299 RMD160 44839875595bd58f9d7f5245d366eb3d0e1ffb1f SHA1 224a2c26c04621e6277b1d887902911e4a9bc2eb SHA256 d028d4ba25f3ed29afbbf77abd924a617098bff71e6a0c37b7d6c0a24cd65a78 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.11 (GNU/Linux) +Version: GnuPG v2.0.15 (GNU/Linux) -iEYEARECAAYFAktGAzUACgkQNQqtfCuFneNeKACbB3HzqEPp7uEkcF3QADDFFB9D -h14AnjeWygi1e0nUvJu2TJ2R50xEn0qV -=64hd +iF4EAREIAAYFAkxmLSMACgkQTwhj9JtAlp7lUgEAgXktHonoR6Xsyf8cOWghO9WX +YqvunQPDRfXUc5YBDyAA/1W6fZhFTzALZtV4R5zicG1OBACkCTg3pfFhJBovh0rI +=DqF9 -----END PGP SIGNATURE----- diff --git a/net-misc/iputils/files/iputils-20100418-aliasing.patch b/net-misc/iputils/files/iputils-20100418-aliasing.patch new file mode 100644 index 000000000000..48fb4d3bc2c2 --- /dev/null +++ b/net-misc/iputils/files/iputils-20100418-aliasing.patch @@ -0,0 +1,93 @@ +From f36fbe8c85223def663f46499d0b6b9a75939aaa Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 14 Aug 2010 01:34:13 -0400 +Subject: [PATCH] fix up strict-aliasing warnings + +Current build of some tools results in gcc warning about strict-aliasing +violations. So change those freaky casts to memcpy's. When the pointer +types work out, gcc will optimize this away anyways. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + ping6.c | 13 +++++++++---- + tracepath.c | 2 +- + tracepath6.c | 2 +- + 3 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/ping6.c b/ping6.c +index c5ff881..86f9216 100644 +--- a/ping6.c ++++ b/ping6.c +@@ -1104,18 +1104,21 @@ int build_niquery(__u8 *_nih) + { + struct ni_hdr *nih; + int cc; ++ __u16 this_nonce; + + nih = (struct ni_hdr *)_nih; + nih->ni_cksum = 0; + +- CLR(ntohs((*(__u16*)(nih->ni_nonce))) % mx_dup_ck); ++ memcpy(&this_nonce, &nih->ni_nonce, sizeof(this_nonce)); ++ CLR(ntohs(this_nonce) % mx_dup_ck); + + nih->ni_type = ICMPV6_NI_QUERY; + cc = sizeof(*nih); + datalen = 0; + + memcpy(nih->ni_nonce, ni_nonce, sizeof(nih->ni_nonce)); +- *(__u16*)(nih->ni_nonce) = htons(ntransmitted + 1); ++ this_nonce = htons(ntransmitted + 1); ++ memcpy(&nih->ni_nonce, &this_nonce, sizeof(this_nonce)); + + nih->ni_code = ni_subject_type; + nih->ni_qtype = htons(ni_query); +@@ -1331,7 +1334,7 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) + #endif + if (c->cmsg_len < CMSG_LEN(sizeof(int))) + continue; +- hops = *(int*)CMSG_DATA(c); ++ memcpy(&hops, CMSG_DATA(c), sizeof(int)); + } + } + +@@ -1355,7 +1358,9 @@ parse_reply(struct msghdr *msg, int cc, void *addr, struct timeval *tv) + return 0; + } else if (icmph->icmp6_type == ICMPV6_NI_REPLY) { + struct ni_hdr *nih = (struct ni_hdr *)icmph; +- __u16 seq = ntohs(*(__u16 *)nih->ni_nonce); ++ __u16 seq; ++ memcpy(&seq, &nih->ni_nonce, sizeof(seq)); ++ seq = ntohs(seq); + if (memcmp(&nih->ni_nonce[2], &ni_nonce[2], sizeof(ni_nonce) - sizeof(__u16))) + return 1; + if (gather_statistics((__u8*)icmph, sizeof(*icmph), cc, +diff --git a/tracepath.c b/tracepath.c +index ca84a69..0a14b1b 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -142,7 +142,7 @@ restart: + if (cmsg->cmsg_type == IP_RECVERR) { + e = (struct sock_extended_err *) CMSG_DATA(cmsg); + } else if (cmsg->cmsg_type == IP_TTL) { +- rethops = *(int*)CMSG_DATA(cmsg); ++ memcpy(&rethops, CMSG_DATA(cmsg), sizeof(int)); + } else { + printf("cmsg:%d\n ", cmsg->cmsg_type); + } +diff --git a/tracepath6.c b/tracepath6.c +index 5c2db8f..77a3563 100644 +--- a/tracepath6.c ++++ b/tracepath6.c +@@ -170,7 +170,7 @@ restart: + #ifdef IPV6_2292HOPLIMIT + case IPV6_2292HOPLIMIT: + #endif +- rethops = *(int*)CMSG_DATA(cmsg); ++ memcpy(&rethops, CMSG_DATA(cmsg), sizeof(int)); + break; + default: + printf("cmsg6:%d\n ", cmsg->cmsg_type); +-- +1.7.1.1 + diff --git a/net-misc/iputils/files/iputils-20100418-makefile.patch b/net-misc/iputils/files/iputils-20100418-makefile.patch new file mode 100644 index 000000000000..50a0e81c1307 --- /dev/null +++ b/net-misc/iputils/files/iputils-20100418-makefile.patch @@ -0,0 +1,35 @@ +--- Makefile ++++ Makefile +@@ -1,20 +1,17 @@ + # Path to parent kernel include files directory + LIBC_INCLUDE=/usr/include + +-DEFINES= +- + #options if you have a bind>=4.9.4 libresolv (or, maybe, glibc) + LDLIBS= +-ADDLIB= + + #options if you compile with libc5, and without a bind>=4.9.4 libresolv + # NOT AVAILABLE. Please, use libresolv. + +-CC=gcc + # What a pity, all new gccs are buggy and -Werror does not work. Sigh. + #CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g -Werror +-CCOPT=-D_GNU_SOURCE -O2 -Wstrict-prototypes -Wall -g +-CFLAGS=$(CCOPT) $(GLIBCFIX) $(DEFINES) ++CFLAGS ?= -O2 -g ++CFLAGS += -Wstrict-prototypes -Wall ++CPPFLAGS += -D_GNU_SOURCE + + IPV4_TARGETS=tracepath ping clockdiff rdisc arping tftpd rarpd + IPV6_TARGETS=tracepath6 traceroute6 ping6 +@@ -35,7 +32,7 @@ + rdisc_srv: rdisc_srv.o + + rdisc_srv.o: rdisc.c +- $(CC) $(CFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) -DRDISC_SERVER -o rdisc_srv.o rdisc.c + + + check-kernel: diff --git a/net-misc/iputils/files/iputils-20100418-ping-CVE-2010-2529.patch b/net-misc/iputils/files/iputils-20100418-ping-CVE-2010-2529.patch new file mode 100644 index 000000000000..e9ffb04e85f3 --- /dev/null +++ b/net-misc/iputils/files/iputils-20100418-ping-CVE-2010-2529.patch @@ -0,0 +1,22 @@ +https://bugs.gentoo.org/332527 + +--- iputils-s20100418/ping.c ++++ iputils-s20100418/ping.c +@@ -1083,7 +1083,7 @@ void pr_options(unsigned char * cp, int + i = j; + i -= IPOPT_MINOFF; + if (i <= 0) +- continue; ++ break; + if (i == old_rrlen + && !strncmp((char *)cp, old_rr, i) + && !(options & F_FLOOD)) { +@@ -1120,7 +1120,7 @@ void pr_options(unsigned char * cp, int + i = j; + i -= 5; + if (i <= 0) +- continue; ++ break; + flags = *++cp; + printf("\nTS: "); + cp++; diff --git a/net-misc/iputils/files/iputils-20100418-printf-size.patch b/net-misc/iputils/files/iputils-20100418-printf-size.patch new file mode 100644 index 000000000000..edde65b5914d --- /dev/null +++ b/net-misc/iputils/files/iputils-20100418-printf-size.patch @@ -0,0 +1,62 @@ +From 6ccd3b91c18d8b13bc468ef962a9ef9dfc6c4515 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Sat, 14 Aug 2010 01:16:42 -0400 +Subject: [PATCH] tracepath: re-use printf return in print_host + +The printf funcs take an int for field widths, not a size_t. Also, since +the printf funcs already return the length of chars displayed, use that +value instead of re-calculating the length with strlen. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + tracepath.c | 11 ++++------- + tracepath6.c | 11 ++++------- + 2 files changed, 8 insertions(+), 14 deletions(-) + +diff --git a/tracepath.c b/tracepath.c +index 81c22e9..ca84a69 100644 +--- a/tracepath.c ++++ b/tracepath.c +@@ -68,13 +68,10 @@ void data_wait(int fd) + + void print_host(const char *a, const char *b, int both) + { +- size_t plen = 0; +- printf("%s", a); +- plen = strlen(a); +- if (both) { +- printf(" (%s)", b); +- plen += strlen(b) + 3; +- } ++ int plen; ++ plen = printf("%s", a); ++ if (both) ++ plen += printf(" (%s)", b); + if (plen >= HOST_COLUMN_SIZE) + plen = HOST_COLUMN_SIZE - 1; + printf("%*s", HOST_COLUMN_SIZE - plen, ""); +diff --git a/tracepath6.c b/tracepath6.c +index 5cc7424..5c2db8f 100644 +--- a/tracepath6.c ++++ b/tracepath6.c +@@ -80,13 +80,10 @@ void data_wait(int fd) + + void print_host(const char *a, const char *b, int both) + { +- size_t plen = 0; +- printf("%s", a); +- plen = strlen(a); +- if (both) { +- printf(" (%s)", b); +- plen += strlen(b) + 3; +- } ++ int plen; ++ plen = printf("%s", a); ++ if (both) ++ plen += printf(" (%s)", b); + if (plen >= HOST_COLUMN_SIZE) + plen = HOST_COLUMN_SIZE - 1; + printf("%*s", HOST_COLUMN_SIZE - plen, ""); +-- +1.7.1.1 + diff --git a/net-misc/iputils/iputils-20100418.ebuild b/net-misc/iputils/iputils-20100418.ebuild new file mode 100644 index 000000000000..da2c564c9e30 --- /dev/null +++ b/net-misc/iputils/iputils-20100418.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-misc/iputils/iputils-20100418.ebuild,v 1.1 2010/08/14 05:41:57 vapier Exp $ + +inherit flag-o-matic eutils toolchain-funcs + +DESCRIPTION="Network monitoring tools including ping and ping6" +HOMEPAGE="http://www.linux-foundation.org/en/Net:Iputils" +SRC_URI="http://www.skbuff.net/iputils/iputils-s${PV}.tar.bz2 + mirror://gentoo/iputils-s${PV}-manpages.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-linux ~x86-linux" +IUSE="doc idn ipv6 SECURITY_HAZARD static" + +RDEPEND="!net-misc/rarpd + idn? ( net-dns/libidn )" +DEPEND="${RDEPEND} + virtual/os-headers" + +S=${WORKDIR}/${PN}-s${PV} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/021109-uclibc-no-ether_ntohost.patch + epatch "${FILESDIR}"/${PN}-20100418-makefile.patch + epatch "${FILESDIR}"/${PN}-20100418-printf-size.patch + epatch "${FILESDIR}"/${PN}-20100418-aliasing.patch + epatch "${FILESDIR}"/${PN}-20071127-kernel-ifaddr.patch + epatch "${FILESDIR}"/${PN}-20070202-idn.patch #218638 + epatch "${FILESDIR}"/${PN}-20100418-ping-CVE-2010-2529.patch #332527 + use SECURITY_HAZARD && epatch "${FILESDIR}"/${PN}-20071127-nonroot-floodping.patch + use static && append-ldflags -static + use ipv6 || sed -i -e 's:IPV6_TARGETS=:#IPV6_TARGETS=:' Makefile + export IDN=$(use idn && echo yes) +} + +src_compile() { + tc-export CC + emake || die "make main failed" +} + +src_install() { + into / + dobin ping || die "ping" + use ipv6 && dobin ping6 + dosbin arping || die "arping" + into /usr + dosbin tracepath || die "tracepath" + use ipv6 && dosbin trace{path,route}6 + dosbin clockdiff rarpd rdisc ipg tftpd || die "misc sbin" + + fperms 4711 /bin/ping + use ipv6 && fperms 4711 /bin/ping6 /usr/sbin/traceroute6 + + dodoc INSTALL RELNOTES + use ipv6 \ + && dosym ping.8 /usr/share/man/man8/ping6.8 \ + || rm -f doc/*6.8 + rm -f doc/setkey.8 + doman doc/*.8 + + use doc && dohtml doc/*.html +} |