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

Re: [Full-Disclosure] Security hole in Confixx backup script



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

Attachment: pgp00037.pgp
Description: PGP signature