From owner-freebsd-current@FreeBSD.ORG Mon Sep 27 23:07:20 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1213A16A4CE; Mon, 27 Sep 2004 23:07:20 +0000 (GMT) Received: from mail.dt.e-technik.uni-dortmund.de (mail.dt.E-Technik.Uni-Dortmund.DE [129.217.163.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 937A143D3F; Mon, 27 Sep 2004 23:07:19 +0000 (GMT) (envelope-from ma@dt.e-technik.uni-dortmund.de) Received: from localhost (localhost [127.0.0.1])99DB940B01; Tue, 28 Sep 2004 01:07:18 +0200 (CEST) Received: from mail.dt.e-technik.uni-dortmund.de ([127.0.0.1]) by localhost (krusty [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28759-01-2; Tue, 28 Sep 2004 01:07:18 +0200 (CEST) Received: from m2a2.dyndns.org (p508EFEB6.dip.t-dialin.net [80.142.254.182]) 3DA2540AFF; Tue, 28 Sep 2004 01:07:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by merlin.emma.line.org (Postfix) with ESMTP id 6947FCC37E; Tue, 28 Sep 2004 01:07:17 +0200 (CEST) Received: from merlin.emma.line.org ([127.0.0.1]) by localhost (m2a2.dyndns.org [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07242-02; Tue, 28 Sep 2004 01:07:17 +0200 (CEST) Received: by merlin.emma.line.org (Postfix, from userid 500) id 0750FCC21C; Tue, 28 Sep 2004 01:07:17 +0200 (CEST) To: Scott Long In-Reply-To: <41584682.9050204@FreeBSD.org> (Scott Long's message of "Mon, 27 Sep 2004 10:57:38 -0600") References: <415720FD.8080603@samsco.org> <415812AD.2090901@FreeBSD.org> <16728.17900.196968.145116@ran.psg.com> <41584682.9050204@FreeBSD.org> From: Matthias Andree Date: Tue, 28 Sep 2004 01:07:16 +0200 Message-ID: User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at dt.e-technik.uni-dortmund.de cc: Randy Bush cc: current@FreeBSD.org Subject: inetd default behavior (was: FreeBSD 5.3-BETA6 available) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Sep 2004 23:07:20 -0000 Scott Long writes: > I understand and appreciate that. That's why I asked how other OS's > handle inetd. Ideally, the default configuration would limit the number of clients to some fixed figure, rather than limiting the number of connections. The latter is ineffective to control resource in the general case because it places no fixed upper limit and an attacker can run the machine out of file descriptors or memory. This is no news, Dan J. Bernstein, like him or not, has published this problem in 2000 at http://cr.yp.to/docs/inetd.html already. I'm not sure if this is a documentation issue or a configuration issue. I originally filed this in the "conf" category but it has one foot on the "docs" camp, too. On one hand, I'd say that setting inetd_enable=YES shouldn't cause DoS surprises, on the other hand I'm aware that there are so many options that have an impact on the choice which service should allow how many clients that it's impossible for the OS to offer a sensible default. DJB's tcpserver (not open source) uses a client limit of 40 unless otherwise configured, xinetd does not impose client limits by default but requires "instances=40" or similar configuration. The inetd shipping with SuSE Linux is outright crap of the old kind, allowing for 40 spawns per service per minute. In a previous discussion it was mentioned that changing the default might surprise users who run loaded services with many clients - so the last chance to make incompatible changes before 6 becomes "stable" is now. FreeBSD's inetd is among the better of its kind for its libwrap integration and absolute client limiting capabilities but the latter is not used in the default configuration but the unhelpful rate limiting. -- Matthias Andree Encrypted mail welcome: my GnuPG key ID is 0x052E7D95 (PGP/MIME preferred)