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

SecurityTracker
Archives


 


Category:   Application (Generic)  >   webapp-config Vendors:   Gentoo
Gentoo webapp-config Unsafe Temporary File Lets Local Users Gain Elevated Privileges
SecurityTracker Alert ID:  1014027
SecurityTracker URL:  http://securitytracker.com/id/1014027
CVE Reference:   GENERIC-MAP-NOMATCH   (Links to External Site)
Date:  May 22 2005
Impact:   Execution of arbitrary code via local system, Root access via local system
Fix Available:  Yes  Vendor Confirmed:  Yes  Exploit Included:  Yes  
Version(s): prior to 1.10-r14
Description:   Eric Romang from ZATAZ reported a vulnerability in Gentoo's webapp-config utility. A local user can gain root privileges.

The utility creates temporary files in an unsafe manner. The fn_show_postinst() function creates a temporary file ('/tmp/[pid].postinst.txt') and then executes the file. A local user can overwrite the contents of the file to cause arbitrary commands to be executed when the root user installs, upgrades, or deletes Gentoo web applications via the webapp-config utility.

The vendor was notified on May 7, 2005.

A demonstration exploit is available at:

http://www.zataz.net/dev/webapp-poc.sh.txt

The original advisory is available at:

http://www.zataz.net/adviso/webapp-config-05182005.txt

Impact:   A local user can cause arbitrary commands to be executed with root privileges.
Solution:   The vendor has released a fixed version of net-www/webapp-config (1.10-r14).
Vendor URL:  www.gentoo.org/ (Links to External Site)
Cause:   Access control error, State error
Underlying OS:  Linux (Any)

Message History:   None.


 Source Message Contents

Subject:  Gentoo webapp-config insecure temporary file creation


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

#########################################################

Gentoo webapp-config insecure temporary file creation

Vendor: http://www.gentoo.org
Advisory: http://www.zataz.net/adviso/webapp-config-05182005.txt
Vendor informed: yes
Exploit available: yes
Impact : high
Exploitation : low

#########################################################

Gentoo webapp-config contain a security flaw wich could allow a
malicious local user to execute command with root privileges.

The vulnerability is due to an insecure temporary file creation.

The exploitation require that the root user install, upgrade or delete
Gentoo provided web application with the webapp-config tool.

##########
Versions:
##########

webapp-config < 1.10-r14

##########
Solution:
##########

Upgrade to net-www/webapp-config 1.10-r14

#########
Timeline:
#########

Discovered : 2005-05-07
Vendor notified : 2005-05-07
Vendor response : 2005-05-07
Vendor fix :  2005-05-08
Disclosure :

#####################
Technical details :
#####################

Vulnerable code :
- -----------------

Begin line 2711

fn_show_postinst ()
{
         if [ ! -f "${MY_APPDIR}/postinst-en.txt" ]; then
                 return
         fi

         local my_file="/tmp/$$.postinst.txt"

         fn_run_vars

         # we create a temporary file, so that we can expand the  
variables
         # that are used in the file

         echo "cat <<webapp-EOF" > "$my_file"
         cat "${MY_APPDIR}/postinst-en.txt" >> "$my_file"
         echo "webapp-EOF" >> "$my_file"

         # execute the temporary file, to generate the output

         echo
         . "$my_file"
         echo

         # it's a temporary file, so let's get rid of it now

         rm -f "$my_file"
}

#####
POC :
#####

http://www.zataz.net/dev/webapp-poc.sh.txt

#########
Related :
#########

Bug report : https://bugs.gentoo.org/show_bug.cgi?id=91785
GLSA : Waiting for it

#####################
Credits :
#####################

Eric Romang (eromang@zataz.net - ZATAZ Audit)
Thxs to Gentoo Security Team. (Taviso, jaervosz, solar, etc.)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFCkF9vXXuxWE8lDAcRAjSjAJ0e4O5D5H2CDWOBex+Aay2BCYVznwCfci+7
KGXba0qvTu5b20ABcBkABKQ=
=7wI3
-----END PGP SIGNATURE-----
 
 


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 2020, SecurityGlobal.net LLC