[Nottingham] any issues symlinking /tmp -> /var/tmp ?

Johannes Kling jok at printk.net
Mon Aug 15 12:35:53 BST 2005


On Sat, Aug 13, 2005 at 09:33:11PM +0100, Graeme Fowler wrote:

>a good idea against random executables, barring someone running:
> 
> /lib/ld-<ver>.so <binary>
> 
> For those who haven't seen that before, it's a deadly sneaky way of 
> running executables on partitions with the noexec flag set :)

This seemed quite interesting, so I did some googling on it and played
around a bit; it seems like it's been explicitly fixed in 2.6, and
seems to be fixed in (some) 2.4 kernels as well (though I don't seem
to be able to find out when exactly this was done).

On my 2.4.29 box for example:

----
$ mount | grep noexec
/home/jk/newfs.e2fs on /home/jk/mnt type ext2 (rw,noexec,loop=/dev/loop0)
$ pwd
/home/jk/mnt
$ file hello_world
hello_world: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped
$ chmod a+x hello_world
$ ./hello_world
bash: ./hello_world: Permission denied
$ /lib/ld-2.3.2.so ./hello_world
./hello_world: error while loading shared libraries: ./hello_world: failed to map segment from shared object: Operation not permitted
----

Regards,
  Jo

-- 
"I shall press on valiantly in the face of apathy!" -- cmg




More information about the Nottingham mailing list