what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

iDEFENSE Security Advisory 2004-09-30.t

iDEFENSE Security Advisory 2004-09-30.t
Posted Oct 7, 2004
Authored by iDefense Labs | Site idefense.com

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

tags | advisory, remote
advisories | CVE-2004-0815
SHA-256 | 093d77ea6f8671a498b2960e60a63166e361922696586d3e51dd8af521ab506e

iDEFENSE Security Advisory 2004-09-30.t

Change Mirror Download
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@idefense.com 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.
Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    0 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    0 Files
  • 23
    Apr 23rd
    0 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close