[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UNIRAS Brief - 546/04 - Two iDEFENSE Security Advisories



 
-----BEGIN PGP SIGNED MESSAGE-----

- ----------------------------------------------------------------------------------
   UNIRAS (UK Govt CERT) Briefing Notice - 546/04 dated 05.10.04  Time: 14:45  
  UNIRAS is part of NISCC (National Infrastructure Security Co-ordination Centre)
- ---------------------------------------------------------------------------------- 
  UNIRAS material is also available from its website at www.uniras.gov.uk and
         Information about NISCC is available from www.niscc.gov.uk
- ----------------------------------------------------------------------------------

Title
=====

Two iDEFENSE Security Advisories:

1. Macromedia JRun 4 mod_jrun Apache Module Buffer Overflow Vulnerability. 

2. Samba Arbitrary File Access Vulnerability.


Detail
====== 

1. Remote exploitation of a buffer overflow vulnerability in Macromedia's JRun 4 mod_jrun Apache module could allow execution of arbitrary code.

2. Remote exploitation of an input validation vulnerability in Samba allows attackers to access files and directories outside of the specified share path.






1.
Macromedia JRun 4 mod_jrun Apache Module Buffer Overflow Vulnerability 

iDEFENSE Security Advisory 09.29.04 www.idefense.com/application/poi/display?id=145&type=vulnerabilities
September 29, 2004

I. BACKGROUND

Macromedia JRun 4 is a full Java 2 Enterprise Edition (J2EE) compatible application server.

Further details are available at:

   http://www.macromedia.com/software/jrun/

II. DESCRIPTION

Remote exploitation of a buffer overflow vulnerability in Macromedia's JRun 4 mod_jrun Apache module could allow execution of arbitrary code.

The problem specifically exists in the WriteToLog function of mod_jrun and mod_jrun20, where a fixed size buffer is allocated on the stack. No bounds checking is performed on the input. When the Verbose logging option is set, this function may be called with user-supplied data. If this data is longer than the space which has been allocated, a buffer overflow may occur. Specially formed input may allow execution of arbitrary commands.

III. ANALYSIS

Successful exploitation allows execution of arbitrary code with the permissions of the user of the httpd process, typically 'nobody' or 'apache'.

As the Verbose option is not set by default, most installs will not be vulnerable. An overly long Content-Type field, among other header fields, can be used to trigger this buffer overflow.

IV. DETECTION

iDEFENSE has confirmed that JRun 4.0 SP1a is vulnerable on Apache httpd 1.3.x and 2.0.x platforms. It is suspected that all versions of mod_jrun are currently affected.

V. WORKAROUNDS

Setting the Verbose option to "false" in the httpd.conf will prevent this vulnerability from being exploitable. After editing the httpd.conf, restart the httpd. This will reduce the amount of data logged by the server, but will prevent exploitation of this vulnerability.

VI. VENDOR RESPONSE

MPSB04-08 - Cumulative Security Patch available for JRun server http://www.macromedia.com/devnet/security/security_zone/mpsb04-08.html

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the name CAN-2004-0646 to this issue. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems.

VIII. DISCLOSURE TIMELINE

06/18/04  iDEFENSE Clients notified
06/18/04  Initial vendor notification
06/18/04  Initial vendor response
09/29/04  Public disclosure

IX. CREDIT

The discoverer wishes to remain anonymous.

Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp

X. LEGAL NOTICES

Copyright (c) 2004 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@xxxxxxxxxxxx for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.




2. 
           ESB-2004.0618 -- iDEFENSE Security Advisory 09.30.04
                 Samba Arbitrary File Access Vulnerability
                              1 October 2004

Product:                Samba
Publisher:              iDEFENSE
Operating System:       Linux variants
                        UNIX variants
Impact:                 Inappropriate Access
Access:                 Remote/Unauthenticated
CVE Names:              CAN-2004-0815
Original Bulletin URL:  http://www.idefense.com/application/poi/display?id=146

- - --------------------------BEGIN INCLUDED TEXT--------------------

Samba Arbitrary File Access Vulnerability 

iDEFENSE Security Advisory 09.30.04 www.idefense.com/application/poi/display?id=146&type=vulnerabilities
September 30, 2004

I. BACKGROUND

Samba is an Open Source/Free Software suite that provides seamless file 
and print services to SMB/CIFS clients.

II. DESCRIPTION

Remote exploitation of an input validation vulnerability in Samba allows attackers to access files and directories outside of the specified share path.

Each file and directory name passed into Samba is converted and checked with the functions unix_convert() and check_name(). The main purpose of the unix_convert() routine is to convert names from the DOS namespace to Unix namespace. It calls unix_clean_name(), which in turn removes double slashes, leading './' characters and '..' directory-traversal characters. check_name() does any final checks necessary to confirm the 
validity of the converted filename and calls reduce_name(), which in turn calls unix_clean_name() for a second time. The end result allows for an attacker to specify the realpath of any file on the computer.

Example:
/./////etc is passed to unix_clean_name(). It becomes /.///etc. The leading slash is then trimmed off to make .///etc. It is then passed to
unix_clean_name() again. The resulting string is /etc, which is an absolute path on the system.

III. ANALYSIS

Successful exploitation allows remote attackers to bypass the specified share restrictions to gain read, write and list access to files and directories under the privileges of the user. In situations where a public share is available, the attack can be performed by unauthenticated attackers.

An attacker does not need exploit code to exploit this vulnerability. The smbclient program can be used to request/write/list files using the "get", "put" and "dir" commands, respectively.

IV. DETECTION

iDEFENSE has confirmed that Samba versions 3.0.2 and 2.2.9 are 
vulnerable. It is suspected that all versions of Samba are vulnerable.

V. WORKAROUND

Only allow trusted users/hosts to connect to samba shares.

VI. VENDOR RESPONSE

Samba 2.2.12 upgrade for Samba 2.2.x: http://us4.samba.org/samba/ftp/samba-2.2.12.tar.gz

Samba 3.0.5 patch: http://us4.samba.org/samba/ftp/patches/security/samba-3.0.5-reduce_name.
patch

Samba 3.0.7 is not vulnerable.

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the names CAN-2004-0815 to these issues. This is a candidate for inclusion in the CVE list (http://cve.mitre.org), which standardizes names for security problems.

VIII. DISCLOSURE TIMELINE

09/22/2004  Initial vendor notification
09/22/2004  iDEFENSE clients notified
09/22/2004  Initial vendor response
09/30/2004  Coordinated public disclosure

IX. CREDIT

Karol Wiesek is credited with this discovery.

Get paid for vulnerability research http://www.idefense.com/poi/teams/vcp.jsp

X. LEGAL NOTICES

Copyright (c) 2004 iDEFENSE, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDEFENSE. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email customerservice@xxxxxxxxxxxx for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.



- ----------------------------------------------------------------------------------

For additional information or assistance, please contact the HELP Desk by 
telephone or Not Protectively Marked information may be sent via 
EMail to: uniras@xxxxxxxxxxxx

Office Hours:
Mon - Fri: 08:30 - 17:00 Hrs
Tel: +44 (0) 870 487 0748 Ext 4511
Fax: +44 (0) 870 487 0749

Outside of Office Hours:
On Call Duty Officer:
Tel: +44 (0) 870 487 0748 and follow the prompts

- ----------------------------------------------------------------------------------
UNIRAS wishes to acknowledge the contributions of iDEFENSE for the information 
contained in this Briefing. 
- ----------------------------------------------------------------------------------
This Briefing contains the information released by the original author. Some 
of the information may have changed since it was released. If the vulnerability 
affects you, it may be prudent to retrieve the advisory from the canonical site 
to ensure that you receive the most current information concerning that problem.

Reference to any specific commercial product, process, or service by trade 
name, trademark manufacturer, or otherwise, does not constitute or imply 
its endorsement, recommendation, or favouring by UNIRAS or NISCC.  The views 
and opinions of authors expressed within this notice shall not be used for 
advertising or product endorsement purposes.

Neither UNIRAS or NISCC shall also accept responsibility for any errors 
or omissions contained within this briefing notice. In particular, they shall 
not be liable for any loss or damage whatsoever, arising from or in connection 
with the usage of information contained within this notice.

UNIRAS is a member of the Forum of Incident Response and Security Teams (FIRST) 
and has contacts with other international Incident Response Teams (IRTs) in 
order to foster cooperation and coordination in incident prevention, to prompt 
rapid reaction to incidents, and to promote information sharing amongst its 
members and the community at large. 
- ----------------------------------------------------------------------------------
<End of UNIRAS Briefing>

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0

iQCVAwUBQWKkW4pao72zK539AQEGsAQAq2ilEKDbnDZgkeBsAkYCv7JKuSJTnNvu
04jwfBmTc2sKS3JyPyWJrKehzhhMrjpaaa3+zG8dNTB+H02PYm+zP/rIx6E80PZ1
9m1alU9i52sgQFGg8aWXkPkfrlcmLQ1107oiljOr92MPGnoyQVeAOjcojZpOdeRz
2ExWATjYXxQ=
=ujg7
-----END PGP SIGNATURE-----