From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 15:10:46 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org 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 7296616A41F for ; Fri, 16 Dec 2005 15:10:46 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id CEFE743D80 for ; Fri, 16 Dec 2005 15:10:37 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.38]) by fw.zoral.com.ua (8.13.3/8.13.1) with ESMTP id jBGFAI13007233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Dec 2005 17:10:18 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.4/8.13.4) with ESMTP id jBGFAHE2052881; Fri, 16 Dec 2005 17:10:17 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.4/8.13.4/Submit) id jBGFAG5C052880; Fri, 16 Dec 2005 17:10:16 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 16 Dec 2005 17:10:16 +0200 From: Kostik Belousov To: Csaba Henk Message-ID: <20051216151016.GE84442@deviant.zoral.local> References: <20051216133448.GA10382@beastie.creo.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WChQLJJJfbwij+9x" Content-Disposition: inline In-Reply-To: <20051216133448.GA10382@beastie.creo.hu> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on fw.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: Easy DoS X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 16 Dec 2005 15:10:46 -0000 --WChQLJJJfbwij+9x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 16, 2005 at 02:34:48PM +0100, Csaba Henk wrote: > Do >=20 > echo 'main() { write(1, 0, 1); }' > edos.c > gcc -o edos edos.c > ./edos | cat >=20 > ... and now the edos process gets stuck in the write syscall, unkillably, > keeping the CPU spinning. (Seen on my 6.0-RELEASE and 7.0-CURRENT boxen.) >=20 > Is it a bug or a feature? >=20 > Csaba Sure, it is a bug :). Please, try the following patch (against 7-CURRENT, shall work for 6-STABLE too): --- src-pristine/sys/kern/sys_pipe.c Mon Jul 11 11:33:58 2005 +++ src-quotas/sys/kern/sys_pipe.c Fri Dec 16 17:03:01 2005 @@ -1176,6 +1176,8 @@ ("Pipe buffer overflow")); } pipeunlock(wpipe); + if (error !=3D 0) + break; } else { /* * If the "read-side" has been blocked, wake it up = now. Best regards, Kostik Belousov --WChQLJJJfbwij+9x Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDotjWC3+MBN1Mb4gRAgmTAJ49URDjOy/WU9j4bZgx0iYUzSHz7gCdFDPB huwhGk09BPeSoLV8FhzOS5s= =6lBC -----END PGP SIGNATURE----- --WChQLJJJfbwij+9x--