Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 78212

Summary: sysstat package post scripts, trigger scripts use insecure tmp files
Product: [Retired] Red Hat Linux Reporter: Mike A. Harris <mharris>
Component: sysstatAssignee: Nils Philippsen <nphilipp>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: mjc
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-10 19:57:18 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Mike A. Harris 2002-11-20 03:58:59 UTC
Subject says it all.  The sysstat package uses insecure method of
generating temporary filenames by using the PID in /tmp

Comment 1 Alan Cox 2002-12-19 01:20:43 UTC
So does the isag binary it includes btw


Comment 2 Alan Cox 2002-12-19 01:24:36 UTC
--- sysstat.spec~       Sat Nov 23 05:33:21 2002
+++ sysstat.spec        Wed Dec 18 20:26:44 2002
@@ -53,8 +53,8 @@
 %triggerpostun -- sysstat <= 3.3.3-1
 # earlier versions of sysstat had crontabs done in a bad way.  fix it.
 if [ `id -u` = "0" -a "$1" -ge "2" ]; then
-  egrep -v 'sysstat|sa1|sa2' /etc/crontab > /tmp/crontab.$$
-  mv /tmp/crontab.$$ /etc/crontab && chmod 644 /etc/crontab
+  egrep -v 'sysstat|sa1|sa2' /etc/crontab > /etc/crontab.tmp$$
+  mv /etc/crontab.tmp$$ /etc/crontab && chmod 644 /etc/crontab
 fi

 %preun


Comment 3 Mark J. Cox 2004-01-05 09:40:49 UTC
still affects 9

Comment 4 Nils Philippsen 2004-01-20 15:02:09 UTC
I have built packages with this fixed for RHEL2.1, RHEL3, fc2. As soon
as someone tells me (where to find documentation about) how to check
this into CVS, pipe this through beehive, feed this to QA for errata,
I'll make the fixed packages available. Sorry, but I'm new to all this
;-).

Comment 5 Nils Philippsen 2004-01-29 19:28:21 UTC
isag tmp hole is also fixed in sysstat-4.0.1-8 (for RHEL2.1), using
mktemp.

Comment 6 Mark J. Cox 2004-03-10 19:57:18 UTC
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2004-053.html