diff options
author | Rafael Martins <rafaelmartins@gentoo.org> | 2015-02-07 00:02:27 +0000 |
---|---|---|
committer | Rafael Martins <rafaelmartins@gentoo.org> | 2015-02-07 00:02:27 +0000 |
commit | 7c4040736779d513649cb1775221d91513863fe5 (patch) | |
tree | 4b8eeead04d34cce042aecf5c6153582aaac9882 /dev-libs/fcgi | |
parent | EAPI=5 (diff) | |
download | gentoo-2-7c4040736779d513649cb1775221d91513863fe5.tar.gz gentoo-2-7c4040736779d513649cb1775221d91513863fe5.tar.bz2 gentoo-2-7c4040736779d513649cb1775221d91513863fe5.zip |
Fixed DoS vulnerability. bug #539164
(Portage version: 2.2.15/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'dev-libs/fcgi')
-rw-r--r-- | dev-libs/fcgi/ChangeLog | 12 | ||||
-rw-r--r-- | dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r2.ebuild (renamed from dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r1.ebuild) | 5 | ||||
-rw-r--r-- | dev-libs/fcgi/files/fcgi-2.4.1_pre0910052249-poll.patch | 80 |
3 files changed, 93 insertions, 4 deletions
diff --git a/dev-libs/fcgi/ChangeLog b/dev-libs/fcgi/ChangeLog index 5050cbc7df4a..190fe7397f7a 100644 --- a/dev-libs/fcgi/ChangeLog +++ b/dev-libs/fcgi/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-libs/fcgi -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/ChangeLog,v 1.59 2013/05/16 01:40:54 rafaelmartins Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/ChangeLog,v 1.60 2015/02/07 00:02:27 rafaelmartins Exp $ + +*fcgi-2.4.1_pre0910052249-r2 (07 Feb 2015) + + 07 Feb 2015; Rafael G. Martins <rafaelmartins@gentoo.org> + +fcgi-2.4.1_pre0910052249-r2.ebuild, + +files/fcgi-2.4.1_pre0910052249-poll.patch, + -fcgi-2.4.1_pre0910052249-r1.ebuild: + Fixed DoS vulnerability. bug #539164 16 May 2013; Rafael G. Martins <rafaelmartins@gentoo.org> metadata.xml: New maintainer diff --git a/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r1.ebuild b/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r2.ebuild index 5f7b35478f32..77ae60fa72c0 100644 --- a/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r1.ebuild +++ b/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r1.ebuild,v 1.1 2012/10/29 15:00:44 ottxor Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/fcgi/fcgi-2.4.1_pre0910052249-r2.ebuild,v 1.1 2015/02/07 00:02:27 rafaelmartins Exp $ EAPI="4" @@ -26,6 +26,7 @@ src_prepare() { epatch "${FILESDIR}/fcgi-2.4.0-html-updates.patch" epatch "${FILESDIR}"/fcgi-2.4.1_pre0311112127-gcc44.patch epatch "${FILESDIR}"/${P}-link.patch + epatch "${FILESDIR}"/${P}-poll.patch eautoreconf } diff --git a/dev-libs/fcgi/files/fcgi-2.4.1_pre0910052249-poll.patch b/dev-libs/fcgi/files/fcgi-2.4.1_pre0910052249-poll.patch new file mode 100644 index 000000000000..82b9f15a846c --- /dev/null +++ b/dev-libs/fcgi/files/fcgi-2.4.1_pre0910052249-poll.patch @@ -0,0 +1,80 @@ +diff -uNr fcgi-2.4.1-SNAP-0910052249.orig/libfcgi/os_unix.c fcgi-2.4.1-SNAP-0910052249/libfcgi/os_unix.c +--- fcgi-2.4.1-SNAP-0910052249.orig/libfcgi/os_unix.c 2015-02-06 21:49:40.677082591 -0200 ++++ fcgi-2.4.1-SNAP-0910052249/libfcgi/os_unix.c 2015-02-06 21:54:23.147097903 -0200 +@@ -42,6 +42,7 @@ + #include <sys/time.h> + #include <sys/un.h> + #include <signal.h> ++#include <poll.h> + + #ifdef HAVE_NETDB_H + #include <netdb.h> +@@ -103,6 +104,9 @@ + static int shutdownPending = FALSE; + static int shutdownNow = FALSE; + ++static int libfcgiOsClosePollTimeout = 2000; ++static int libfcgiIsAfUnixKeeperPollTimeout = 2000; ++ + void OS_ShutdownPending() + { + shutdownPending = TRUE; +@@ -169,6 +173,16 @@ + if(libInitialized) + return 0; + ++ char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" ); ++ if(libfcgiOsClosePollTimeoutStr) { ++ libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr); ++ } ++ ++ char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" ); ++ if(libfcgiIsAfUnixKeeperPollTimeoutStr) { ++ libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr); ++ } ++ + asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo)); + if(asyncIoTable == NULL) { + errno = ENOMEM; +@@ -780,19 +794,16 @@ + { + if (shutdown(fd, 1) == 0) + { +- struct timeval tv; +- fd_set rfds; ++ struct pollfd pfd; + int rv; + char trash[1024]; + +- FD_ZERO(&rfds); ++ pfd.fd = fd; ++ pfd.events = POLLIN; + + do + { +- FD_SET(fd, &rfds); +- tv.tv_sec = 2; +- tv.tv_usec = 0; +- rv = select(fd + 1, &rfds, NULL, NULL, &tv); ++ rv = poll(&pfd, 1, libfcgiOsClosePollTimeout); + } + while (rv > 0 && read(fd, trash, sizeof(trash)) > 0); + } +@@ -1142,13 +1153,11 @@ + */ + static int is_af_unix_keeper(const int fd) + { +- struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL }; +- fd_set read_fds; +- +- FD_ZERO(&read_fds); +- FD_SET(fd, &read_fds); ++ struct pollfd pfd; ++ pfd.fd = fd; ++ pfd.events = POLLIN; + +- return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds); ++ return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN); + } + + /* |