FreeBSD VuXML: Documenting security issues in FreeBSD and the FreeBSD Ports Collection

texindex -- temporary file privilege escalation

Affected packages
6.0 <= FreeBSD < 6.0_2
5.4 <= FreeBSD < 5.4_9
5.3 <= FreeBSD < 5.3_24
4.11 <= FreeBSD < 4.11_14
4.10 <= FreeBSD < 4.10_20

Details

VuXML ID c01a25f5-8f20-11da-8c1d-000e0c2e438a
Discovery 2006-01-11
Entry 2006-01-27

Problem description

The "sort_offline" function used by texindex(1) employs the "maketempname" function, which produces predictable file names and fails to validate that the paths do not exist.

Impact

These predictable temporary file names are problematic because they allow an attacker to take advantage of a race condition in order to execute a symlink attack, which could enable them to overwrite files on the system in the context of the user running the texindex(1) utility.

Workaround

No workaround is available, but the problematic code is only executed if the input file being processed is 500kB or more in length; as a result, users working with documents of less than several hundred pages are very unlikely to be affected.

References

Bugtraq ID 14854
CVE Name CAN-2005-3011
FreeBSD Advisory SA-06:01.texindex