Bug 135645 - The crontab command leaves a temp file in /var/spool/cron on CTRL-c
Summary: The crontab command leaves a temp file in /var/spool/cron on CTRL-c
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vixie-cron
Version: 3.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Marcela Mašláňová
QA Contact: Brock Organ
URL:
Whiteboard: impact=low,public=20041013
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-10-13 23:55 UTC by John Caruso
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: vixie-cron-4.1-6_EL3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-29 08:29:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Caruso 2004-10-13 23:55:31 UTC
Description of problem:
If a user runs crontab and then exits with CTRL-c, the crontab 
command will leave behind a file named "tmp.<PID>" 
in /var/spool/cron.  I've verified that this happens with current 
versions of vixie-cron on both RHEL 3 and RHAS 2.1.

Version-Release number of selected component (if applicable):
vixie-cron-3.0.1 (-75.1 on RHEL 3, -63.1 on RHAS 2.1)

How reproducible:
Run crontab and hit CTRL-c, then check the contents 
of /var/spool/cron.

Steps to Reproduce:
1. crontab
2. CTRL-c
  
Actual results:
A spurious temporary file is left behind in /var/spool/cron.

Expected results:
The crontab command cleans up after itself after a CTRL-c.

Additional info:
This is potentially a security issue since it allows a normal user to 
create files in /var/spool/cron with relatively predictable names.  
It seems that it would only be exploitable if there were a user 
named "tmp.<PID>" on the system, however, which is unlikely.

Comment 1 Jason Vas Dias 2004-10-14 15:21:20 UTC
OK, I'll fix this in the next release.

Comment 2 Jason Vas Dias 2005-06-01 23:51:00 UTC
This bug is fixed in with vixie-cron-4.1-6_EL3, which should be in
RHEL-3-U6, but which meanwhile can be downloaded from:
http://people.redhat.com/~jvdias/cron/RHEL-3/4.1-6_EL3

Comment 3 Josh Bressers 2005-06-17 16:25:19 UTC
I am removing the security severity.  While this does put a file in
/var/spool/cron, you cannot control the contents of the file (empty in this
instance).

Comment 4 Marcela Mašláňová 2006-08-29 08:29:28 UTC
The bug was fixed in vixie-cron-4.1-6_EL3. 


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