Gentoo Logo

Feynmf: Insecure temporary file creation


1.  Gentoo Linux Security Advisory

Version Information

Advisory Reference GLSA 200711-32 / feynmf
Release Date November 20, 2007
Latest Revision November 20, 2007: 01
Impact normal
Exploitable local
Package Vulnerable versions Unaffected versions Architecture(s)
dev-tex/feynmf < 1.08-r2 >= 1.08-r2 All supported architectures

Related bugreports: #198231


A vulnerability has been discovered in Feynmf allowing local users to overwrite arbitrary files via a symlink attack.

2.  Impact Information


Feynmf is a combined LaTeX and Metafont package for easy drawing of professional quality Feynman (and maybe other) diagrams.


Kevin B. McCarty discovered that the script creates a temporary "properly list" file at the location "$TMPDIR/feynmf$", where $PID is the process ID.


A local attacker could create symbolic links in the directory where the temporary files are written, pointing to a valid file somewhere on the filesystem that is writable by the user running Feynmf. When Feynmf writes the temporary file, the target valid file would then be overwritten with the contents of the Feynmf temporary file.

3.  Resolution Information


There is no known workaround at this time.


All Feynmf users should upgrade to the latest version:

Code Listing 3.1: Resolution

# emerge --sync
# emerge --ask --oneshot --verbose ">=dev-tex/feynmf-1.08-r2"

4.  References


Page updated November 20, 2007

Summary: This is a Gentoo Linux Security Advisory

Security Team
Contact Address

Donate to support our development efforts.

Copyright 2001-2015 Gentoo Foundation, Inc. Questions, Comments? Contact us.