From: Daniel Phillips <phillips@bonn-fries.net>
To: Linus Torvalds <torvalds@transmeta.com>, <Andries.Brouwer@cwi.nl>
Cc: Alexander Viro <viro@math.psu.edu>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH+discussion] symlink recursion
Date: Wed, 19 Jun 2002 16:44:48 +0200 [thread overview]
Message-ID: <E17KghU-0000oC-00@starship> (raw)
In-Reply-To: <Pine.LNX.4.33.0206181646220.2562-100000@penguin.transmeta.com>
On Wednesday 19 June 2002 01:57, Linus Torvalds wrote:
> I see no advantages to handling it by hand, since this isn't even a very
> deep recursion, and since even if you do the recursive part by hand by a
> linked list you still need to limit the depth _anyway_ to avoid DoS
> attacks.
It's the recursive trip through the filesystem that causes the problem.
Suddenly the stack space consumption becomes (N * greediest_filesystem) and
that has to be factored into all worst case calculations. It's a huge hole
to blow out of this severely restricted resource, so reducing N to 1 is a big
deal.
Also, as a practical matter, it's much easier to lay down a rule for
filesystem developers that reads: "thou shalt in no case use more than N
bytes of stack on your longest path" than "in no case use more than N bytes
of stack except on any symlink resolution path, in which case see the limit
on recursive symlinks to know how to analyze that path".
--
Daniel
next prev parent reply other threads:[~2002-06-19 14:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-18 22:19 Andries.Brouwer
2002-06-18 23:57 ` Linus Torvalds
2002-06-19 7:12 ` William Lee Irwin III
2002-06-19 11:48 ` Rogier Wolff
2002-06-19 14:44 ` Daniel Phillips [this message]
2002-06-19 16:05 ` Linus Torvalds
2002-06-19 18:18 ` Andries Brouwer
2002-06-19 18:55 ` Linus Torvalds
2002-06-19 19:14 ` David Mosberger
2002-06-19 22:06 ` David S. Miller
2002-06-19 7:02 Andries.Brouwer
2002-06-19 20:01 Andries.Brouwer
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=E17KghU-0000oC-00@starship \
--to=phillips@bonn-fries.net \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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®