xinetd
Michał Kaps
ciril w faf.net.pl
Pią, 18 Kwi 2003, 19:58:19 CEST
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Witam,
Może ktoś puścić do updates nowe xinetd?
THE PROBLEM
- -----------
Using objdump -S /usr/sbin/xinetd, the block of code in question comes
from service.c:
void svc_request( struct service *sp )
{
connection_s *cp ;
status_e ret_code;
cp = conn_new( sp ) ;
if ( cp == CONN_NULL )
return ;
if (sp->svc_not_generic)
ret_code = spec_service_handler(sp, cp);
else
ret_code = svc_generic_handler(sp, cp);
if ( ret_code != OK )
{
if ( SVC_LOGS_USERID_ON_FAILURE( sp ) )
if( spec_service_handler( LOG_SERVICE( ps ), cp ) == FAILED ) {
conn_free( cp, 1 );
return;
}
CONN_CLOSE(cp);
}
}
The above code has several problems. One background piece of information
is that the sigchld handler in xinetd (child_exit->server_end->
svc_postmortem) normally frees the connection's data. If the ret_code is
not OK, the connection was only closed. This is little more than close(cp-
>co_descriptor); This does not free cp since sigchld will not be called.
It was only if the log service call failed that the connection was freed.
SOLUTION
- --------
Xinetd 2.3.11 fixes the memory leaks as well as other problems discovered
since 2.3.10 was released. All users of xinetd 2.3.10 are strongly urged
to upgrade ASAP to avoid DOS conditions. Anyone running 2.3.9 is also
strongly urged to upgrade since they are leaking file descriptors.
- --
Michał Kaps
FafNetowy SysAdmin
Registered lmule user #19 :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+oDy7QnpCkUSg7I0RAj2vAJkBwzFnJbFd6yptMvRjLvB/IEPyzACgmOYM
gwwsPQ2Tlaia9pAkmeZIjGY=
=5gjE
-----END PGP SIGNATURE-----
Więcej informacji o liście dyskusyjnej pld-devel-pl