PatchLink Update Unix Client File clobbering vulnerability
Larry W. Cashdollar
Overview From the vendor:
=93PatchLink Update=99 provides rapid, accurate and secure patch management, allowing you to proactively manage threats by automating the collection, analysis and delivery of patches throughout your enterprise. PatchLink Update significantly decreases the costs involved in securing your organization from worms, Trojans, viruses and other malicious threats.=94
The log rotation utility =93logtrimmer=94 utilizes space in /tmp improperly and is subject to a symlink attack. By creating a targeted symlink a non root user can clobber root owned files causing DoS.
nobody:/tmp> ln -s /etc/shadow patchlink.tmp
After logs are rotated
/etc/shadow will be size 0, since patchlink.tmp is removed by logtrimmer after the log rotation process has finished.
Create a subdirectory under /tmp or /var/tmp to work from.
For example adding:
chmod 700 /var/tmp/plink
The script rebootTask contains the following lines for HP-UX Shutdown and reboot:
echo "shutdown -r -y 120" > /tmp/plshutdown
chmod 500 /tmp/plshutdown
at now < /tmp/plshutdown
A race condition exists where a local user could symlink /tmp/plshutdown to a file in their home directory and inject malicous code. This could be done possibly by continuously writing to the file while waiting for the at command to run.
$ ln -s /tmp/plshutdown /var/tmp/runme
`echo "chmod 777 /etc/shadow" > /var/tmp/runme`;
Also could be fixed by creating a subdirectory to work from under /var/tmp or /tmp.