Vulnerabilities > CVE-2002-2196 - Improper Restriction of Operations Within the Bounds of A Memory Buffer vulnerability in Samba

047910
CVSS 7.5 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
PARTIAL
Integrity impact
PARTIAL
Availability impact
PARTIAL
network
low complexity
samba
CWE-119
nessus

Summary

Samba before 2.2.5 does not properly terminate the enum_csc_policy data structure, which may allow remote attackers to execute arbitrary code via a buffer overflow attack.

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Overflow Buffers
    Buffer Overflow attacks target improper or missing bounds checking on buffer operations, typically triggered by input injected by an attacker. As a consequence, an attacker is able to write past the boundaries of allocated buffer regions in memory, causing a program crash or potentially redirection of execution as per the attackers' choice.
  • Client-side Injection-induced Buffer Overflow
    This type of attack exploits a buffer overflow vulnerability in targeted client software through injection of malicious content from a custom-built hostile service.
  • Filter Failure through Buffer Overflow
    In this attack, the idea is to cause an active filter to fail by causing an oversized transaction. An attacker may try to feed overly long input strings to the program in an attempt to overwhelm the filter (by causing a buffer overflow) and hoping that the filter does not fail securely (i.e. the user input is let into the system unfiltered).
  • MIME Conversion
    An attacker exploits a weakness in the MIME conversion routine to cause a buffer overflow and gain control over the mail server machine. The MIME system is designed to allow various different information formats to be interpreted and sent via e-mail. Attack points exist when data are converted to MIME compatible format and back.

Nessus

NASL familyGain a shell remotely
NASL idSAMBA_POSSIBLE_OVERFLOW.NASL
descriptionThe remote Samba server, according to its version number, is vulnerable to a possible buffer overflow because it fails to properly terminate the
last seen2020-06-01
modified2020-06-02
plugin id11113
published2002-08-29
reporterThis script is Copyright (C) 2002-2018 Tenable Network Security, Inc.
sourcehttps://www.tenable.com/plugins/nessus/11113
titleSamba enum_csc_policy Data Structure Termination Remote Overflow
code
#
# (C) Tenable Network Security, Inc.
#

# Script audit and contributions from Carmichael Security
#      Erik Anderson <[email protected]> (nb: domain no longer exists)
#      Added BugtraqID
#
# Refs: o http://lists.samba.org/pipermail/samba-technical/2002-June/037400.html
#       o FreeBSD-SN-02:05
#
# Only Samba 2.2.4 is affected by this.
#


include("compat.inc");

if(description)
{
 script_id(11113);
 script_version ("1.22");
 script_cvs_date("Date: 2018/11/15 20:50:22");

 script_cve_id("CVE-2002-2196");
 script_bugtraq_id(5587);
 script_xref(name:"SuSE", value:"SUSE-SA:2002:045");

 script_name(english:"Samba enum_csc_policy Data Structure Termination Remote Overflow");

 script_set_attribute(attribute:"synopsis", value:
"The remote Samba server may be affected by a buffer overflow issue." );
 script_set_attribute(attribute:"description", value:
"The remote Samba server, according to its version number, is
vulnerable to a possible buffer overflow because it fails to properly
terminate the 'enum_csc_policy' struct." );
 script_set_attribute(attribute:"see_also", value:"https://lists.samba.org/archive/samba-technical/2002-June/022075.html" );
 script_set_attribute(attribute:"see_also", value:"https://www.samba.org/samba/history/samba-2.2.5.html" );
 script_set_attribute(attribute:"solution", value:
"Upgrade to Samba 2.2.5 or later." );
 script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
 script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
 script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
 script_set_attribute(attribute:"exploit_available", value:"false");
 script_cwe_id(119);
 script_set_attribute(attribute:"plugin_publication_date", value: "2002/08/29");
 script_set_attribute(attribute:"vuln_publication_date", value: "2002/06/13");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/a:samba:samba");
script_end_attributes();

 
 script_summary(english:"checks samba version");
 script_category(ACT_GATHER_INFO);
 script_copyright(english:"This script is Copyright (C) 2002-2018 Tenable Network Security, Inc.");
 script_family(english:"Gain a shell remotely");
 script_dependencie("smb_nativelanman.nasl");
 script_require_ports(139);
 script_require_keys("SMB/NativeLanManager");
 exit(0);
}

#
# The script code starts here
#

lanman = get_kb_item("SMB/NativeLanManager");
if("Samba" >< lanman)
{
 if(ereg(pattern:"Samba 2\.2\.4[^0-9]*$",
 	 string:lanman))security_hole(139);
}

Redhat

advisories
rhsa
idRHBA-2002:209

Statements

contributorMark J Cox
lastmodified2006-08-30
organizationRed Hat
statementThis issue did not affect the versions of Samba as distributed with Red Hat Enterprise Linux 2.1, 3, or 4.