SecurityTracker.com
Keep Track of the Latest Vulnerabilities
with SecurityTracker!
    Home    |    View Topics    |    Search    |    Contact Us    |   

SecurityTracker
Archives


 
Sign Up
Sign Up for Your FREE Weekly SecurityTracker E-mail Alert Summary
Instant Alerts
Buy our Premium Vulnerability Notification Service to receive customized, instant alerts
Affiliates
Put SecurityTracker Vulnerability Alerts on Your Web Site -- It's Free!
Partners
Become a Partner and License Our Database or Notification Service
Report a Bug
Report a vulnerability that you have found to SecurityTracker
bugs
@
securitytracker.com






Category:   Application (Generic)  >   Squid Vendors:   Squid-cache.org
Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code
SecurityTracker Alert ID:  1010434
SecurityTracker URL:  http://securitytracker.com/id/1010434
CVE Reference:   CAN-2004-0541   (Links to External Site)
Date:  Jun 8 2004
Impact:   Execution of arbitrary code via network, User access via network
Fix Available:  Yes  Vendor Confirmed:  Yes  
Version(s): 3.*-PRE, 2.5.*
Description:   iDEFENSE reported a buffer overflow vulnerability in Squid in the processing of NTLM authentication messages. A remote user can execute arbitrary code on the target system.

It is reported that if the proxy is configured to use the NTLM authentication helper, a remote user can send a specially crafted password to trigger a buffer overflow in 'helpers/ntlm_auth/SMB/libntlmssp.c' in the ntlm_check_auth() function.

The vendor was reportedly notified on May 20, 2004.

Impact:   A remote user can execute arbitrary code on the target system.
Solution:   The vendor has reportedly issued a patch, available at:

http://www.squid-cache.org/~wessels/patch/libntlmssp.c.patch

Vendor URL:  www.squid-cache.org/ (Links to External Site)
Cause:   Boundary error
Underlying OS:   Linux (Any), UNIX (Any)

Message History:   This archive entry has one or more follow-up message(s) listed below.
Jun 9 2004 (Red Hat Issues Fix for RH Enterprise Linux) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (bugzilla@redhat.com)
Red Hat has released a fix for Red Hat Enterprise Linux 3.
Jun 10 2004 (Mandrake Issues Fix) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Mandrake Linux Security Team <security@linux-mandrake.com>)
Mandrake has released a fix.
Jun 10 2004 (SuSE Issues Fix) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (thomas@suse.de (Thomas Biege))
SuSE has released a fix.
Jun 10 2004 (Fedora Issues Fix for FC1) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Jay Fenlason <fenlason@redhat.com>)
Red Hat has released a fix for Fedora Core 1.
Jun 10 2004 (Fedora Issues Fix for FC2) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Jay Fenlason <fenlason@redhat.com>)
Fedora has released a fix for Fedora Core 2.
Jun 10 2004 (Trustix Issues Fix) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Trustix Security Advisor <tsl@trustix.org>)
Trustix has released a fix.
Jun 17 2004 (Gentoo Issues Fix) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Kurt Lieber <klieber@gentoo.org>)
Gentoo has released a fix.
Nov 3 2004 (Conectiva Issues Fix) Squid ntlm_check_auth() Buffer Overflow Lets Remote Users Execute Arbitrary Code   (Conectiva Updates <secure@conectiva.com.br>)
Conectiva has released a fix.



 Source Message Contents

Date:  Tue, 8 Jun 2004 15:00:21 -0400
Subject:  iDEFENSE Security Advisory 06.08.04: Squid Web Proxy Cache NTLM Authentication


Squid Web Proxy Cache NTLM Authentication Helper Buffer Overflow
Vulnerability

iDEFENSE Security Advisory 06.08.04
www.idefense.com/application/poi/display?id=107&type=vulnerabilities
June 8, 2004

I. BACKGROUND

Squid is a fully-featured Web Proxy Cache designed to run on Unix
systems and supports proxying and caching of HTTP, FTP, and other URLs,
as well as SSL support, cache hierarchies, transparent caching, access
control lists and many other features. More information is available at
http://www.squid-cache.org.

II. DESCRIPTION

Remote exploitation of a buffer overflow vulnerability in Squid Web
Proxy Cache could allow a remote attacker to execute arbitrary code.
Squid Web Proxy Cache supports Basic, Digest and NTLM authentication.
The vulnerability specifically exists within the NTLM authentication
helper routine, ntlm_check_auth(), located in
helpers/ntlm_auth/SMB/libntlmssp.c:

char *ntlm_check_auth(ntlm_authenticate * auth, int auth_length)
{
     int rv;
     char pass[25] /*, encrypted_pass[40] */;
     char *domain = credentials;
     ...
     memcpy(pass, tmp.str, tmp.l);
     ...

The function contains a buffer overflow vulnerability due to a lack of
bounds checking on the values copied to the 'pass' variable. Both the
'tmp.str' and 'tmp.l' variables used in the memcpy() call contain
user-supplied data.

III. ANALYSIS

A remote attacker can compromise a target system if Squid Proxy is
configured to use the NTLM authentication helper. The attacker can send
an overly long password to overflow the buffer and execute arbitrary
code.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in
Squid-Proxy 2.5.*-STABLE and 3.*-PRE when Squid-Proxy is compiled with
the NTLM helper enabled.

V. WORKAROUNDS

Recompile Squid-Proxy with NTLM handlers disabled.

VI. VENDOR RESPONSE

A patch for this issue is available at:

http://www.squid-cache.org/~wessels/patch/libntlmssp.c.patch

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the
name CAN-2004-0541 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

04/27/04  Exploit acquired by iDEFENSE
05/19/04  iDEFENSE Clients notified
05/20/04  Initial vendor notification
05/20/04  Initial vendor response
06/08/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@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.


 
 


Go to the Top of This SecurityTracker Archive Page





Home   |    View Topics   |    Search   |    Contact Us

Copyright 2012, SecurityGlobal.net LLC