• Bug#264234: initscripts: bootclean.sh file creation vulnerability

    From Zygo Blaxell@1:229/2 to Miquel van Smoorenburg on Thu Aug 12 17:10:16 2004
    From: [email protected]

    On Sun, Aug 08, 2004 at 01:10:39PM +0200, Miquel van Smoorenburg wrote:
    Well, it would indeed be a good idea to remove /tmp/.clean early in
    the boot process to prevent this.

    Actually in this particular case it will be sufficient to remove .clean immediately before touching it:

    rm -rf /tmp/.clean
    /tmp/.clean

    The assumption that makes this safe is that evil user processes (e.g.
    cron jobs, user logins, email delivers, etc) have not had a chance to
    start running yet, so they can't reinsert the symlink between those
    two lines.

    However on a standard system this
    cannot happen.

    At shutdown time, /etc/init.d/umountnfs.sh (which is really badly
    named, I admit) removes /tmp/.clean, so that should be sufficient.

    Assuming the machine goes down cleanly, of course. Most of my system
    reboots these days are due to power failures or poor resource planning
    ("Hmmm, I guess I can't run 50 instances of spamassassin on that machine
    after all, it runs out of RAM and the watchdog kills it").


    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.6 (GNU/Linux)
    Comment: For info see http://www.gnupg.org

    iD8DBQFBG4UkgfmLGlazG5wRAuSsAKCF7Zu2re3PoQknt5E1dZDo1dk0JQCeN1FC gPFlmjlgiofG9WaIqbS6LbI=
    =CXnz
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)