N-078: Snort Integer Overflow in Stream4 (TCP) Vulnerability Privacy and Legal Notice

CIAC INFORMATION BULLETIN

N-078: Snort Integer Overflow in Stream4 (TCP) Vulnerability

[Snort(TM) Advisory: Integer Overflow in Stream4 ]

April 17, 2003 15:00 GMT

PROBLEM: An exploitable heap overflow in the stream4 preprocessor module resulting from sequence number calculations that overflow a 32 bit integer variable has been discovered.
AFFECTED SOFTWARE: Snort 2.0.0 beta version
Snort 1.9.x
Snort 1.8.x
DAMAGE: A remote attacker could possibly execute arbitrary commands on a system running the Snort sensor with the privileges of the user running the Snort process (usually root), execute a denial of service attack against the Snort sensor, and possibly use IDS evasion techniques that would prevent the sensor from detecting attacks on a monitored network.
SOLUTION: Upgrade to Snort v2.0 released on April 14, 2003.

VULNERABILITY
ASSESSMENT:
The risk is HIGH. A remote attacker does not need to know on which host the Snort sensor is running. To successfully exploit this vulnerability, it would only be necessary to guess where to send traffic that the Snort sensor will 'see' and analyze. Then an integer overflow could possibly be designed to occur while making a bounds check, which could result in a potential heap overflow going undetected.

LINKS:  
  CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/n-078.shtml
  ORIGINAL BULLETIN: http://www.snort.org/advisories/snort-2003-04-16-1.txt
  PATCHES: http://www.snort.org/

[***** Start Snort(TM) Advisory: Integer Overflow in Stream4  *****]

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

Snort(TM) Advisory: Integer Overflow in Stream4 

Date: April 16, 2003


Affected Versions:
All versions of the following products are affected:

* Snort 1.8 through 1.9.1
* Snort CVS - current branch up to version 2.0.0 beta


Synopsis:
The Sourcefire Vulnerability Research Team has learned of an integer overflow 
in the Snort stream4 preprocessor used by the Sourcefire Network Sensor 
product line. The Snort stream4 preprocessor (spp_stream4) incorrectly 
calculates segment size parameters during stream reassembly for certain
sequence number ranges which can lead to an integer overflow that can be
expanded to a heap overflow.

The Snort stream4 flaw may lead to a denial of service (DoS) attack or 
remote command execution on a host running Snort. This attack can be launched 
by crafting TCP stream packets and transmitting them over a network segment 
that is being monitored by a vulnerable Snort implementation. In its 
default configuration, certain versions of snort are vulnerable to this 
attack, as is the default configuration of the Snort IDS.

Disabling the stream4 preprocessor will make the snort invulnerable to the 
attack.

To disable the stream4 preprocessor, edit snort.conf and replace any lines 
that begin with "preprocessor stream4" with "# preprocessor stream4"

NOTE: Disabling the stream4 preprocessor disables stateful inspection and 
stream reassembly and could allow someone to evade snort using tcp stream 
segmentation attacks.


Patches:

Snort 2.0 has been released and corrects this vulnerability.


(C) 2003 Sourcefire, Inc.  All rights reserved.
Sourcefire and Snort are trademarks or registered trademarks of Sourcefire, INC.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+nadjavJ5BgQ0p28RAi8FAKCviv78UU8V2k+smfZU875Lcrhb9gCfQIXK
CuzzM4EKTvbvkvo+wL47YYM=
=u1yD
-----END PGP SIGNATURE-----

[***** End Snort(TM) Advisory: Integer Overflow in Stream4  *****]


CIAC wishes to acknowledge the contributions of Snort, Sourcefire Inc, and Core Security Technologies for the information contained in this bulletin.
CIAC services are available to DOE, DOE Contractors, and the NIH. CIAC can be contacted at:
    Voice:          +1 925-422-8193 (7 x 24)
    FAX:            +1 925-423-8002
    STU-III:        +1 925-423-2604
    E-mail:          ciac@ciac.org
    World Wide Web:  http://www.ciac.org/
    Anonymous FTP:   ftp.ciac.org

This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes.
UCRL-MI-119788
[Privacy and Legal Notice]