Original release date: April 17, 2003<br>
Last revised: April 23, 2003<br>
Source: CERT/CC<br>

<p>A complete revision history can be found at the end of this file.</p>

<a name="affected"></a>
<h3>Systems Affected</h3>

<li>For <a href="http://www.kb.cert.org/vuls/id/139129">VU#139129</a>:
Snort versions 1.8.x, 1.9.x, and 2.0 prior to RC1.</li> 

<li>For <a href="http://www.kb.cert.org/vuls/id/916785">VU#916785</a>:
Snort versions 1.8.x through 1.9.0 and 2.0 Beta.  

<a name="overview"></a>

<P>There are two vulnerabilities in the Snort Intrusion Detection System,
each in a separate preprocessor module.  Both vulnerabilities allow remote
attackers to execute arbitrary code with the privileges of the user
running Snort, typically root.</p>
<a name="description"></a>
<h2>I. Description</h2>

<p>The Snort intrusion detection system ships with a variety of
preprocessor modules that allow the user to selectively include additional
functionality.  Researchers from two independent organizations have
discovered vulnerabilities in two of these modules, the RPC preprocessor
and the "stream4" TCP fragment reassembly preprocessor.

<p>For additional information regarding Snort, please see <a

<b><p><a href="http://www.kb.cert.org/vuls/id/139129">VU#139129</a> - Heap
overflow in Snort "stream4" preprocessor
(<a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0209">CAN-2003-0209</a>)</b>

<p>Researchers at <a href="http://www.coresecurity.com">CORE Security
Technologies</a> have discovered a remotely exploitable heap overflow in
the Snort "stream4" preprocessor module.  This module allows Snort to
reassemble TCP packet fragments for further analysis.

<p>To exploit this vulnerability, an attacker must disrupt the state
tracking mechanism of the preprocessor module by sending a series of
packets with crafted sequence numbers.  This causes the module to bypass a
check for buffer overflow attempts and allows the attacker to insert
arbitrary code into the heap.

<p>For additional information, please read the Core Security Technologies
Advisory located at


<p>This vulnerability affects Snort versions 1.8.x, 1.9.x, and 2.0 prior
to RC1, including Snort 1.9.1.  Snort has published an advisory regarding
this vulnerability; it is available at <a

<b><p><a href="http://www.kb.cert.org/vuls/id/916785">VU#916785</a> -
Buffer overflow in Snort RPC preprocessor
(<a href="http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2003-0033">CAN-2003-0033</a>)</b>

<p>Researchers at <a href="http://www.iss.net/">Internet Security
Systems</a> (ISS) have discovered a remotely exploitable buffer overflow
in the Snort RPC preprocessor module.  Martin Roesch, primary developer
for Snort, described the vulnerability as follows:

<p><i>When the RPC decoder normalizes fragmented RPC records, it
incorrectly checks the lengths of what is being normalized against the
current packet size, leading to an overflow condition.  The RPC
preprocessor is enabled by default.</i>

<p>For additional information, please read the ISS X-Force advisory
located at <blockquote><a

<p>This vulnerability affects Snort versions 1.8.x through 1.9.0 and 2.0
Beta.  Snort version 1.9.1 is not affected.

<a name="impact"></a>
<h2>II. Impact</h2>

<p>Both VU#139129 and VU#916785 allow remote attackers to execute
arbitrary code with the privileges of the user running Snort, typically
root.  Please note that it is not necessary for the attacker to know the IP
address of the Snort device they wish to attack; merely sending malicious
traffic where it can be observed by an affected Snort sensor is sufficient
to exploit these vulnerabilities.

<a name="solution"></a>
<h2>III. Solution</h2>

<h4>Upgrade to Snort 2.0</h4>

<p>Both VU#139129 and VU#916785 are addressed in Snort version 2.0, which
is available at


<p>Binary-only versions of Snort are available from


<p>For information from other vendors that ship affected versions of
Snort, please see <a href="#vendors">Appendix A</a> of this document.

<h4>Disable affected preprocessor modules</h4>

<p>Sites that are unable to immediately upgrade affected Snort sensors may
prevent exploitation of this vulnerability by commenting out the affected
preprocessor modules in the "snort.conf" configuration file.

<p>To prevent exploitation of VU#139129, comment out the following line:

</small><tt><blockquote>preprocessor stream4_reassemble</blockquote></tt><small>

<p>To prevent exploitation of VU#916785, comment out the following line:

</small><tt><blockquote>preprocessor rpc_decode: 111 32771</blockquote></tt><small>

<p>After commenting out the affected modules, send a SIGHUP signal to the
affected Snort process to update the configuration.  Note that disabling
these modules may have adverse effects on a sensor's ability to correctly
process RPC record fragments and TCP packet fragments.  In particular,
disabling the "stream4" preprocessor module will prevent the Snort sensor
from detecting a variety of IDS evasion attacks.

<h4>Block outbound packets from Snort IDS systems</h4>

<p>You may be able limit an attacker's capabilities if the system is
compromised by blocking all outbound traffic from the Snort sensor.  While
this workaround will not prevent exploitation of the vulnerability, it may
make it more difficult for the attacker to create a useful exploit.

<a name="vendors"></a>
<h2>Appendix A. - Vendor Information</h2>

<p>This appendix contains information provided by vendors for this
advisory.  As vendors report new information to the CERT/CC, we will
update this section and note the changes in our revision history.  If a
particular vendor is not listed below, we have not received their

<a name="apple"></a>
<h4>Apple Computer, Inc.</h4>

<p>Snort is not shipped with Mac OS X or Mac OS X Server.

<!-- end vendor -->

<a name="ingrian"></a>
<h4>Ingrian Networks</h4>

<p>Ingrian Networks products are not susceptible to VU#139129 and
VU#916785 since they do not use Snort.

<p>Ingrian customers who are using the IDS Extender Service Engine to
mirror cleartext data to a Snort-based IDS should upgrade their IDS

<!-- end vendor -->

<a name="netbsd"></a>

<p>NetBSD does not include snort in the base system.

<p>Snort is available from the 3rd party software system, pkgsrc.  Users
who have installed net/snort, net/snort-mysql or net/snort-pgsql should
update to a fixed version. pkgsrc/security/audit-packages can be used to
keep up to date with these types of issues.

<!-- end vendor -->

<a name="redhat"></a>
<h4>Red Hat Inc.</h4>

<p>Not vulnerable.  Red Hat does not ship Snort in any of our supported

<!-- end vendor -->

<a name="sgi"></a>

<p>SGI does not ship snort as part of IRIX.

<!-- end vendor -->

<a name="snort"></a>

<p>Snort 2.0 has undergone an external third party professional security
audit funded by Sourcefire.

<!-- end vendor -->

<hr noshade>

<p>The CERT/CC acknowledges Bruce Leidl, Juan Pablo Martinez Kuhn, and
Alejandro David Weil of Core Security Technologies for their discovery
of VU#139129.  We also acknowledge Mark Dowd and Neel Mehta of ISS X-Force
for their discovery of VU#916785.


<hr noshade>

<p>Authors: <a
P. Lanza</a> and Cory F. Cohen.


<!--#include virtual="/include/footer_nocopyright2.html" -->

<p>Copyright 2003 Carnegie Mellon University.</p>

<p>Revision History
Apr 17, 2003:  Initial release
Apr 17, 2003:  Fixed CVE candidate reference for VU#139129; now reads "CAN-2003-0209"
Apr 17, 2003:  Minor grammar changes in Impact section
Apr 22, 2003:  Fixed spelling error in Solution section
Apr 23, 2003:  Revised Systems Affected section
Apr 23, 2003:  Revised systems affected information in Description section