Bug 78212 - sysstat package post scripts, trigger scripts use insecure tmp files
Summary: sysstat package post scripts, trigger scripts use insecure tmp files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sysstat
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nils Philippsen
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-20 03:58 UTC by Mike A. Harris
Modified: 2007-04-18 16:48 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-03-10 19:57:18 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2004:053 0 normal SHIPPED_LIVE Moderate: sysstat security update 2004-03-10 05:00:00 UTC
Red Hat Product Errata RHSA-2004:054 0 normal SHIPPED_LIVE : Updated sysstat packages fix security vulnerability 2004-01-29 05:00:00 UTC

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



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