From: Karl Magdsick <kmagnum@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] elf interpreter prefix scanning can get stuck in a loop
Date: Mon, 20 Dec 2004 00:23:07 -0500 [thread overview]
Message-ID: <cd8ecdef04121921231ec46156@mail.gmail.com> (raw)
In-Reply-To: <20041218220903.GB832@xi.wantstofly.org>
Under Linux (or maybe it's inside bash), there is a hard-coded limit
to the maximum number of symlinks to be followed in any path. I've
hit this limit before, but I'm not sure what it is. A maximum symlink
count sounds like a quick-and dirty way to prevent infinite recursion.
The limit I hit seemed too restrictive, but something around 256
symlink traversals seems reasonable. Once you've followed 256
symlinks, it's a fair bet that something is wrong. The limit I hit
seemed to be in the neighborhood of 10.
-Karl
On Sat, 18 Dec 2004 23:09:03 +0100, Lennert Buytenhek
<buytenh@wantstofly.org> wrote:
> Hi,
>
> init_paths() seems to be able to get stuck in an 'infinite' loop. For
> example when encountering a '.' symlink:
>
> open("/data/fc2/arm/root/usr/include/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/beecrypt/asm-generic", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 27
>
> I'd suggest to always skip symlinks but that doesn't seem like the right
> thing to do..
>
> --L
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
prev parent reply other threads:[~2004-12-20 5:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-18 22:09 [Qemu-devel] elf interpreter prefix scanning can get stuck in a loop Lennert Buytenhek
2004-12-20 5:23 ` Karl Magdsick [this message]
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=cd8ecdef04121921231ec46156@mail.gmail.com \
--to=kmagnum@gmail.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).