SecurityTracker.com
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 


Category:   Application (Multimedia)  >   ImageMagick Vendors:   ImageMagick.org
ImageMagick Unsafe Temporary Files May Let Local Users Gain Elevated Privileges
SecurityTracker Alert ID:  1007078
SecurityTracker URL:  http://securitytracker.com/id/1007078
CVE Reference:   CVE-2003-0455   (Links to External Site)
Date:  Jun 29 2003
Impact:   Modification of system information, Modification of user information, User access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 5.5.7 and prior versions
Description:   A vulnerability was reported in ImageMagick. A local user may be able to obtain elevated privileges on the system.

Matthew Wilcox reported that the convert function uses temporary files in an unsafe manner when converting Postscript files using ghostscript. A local user can create a symbolic link from a target file on the system to a temporary file used by ImageMagick. Then, when the target user invokes ImageMagick to process a Postscript file, the symlinked target file will be overwritten by the ghostscript output. The file will be overwritten with the privileges of the target user.

Impact:   A local user may be able to cause a target user to overwrite an arbitrary file with the privileges of the target user. The local user may be able to gain elevated privileges.
Solution:   The vendor has released a fixed version (5.5.7 beta and later versions), available at:

http://www.imagemagick.org/www/archives.html?

Vendor URL:  www.imagemagick.org/ (Links to External Site)
Cause:   Access control error, State error
Underlying OS:  Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Jun 29 2003 (Debian Issues Fix) ImageMagick Unsafe Temporary Files May Let Local Users Gain Elevated Privileges
Debian has released a fix.
Oct 20 2004 (Red Hat Issues Fix) ImageMagick Unsafe Temporary Files May Let Local Users Gain Elevated Privileges
Red Hat has released a fix for Red Hat Enterprise Linux 2.1.



 Source Message Contents

Subject:  ImageMagick Bug


http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=186611

 > Date: Fri, 28 Mar 2003 14:51:11 +0000
 > From: Matthew Wilcox <willy@debian.org>

 > Subject: Unsafe tmpfile handling

 > Package: imagemagick
 > Version: 4:5.5.5.3-1
 > Severity: serious
 > Tags: security
 >
 > convert uses tmpfiles in an unsafe manner when converting from postscript.
 > Example:

 > 5909  stat64("/tmp/magiceCEbQMoxBkzGky.tmp", 0xbfffb6e0) = -1 ENOENT (No such fi
 > le or directory)
 > 5910  execve("/bin/sh", ["sh", "-c", "/usr/bin/gs -q -dBATCH -dMaxBitmap=5000000
 > 0 -dNOPAUSE -sDEVICE=pnmraw -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g19041x1841
 > 3 -r72x72  -sOutputFile=/tmp/magiceCEbQMoxBkzGky.tmp -- \"/tmp/magicAVIavFrRH9F6
 > vZ.tmp\" -c quit"], [/* 23 vars */]) = 0
 > 5910  execve("/usr/bin/gs", ["/usr/bin/gs", "-q", "-dBATCH", "-dMaxBitmap=500000
 > 00", "-dNOPAUSE", "-sDEVICE=pnmraw", "-dTextAlphaBits=4", "-dGraphicsAlphaBits=4
 > ", "-g19041x18413", "-r72x72", "-sOutputFile=/tmp/magiceCEbQMoxBkzGky.tmp", "--"
 > , "/tmp/magicAVIavFrRH9F6vZ.tmp", "-c", "quit"], [/* 22 vars */]) = 0
 > 5910  open("/tmp/magiceCEbQMoxBkzGky.tmp", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 18
 >
 > If I sneak in and create a symlink to, say, /home/arafune/mbox, i can
 > overwrite your email with the output from gs.



 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

This web site uses cookies for web analytics. Learn More

Copyright 2019, SecurityGlobal.net LLC