Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261563AbVCUFPd (ORCPT ); Mon, 21 Mar 2005 00:15:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261567AbVCUFPd (ORCPT ); Mon, 21 Mar 2005 00:15:33 -0500 Received: from relay01.mail-hub.dodo.com.au ([203.220.32.149]:1733 "EHLO relay01.mail-hub.dodo.com.au") by vger.kernel.org with ESMTP id S261563AbVCUFPB (ORCPT ); Mon, 21 Mar 2005 00:15:01 -0500 From: Grant Coady To: Peter Chubb Cc: William Beebe , linux-kernel@vger.kernel.org Subject: Re: forkbombing Linux distributions Date: Mon, 21 Mar 2005 16:14:57 +1100 Organization: scattered.homelinux.net Message-ID: References: <16958.16187.716183.994251@wombat.chubb.wattle.id.au> In-Reply-To: <16958.16187.716183.994251@wombat.chubb.wattle.id.au> X-Mailer: Forte Agent 2.0/32.652 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1432 Lines: 38 On Mon, 21 Mar 2005 14:27:55 +1100, Peter Chubb wrote: >>>>>> "William" == William Beebe writes: > >William> Sure enough, I created the following script and ran it as a >William> non-root user: > >William> #!/bin/bash $0 & $0 & > >There are two approaches to fixing this. > 1. Rate limit fork(). Unfortunately some legitimate usges do a lot > of forking, and you don't really want to slow them down. > 2. Limit (per user) the number of processes allowed. This is what's > currently done; and if you as administrator want to you can set > RLIMIT_NPROC in /etc/security/limits.conf > >On an almost-single-user system such as most desktops, there isn't much >point in setting this. On shared systems, it can be useful. Had to try it out of curiosity, five ssh logins at the time, but I hit Ctrl-S on the terminal running forkbomb, then other terminals responsive and I could recover, do 'killall forkbomb'. Even 'top' segfaulted. Machine didn't die though. slackware-current running 2.4.29-hf5 Just checked logs, messages: --> kernel: VFS: file-max limit 52427 reached nothing in syslog or debug Cheers, Grant. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/