From: "Simon Arlott" <simon@fire.lp0.eu>
To: "Anand Jahagirdar" <anandjigar@gmail.com>
Cc: "Chris Snook" <csnook@redhat.com>,
"Krzysztof Halasa" <khc@pm.waw.pl>,
linux-kernel@vger.kernel.org
Subject: Re: Fork Bombing Patch
Date: Wed, 29 Aug 2007 12:29:40 +0100 [thread overview]
Message-ID: <33633.simon.1188386980@5ec7c279.invalid> (raw)
In-Reply-To: <25ae38200708290248w2cdd152fpbdaa1b123de0b7ef@mail.gmail.com>
On Wed, August 29, 2007 10:48, Anand Jahagirdar wrote:
> Hi
> printk_ratelimit function takes care of flooding the
> syslog. due to printk_ratelimit function syslog will not be flooded
> anymore. as soon as administrator gets this message, he can take
> action against that user (may be block user's access on server). i
> think the my fork patch is very useful and helps administrator lot.
> i would also like to mention that in some of the cases
> ulimit solution wont work. in that case fork bombing takes the machine
> and server needs a reboot. i am sure in that situation this printk
> statement helps administrator to know what has happened.
If ulimit "wont work" in some situations, how is it going to trigger this printk?
(When doesn't it work?)
> Anand
>
> On 8/24/07, Chris Snook <csnook@redhat.com> wrote:
>> Krzysztof Halasa wrote:
>> > Hi,
>> >
>> > "Anand Jahagirdar" <anandjigar@gmail.com> writes:
>> >
>> >> I am forwarding one more improved patch which i have modified as
>> >> per your suggestions. Insted of KERN_INFO i have used KERN_NOTICE and
>> >> i have added one more if block to check hard limit. how good it is?
>> >
>> > Not very, still lacks "#ifdef CONFIG_something" and the required
>> > Kconfig change (or other runtime thing defaulting to "no printk").
>>
>> Wrapping a single printk that's unrelated to debugging in an #ifdef
>> CONFIG_* or a sysctl strikes me as abuse of those configuration
>> facilities. Where would we draw the line for other patches wanting to
>> do similar things?
>>
>> I realized that even checking the hard limit it insufficient, because
>> that can be lowered (but not raised) by unprivileged processes. If we
>> can't do this unconditionally (and we can't, because the log pollution
>> would be intolerable for many people) then we shouldn't do it at all.
>>
>> Anand -- I appreciate the effort, but I think you should reconsider
>> precisely what problem you're trying to solve here. This approach can't
>> tell the difference between legitimate self-regulation of resource
>> utilization and a real attack. Worse, in the event of a real attack, it
>> could be used to make it more difficult for the administrator to notice
>> something much more serious than a forkbomb.
>>
>> I suspect that userspace might be a better place to solve this problem.
>> You could run your monitoring app with elevated or even realtime
>> priority to ensure it will still function, and you have much more
>> freedom in making the reporting configurable. You can also look at much
>> more data than we could ever allow in fork.c, and possibly detect
>> attacks that this patch would miss if a clever attacker stayed just
>> below the limit.
>>
>> -- Chris
>>
> -
> 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/
>
--
Simon Arlott
next prev parent reply other threads:[~2007-08-29 11:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 6:24 Fork Bombing Patch Anand Jahagirdar
2007-08-16 7:40 ` Petr Tesarik
2007-08-17 7:19 ` Paul Jackson
2007-08-17 7:42 ` Petr Tesarik
2007-08-17 9:05 ` Paul Jackson
2007-08-16 11:19 ` Krzysztof Halasa
2007-08-16 11:27 ` Jan Engelhardt
2007-08-20 14:26 ` Anand Jahagirdar
2007-08-20 14:38 ` Jesper Juhl
2007-08-16 21:06 ` Chris Snook
2007-08-20 14:24 ` Anand Jahagirdar
2007-08-20 14:42 ` Chris Snook
2007-08-22 6:17 ` Anand Jahagirdar
2007-08-23 11:52 ` Krzysztof Halasa
2007-08-23 19:01 ` Chris Snook
2007-08-23 21:47 ` Krzysztof Halasa
[not found] ` <7b9198260708231737t33923ec6yde48bb1338a6fa70@mail.gmail.com>
2007-08-24 0:37 ` Tom Spink
2007-08-29 9:48 ` Anand Jahagirdar
2007-08-29 11:29 ` Simon Arlott [this message]
2007-08-29 11:54 ` Anand Jahagirdar
2007-08-29 13:49 ` Chris Snook
2007-09-02 8:52 ` Kyle Moffett
[not found] ` <25ae38200806180502i4d78e240l210b261f05f10507@mail.gmail.com>
[not found] ` <25ae38200806180505m61d51440ma5754fa817dfbc0b@mail.gmail.com>
2008-06-18 13:39 ` Chris Snook
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=33633.simon.1188386980@5ec7c279.invalid \
--to=simon@fire.lp0.eu \
--cc=anandjigar@gmail.com \
--cc=csnook@redhat.com \
--cc=khc@pm.waw.pl \
--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