Bug 435420 - (CVE-2008-1078) CVE-2008-1078 am-utils: insecure usage of temporary files
CVE-2008-1078 am-utils: insecure usage of temporary files
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Red Hat Product Security
http://nvd.nist.gov/nvd.cfm?cvename=C...
reported=20080214,source=vendorsec,im...
: Security
Depends On: 437746
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-29 02:58 EST by Tomas Hoger
Modified: 2010-12-23 11:33 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-23 11:33:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Tomas Hoger 2008-02-29 02:58:10 EST
Common Vulnerabilities and Exposures assigned an identifier CVE-2008-1078 to the following vulnerability:

expn in the am-utils and net-fs packages for Gentoo rPath Linux, and
other distributions, allows local users to overwrite arbitrary files
via a symlink attack on the expn[PID] temporary file.  NOTE: this is
the same issue as CVE-2003-0308.1.

References:
http://bugs.gentoo.org/show_bug.cgi?id=210158
Comment 1 Tomas Hoger 2008-02-29 03:02:53 EST
Suggested patch:

--- expn.orig   2008-02-14 15:34:05.083376000 +0000
+++ expn        2008-02-14 15:37:11.380887000 +0000
@@ -9,6 +9,7 @@
 # hardcoded constants, should work fine for BSD-based systems
 #require 'sys/socket.ph';      # perl 4
 use Socket;                    # perl 5
+use Fcntl;
 $AF_INET = &AF_INET;
 $SOCK_STREAM = &SOCK_STREAM;
 
@@ -1009,7 +1010,7 @@
        }
 
        $0 = "$av0 - nslookup of $server";
-       open(T,">/tmp/expn$$") || die "open > /tmp/expn$$: $!\n";  
+       sysopen(T,"/tmp/expn$$", O_EXCL | O_CREAT) || die "open > /tmp/expn$$:
$!\n";
        print T "set querytype=MX\n";
        print T "$server\n";
        close(T);
Comment 2 Josh Bressers 2008-03-04 14:10:45 EST
I'm going to wontfix this flaw.  The time and effort required to fix it is far
greater than the possible damage is can do.

After investigating the source for all of Red Hat Enterprise Linux, it was noted
that nothing shipped ever runs this tool.  This means that the only possible way
this can be exploited is if an admin runs it manually, or via a custom script.

If you feel this analysis if flawed, please feel free to add a comment.
Comment 4 Tomas Hoger 2008-03-17 04:34:26 EDT
No package in Fedora 8 depends on am-utils or /usr/bin/expn.

I've created tracking bug for Fedora rawhide, so that this issue gets fixed for
future versions of Fedora and Red Hat Enterprise Linux.
Comment 5 Fedora Update System 2008-12-02 08:29:58 EST
am-utils-6.1.5-8.1.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/am-utils-6.1.5-8.1.fc9
Comment 6 Fedora Update System 2009-01-07 04:33:47 EST
am-utils-6.1.5-8.1.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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