See the following Gentoo Linux Bugzilla bugs for full details:
http://bugs.gentoo.org/show_bug.cgi?id=105000
http://bugs.gentoo.org/show_bug.cgi?id=116510
Summary: Possible symlink attack (race condition), and also possibility to create a untrusted script into the tmp_script (race condition).
Logged In: YES
user_id=1745635
Originator: YES
Patch #1 of 2. Addresses race condition but introduced some remote buffer test issues.
Logged In: YES
user_id=1745635
Originator: YES
Hmm. Can't attach the patch file. SourceForge issue? Will try later.