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

UNIRAS Brief - 561/04 - iDEFENSE Security Advisory 10.11.04 - Squid Web Proxy Cache Remote Denial of Service



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

- ----------------------------------------------------------------------------------
   UNIRAS (UK Govt CERT) Briefing Notice - 561/04 dated 12.10.04  Time: 14:35  
  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
=====

iDEFENSE Security Advisory 10.11.04 - Squid Web Proxy Cache Remote Denial of Service 
Vulnerability

Detail
====== 

Remote exploitation of a design error in the SNMP module of Squid Web Proxy Cache may 
lead to a denial of service.
The problem specifically exists due to an ASN1 parsing error where certain header length 
combinations can slip through the validations performed by the ASN1 parser, eventually 
causing the server to restart and close all current connections. The server takes several 
seconds to restart.
The offending code is in the asn_parse_header() routine of snmplib/asn1.c, which under 
some cases will allow negative length fields to pass validation. This leads to a failed 
xmalloc(), and the server then assumes there is heap corruption or some other exceptional 
condition, and restarts.





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

===========================================================================
             

           ESB-2004.0637 -- iDEFENSE Security Advisory 10.11.04
       Squid Web Proxy Cache Remote Denial of Service Vulnerability
                              12 October 2004

===========================================================================

        

Product:                Squid 
Publisher:              iDEFENSE
Operating System:       Linux variants
                        UNIX variants
Impact:                 Denial of Service
Access:                 Remote/Unauthenticated
CVE Names:              CAN-2004-0918
Original Bulletin URL:  http://www.idefense.com/application/poi/display?id=152

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

Squid Web Proxy Cache Remote Denial of Service Vulnerability

iDEFENSE Security Advisory 10.11.04: 
www.idefense.com/application/poi/display?id=152&type=vulnerabilities
October 11, 2004

I. BACKGROUND

Squid Web Proxy Cache is a full-featured web proxy cache designed to run on Unix 
systems. It supports proxying HTTP, FTP, SSL, DNS, and has support for SNMP.

II. DESCRIPTION

Remote exploitation of a design error in the SNMP module of Squid Web Proxy Cache 
may lead to a denial of service.

The problem specifically exists due to an ASN1 parsing error where certain header 
length combinations can slip through the validations performed by the ASN1 parser, 
eventually causing the server to restart and close all current connections. The 
server takes several seconds to restart.

The offending code is in the asn_parse_header() routine of snmplib/asn1.c, which 
under some cases will allow negative length fields to pass validation. This leads 
to a failed xmalloc(), and the server then assumes there is heap corruption or some 
other exceptional condition, and restarts.

III. ANALYSIS

An attacker can exploit the above-described vulnerability to crash a Squid server. 
If the attack is repeated, it can render the server useless. Only a single UDP packet 
is required to trigger this vulnerability, so the source address can be spoofed.

IV. DETECTION

iDEFENSE has confirmed the existence of this vulnerability in Squid Web Proxy Cache 
version 2.5-STABLE5 compiled with SNMP support as well as Squid Web Proxy Cache 
version 3.0-PRE3-20040702 compiled with SNMP support. It is suspected that earlier 
versions are vulnerable as well.

To find if a Squid binary is compiled with SNMP support one can run:

    grep snmp_port /usr/local/squid/sbin/squid

If this command returns silently, that binary was not built with SNMP support and 
it is not vulnerable to this issue.

V. WORKAROUND

Disable SNMP support or filter the port that has SNMP processing activated 
(3401 by default) to allow only SNMP data from trusted hosts.

To disable SNMP support on a squid binary that has SNMP support compiled in, 
use the entry snmp_port 0 in the squid.conf configuration file.

To allow only the local interface to process SNMP, use the entry "snmp_incoming_address 
127.0.0.1" in the squid.conf configuration file.

Squid must be restarted to activate changes in the configuration file.

VI. VENDOR RESPONSE

Patch relative to Squid-2.5.STABLE6:

 
http://www.squid-cache.org/Versions/v2/2.5/bugs/squid-2.5.STABLE6-SNMP_c
ore_dump.patch

Squid-2.5.STABLE7 release:

   ftp://ftp.squid-cache.org/pub/squid-2/STABLE/squid-2.5.STABLE7.tar.gz
 
ftp://ftp.squid-cache.org/pub/squid-2/STABLE/squid-2.5.STABLE7.tar.bz2
   http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE7.tar.gz
   http://www.squid-cache.org/Versions/v2/2.5/squid-2.5.STABLE7.tar.bz2

or any of the mirrors

   http://www.squid-cache.org/Mirrors/ftp-mirrors.html
   http://www.squid-cache.org/Mirrors/http-mirrors.html

VII. CVE INFORMATION

The Common Vulnerabilities and Exposures (CVE) project has assigned the names 
CAN-2004-0918 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/15/2004  Initial vendor notification
09/15/2004  iDEFENSE clients notified
09/15/2004  Initial vendor response
10/05/2004  Coordinated public disclosure

IX. CREDIT

The discoverer of this vulnerability 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.



- - --------------------------END INCLUDED TEXT--------------------




iQCVAwUBQWsSVih9+71yA2DNAQIINAP/T7EiJHdK3zPcJ70trdvG1fMcia+9QfcX
4fyavWIn7uFSX1bxjg1x+ubGjlCuqHClWpXbnJVOzG7NsKEICVLB8VAzr0aGTDb7
OKDNZKVLwhPJbzuhGYS97U6/hJRn+YehqBjhC2BWkmC0slJYfWhkq0tYmJiqUp1X
1l6pVhGaiaQ=
=k7GT
- -----END PGP SIGNATURE-----

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

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

iQCVAwUBQWvdI4pao72zK539AQGLDwP+KZAXvGoZ38A6ZnJEHBoD9TJ/1Zp/1qxz
W5xxvla4tHd7EG2HqnOaBmq9YYanqKi96OHzO0PrxNslSScZc81JnnycQ1TT/PM2
V57lwY3P/oZDJBB7Al0CgHC04aZuF5iLDye5chQ8t6GVH318ZhvxDf/v1BBlKTuW
CaY6NK8Vcfs=
=YzDP
-----END PGP SIGNATURE-----