From owner-freebsd-current@FreeBSD.ORG Fri Dec 16 16:27:20 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 4E9FA16A420 for ; Fri, 16 Dec 2005 16:27:20 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay01.ispgateway.de (smtprelay01.ispgateway.de [80.67.18.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B39943D7B for ; Fri, 16 Dec 2005 16:27:14 +0000 (GMT) (envelope-from freebsd-listen@fabiankeil.de) Received: (qmail 6411 invoked from network); 16 Dec 2005 16:27:13 -0000 Received: from unknown (HELO TP51.local) ([pbs]775067@[217.187.182.222]) (envelope-sender ) by smtprelay01.ispgateway.de (qmail-ldap-1.03) with SMTP for ; 16 Dec 2005 16:27:13 -0000 Date: Fri, 16 Dec 2005 17:26:43 +0100 From: Fabian Keil To: Kostik Belousov Message-ID: <20051216172643.7cb10a57@TP51.local> In-Reply-To: <20051216151016.GE84442@deviant.zoral.local> References: <20051216133448.GA10382@beastie.creo.hu> <20051216151016.GE84442@deviant.zoral.local> X-Mailer: Sylpheed-Claws 1.9.100 (GTK+ 2.8.6; i386-portbld-freebsd5.4) X-PGP-KEY-URL: http://www.fabiankeil.de/gpg-keys/freebsd-listen-2006-08-19.asc Mime-Version: 1.0 Content-Type: multipart/signed; boundary=Sig_BbIMm2NoBmmZdmNvSZPO0E1; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Csaba Henk , 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 16:27:20 -0000 --Sig_BbIMm2NoBmmZdmNvSZPO0E1 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Kostik Belousov wrote: > 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 >=20 > Sure, it is a bug :). >=20 > Please, try the following patch (against 7-CURRENT, > shall work for 6-STABLE too): >=20 > --- 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. The patch fixed the bug for 5.4-STABLE. Fabian --=20 http://www.fabiankeil.de/ --Sig_BbIMm2NoBmmZdmNvSZPO0E1 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDourWjV8GA4rMKUQRApHZAKCNxxtSA717ucXIcJCUeN5z93bv2gCgkx6R /bh1jzj7m/yUHPa5FJKFTc4= =mL65 -----END PGP SIGNATURE----- --Sig_BbIMm2NoBmmZdmNvSZPO0E1--