Date: 9 Nov 2004 18:29:06 +0200
From: SecuriTeam <[email protected]>
To: [email protected]Subject: [UNIX] Samba 3.x.x Wildcard Characters DoS
The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion
The SecuriTeam alerts list - Free, Accurate, Independent.
Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html
- - - - - - - - -
Samba 3.x.x Wildcard Characters DoS
------------------------------------------------------------------------
SUMMARY
A remote attacker could cause and smbd process to consume abnormal amounts
of system resources due to an input validation error when matching
filenames containing wildcard characters.
DETAILS
Vulnerable Systems:
* Samba versions 3.0.x up to 3.0.7
A bug in the input validation routines used to match filename strings
containing wildcard characters may allow a user to consume more than
normal amounts of CPU cycles thus impacting the performance and response
of the server. In some circumstances the server can become entirely
unresponsive.
Protecting Unpatched Servers:
The Samba Team always encourages users to run the latest stable release as
a defense of against attacks. However, under certain circumstances it may
not be possible to immediately upgrade important installations. In such
cases, administrators should
read the "Server Security" documentation found at
<http://www.samba.org/samba/docs/server_security.html>
http://www.samba.org/samba/docs/server_security.html.
Workaround:
Restricting access to the server by using the "hosts allow" setting in
smb.conf and/or applying firewall rules may help mitigate this
vulnerability.
Patch Availability:
A patch for Samba 3.0.7 (samba-3.0.7-CAN-2004-0930.patch) is available
from <http://www.samba.org/samba/ftp/patches/security/>
http://www.samba.org/samba/ftp/patches/security/. The patch has been
signed with the "Samba Distribution Verification Key" (ID F17F9772).
Disclosure Timeline:
09/29/2004 iDEFENSE clients notified
09/29/2004 Initial vendor notification
09/30/2004 Initial vendor response
11/08/2004 Coordinated public disclosure
Technical Details:
The problem specifically exists within the ms_fnmatch() routine which upon
parsing '*' characters within a pattern will fall into an exponentially
growing loop. The responsible section of vulnerable code appears here:
case '*':
for (; *n; n++) {
if (ms_fnmatch(p, n) == 0) return 0;
}
break;
An authenticated remote attacker can cause a resource exhaustion attack by
sending multiple malformed commands to an affected server. A request as
simple as 'dir ***********************************************z' can
trigger this condition leading to 100% CPU usage.
ADDITIONAL INFORMATION
The information has been provided by Karol Wiesek.
The original article can be found at:
<http://www.idefense.com/application/poi/display?id=156&type=vulnerabilities> http://www.idefense.com/application/poi/display?id=156&type=vulnerabilities
This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: [email protected]
In order to subscribe to the mailing list, simply forward this email to: [email protected]
DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.