- Fix fd_set vulnerability and save this port to be removed

- Bump PORTREVISION

Provided by:	author
This commit is contained in:
Renato Botelho 2006-09-03 12:53:16 +00:00
parent 718b1278a8
commit c65763847e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=172045
2 changed files with 17 additions and 2 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= jabber
PORTVERSION= 1.4.3.1
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= net-im
MASTER_SITES= http://devel.amessage.info/jabberd14/
@ -19,8 +20,6 @@ COMMENT= Online presence and instant messaging server
LIB_DEPENDS= pth.20:${PORTSDIR}/devel/pth \
expat.6:${PORTSDIR}/textproc/expat2
DEPRECATED= fd_set -- bitmap index overflow in multiple applications.
USE_RC_SUBR= jabberd.sh
USE_BZIP2= yes
GNU_CONFIGURE= yes

View File

@ -0,0 +1,16 @@
--- jabberd/mio.c.orig Wed Nov 12 22:19:08 2003
+++ jabberd/mio.c Sun Sep 3 09:40:22 2006
@@ -530,6 +530,13 @@
return NULL;
}
+ /* do not accept a higher fd than FD_SET, or FD_CLR can handle */
+ if (fd >= FD_SETSIZE) {
+ log_warn(NULL, "could not accept incomming connection, maximum number of connections reached (%i)", FD_SETSIZE);
+ close(fd);
+ return NULL;
+ }
+
#ifdef WITH_IPV6
allow = _mio_allow_check(inet_ntop(AF_INET6, &serv_addr.sin6_addr, addr_str, sizeof(addr_str)));
deny = _mio_deny_check(addr_str);