From: Valdis.Kletnieks@vt.edu
To: Anand Jahagirdar <anandjigar@gmail.com>
Cc: "Ahmed S. Darwish" <darwish.07@gmail.com>,
linux-kernel@vger.kernel.org, Coywolf Qi Hunt <coywolf@sosdg.org>
Subject: Re: Fork Bombing Attack
Date: Fri, 18 May 2007 13:49:16 -0400 [thread overview]
Message-ID: <11733.1179510556@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Fri, 18 May 2007 22:52:15 +0530." <25ae38200705181022l35e0b364p98fc39e5739612b@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1785 bytes --]
On Fri, 18 May 2007 22:52:15 +0530, Anand Jahagirdar said:
> output is 8050. when root or any other user changes ulimit by typing
> "ulimit -u value",.ulimit value is changed for that session and not
> permantely.
Right. That value is only applied to that process, and its children. Or more
correctly, those children that don't themselves change the value again - the
distinction is crucial in this case.
> actually ulimit should help to prevent fork bombing attack
Right. It *helps* prevent it. But it isn't by itself a total cure.
> but it wont and fork bombing attack still take down the machine having
> latest linux distributions.
>
> will any please tell me why this is so?
Because it only requires *one* process not subject to the ulimit, or a group of
cooperating processes subject to the limit, to bypass that particular
protection.
ulimits are a fairly good and inexpensive way to guard against *accidental*
runaway processes from trashing the system. They're at best a 95% solution,
and won't stop *every* case.
Consider - you determine that a small fork bomb that launches more than
7,500 processes will kill your system, so you set the ulimit to 7000.
I, as an attacker, am using a compromised userid on your system (think about
it for a moment - if I'm a *legit* user of the system, and use my own userid
for it, I'm a self-limiting problem, as I can only do it once, after which I
have to worry about getting fired, possible legal/criminal action, etc).
1) Fork bomb 6,500 processes - and have each one check the 'ulimit -m' value
and proceed to malloc() and then dirty that amount minus 5 or 10 megabytes.
2) Instead of using *one* compromised userid, I use two, and launch 6,000
processes from each...
3) Lots of *other* possibilities.....
[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]
next prev parent reply other threads:[~2007-05-18 17:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 14:45 Anand Jahagirdar
2007-05-17 15:01 ` Valdis.Kletnieks
2007-05-18 11:13 ` Anand Jahagirdar
2007-05-18 13:07 ` Michael Tokarev
2007-05-18 13:19 ` Ahmed S. Darwish
2007-05-18 17:22 ` Anand Jahagirdar
2007-05-18 17:49 ` Valdis.Kletnieks [this message]
2007-05-18 21:21 ` Krzysztof Halasa
2007-05-18 22:40 ` Bernd Eckenfels
2007-05-22 21:52 ` Mark Lord
-- strict thread matches above, loose matches on Subject: below --
2007-05-17 7:25 Fork bombing Attack Anand Jahagirdar
2007-05-17 7:39 ` Marat Buharov
2007-05-17 9:07 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11733.1179510556@turing-police.cc.vt.edu \
--to=valdis.kletnieks@vt.edu \
--cc=anandjigar@gmail.com \
--cc=coywolf@sosdg.org \
--cc=darwish.07@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®