]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
This may apply to all known versions of inetd.
authorPoul-Henning Kamp <phk@FreeBSD.org>
Wed, 22 Jul 1998 05:53:53 +0000 (05:53 +0000)
committerPoul-Henning Kamp <phk@FreeBSD.org>
Wed, 22 Jul 1998 05:53:53 +0000 (05:53 +0000)
commit02c589d9e96031f3814a58b3ff8b915b7f035aed
tree4d65df3a8feda095f35bd0af164b7b59e113d07c
parent6f48600e53c436cff2a449f13b5eaba00677715c
This may apply to all known versions of inetd.

For a tcp/nowait connection, inetd invokes accept(2) for
each pending connection; this call returns a file descriptor
associated with the new connection.

Twelve years ago, code was added to inetd to detect "failing
servers".  The heuristic that identifies a failing server is
one that has been invoked a large number of times over some
specified interval (e.g., more than 128 ftp services started
in 60 seconds may flag the ftp service as "failing").  These
compile-time constants vary depending on vendor.

The problem is that, when a failing server is detected, the
code neglects to close the file descriptor returned by the
accept(2).

Security-Implications:
I suppose someone with ample free time could orchestrate an
attack buy pummeling services until the inetd process finally
runs out of file descriptors thus rendering inetd useless to
any new connections that require a new descriptor.

PR: 7286
Reviewed by: phk
Submitted by: Jeff Forys <jeff@forys.cranbury.nj.us>
usr.sbin/inetd/inetd.c