qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] elf interpreter prefix scanning can get stuck in a loop


From: Karl Magdsick
Subject: Re: [Qemu-devel] elf interpreter prefix scanning can get stuck in a loop
Date: Mon, 20 Dec 2004 00:23:07 -0500

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
<address@hidden> 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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]