[Full-Disclosure] Security hole in Confixx backup script

Dirk Pirschel dirk at pirschel.de
Wed Aug 11 00:39:04 BST 2004


Hi,

* Dirk Pirschel wrote on Tue, 10 Aug 2004 at 12:42 +0200:

> The race condition between "tar xzf" and "chmod -R" can be won, if there
> are many files or simply one big file in the archives.  A quick "mv"
> should prevent the suid programm from beeing chown()ed.

There is no race condition at all.  We can simply use a symlink, which
is only followed by "cd; tar".  (Remember that tar gets executed with a
relative path to ../restore/<tarfile>, but this is no problem ;-). chown
is called with an absolute path and changes the UID of the link.

-Dirk

-- 
Close the windows - the penguin is freezing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.grok.org.uk/pipermail/full-disclosure/attachments/20040811/ccd7d2ad/attachment.bin 


Full-Disclosure is hosted and sponsored by Secunia.