CVE Vulnerabilities

CVE-2010-1642

Improper Restriction of Operations within the Bounds of a Memory Buffer

Published: Jun 17, 2010 | Modified: Oct 30, 2018
CVSS 3.x
N/A
Source:
NVD
CVSS 2.x
5 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P
RedHat/V2
RedHat/V3
Ubuntu

The reply_sesssetup_and_X_spnego function in sesssetup.c in smbd in Samba before 3.4.8 and 3.5.x before 3.5.2 allows remote attackers to trigger an out-of-bounds read, and cause a denial of service (process crash), via a xffxff security blob length in a Session Setup AndX request.

Weakness

The software performs operations on a memory buffer, but it can read from or write to a memory location that is outside of the intended boundary of the buffer.

Affected Software

Name Vendor Start Version End Version
Samba Samba 3.0.0 3.0.0
Samba Samba 3.0.1 3.0.1
Samba Samba 3.0.2 3.0.2
Samba Samba 3.0.2a 3.0.2a
Samba Samba 3.0.3 3.0.3
Samba Samba 3.0.4 3.0.4
Samba Samba 3.0.4 3.0.4
Samba Samba 3.0.5 3.0.5
Samba Samba 3.0.6 3.0.6
Samba Samba 3.0.7 3.0.7
Samba Samba 3.0.8 3.0.8
Samba Samba 3.0.9 3.0.9
Samba Samba 3.0.10 3.0.10
Samba Samba 3.0.11 3.0.11
Samba Samba 3.0.12 3.0.12
Samba Samba 3.0.13 3.0.13
Samba Samba 3.0.14 3.0.14
Samba Samba 3.0.14a 3.0.14a
Samba Samba 3.0.15 3.0.15
Samba Samba 3.0.16 3.0.16
Samba Samba 3.0.17 3.0.17
Samba Samba 3.0.18 3.0.18
Samba Samba 3.0.19 3.0.19
Samba Samba 3.0.20 3.0.20
Samba Samba 3.0.20a 3.0.20a
Samba Samba 3.0.20b 3.0.20b
Samba Samba 3.0.21 3.0.21
Samba Samba 3.0.21a 3.0.21a
Samba Samba 3.0.21b 3.0.21b
Samba Samba 3.0.21c 3.0.21c
Samba Samba 3.0.22 3.0.22
Samba Samba 3.0.23 3.0.23
Samba Samba 3.0.23a 3.0.23a
Samba Samba 3.0.23b 3.0.23b
Samba Samba 3.0.23c 3.0.23c
Samba Samba 3.0.23d 3.0.23d
Samba Samba 3.0.24 3.0.24
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25 3.0.25
Samba Samba 3.0.25a 3.0.25a
Samba Samba 3.0.25b 3.0.25b
Samba Samba 3.0.25c 3.0.25c
Samba Samba 3.0.26 3.0.26
Samba Samba 3.0.26a 3.0.26a
Samba Samba 3.0.27 3.0.27
Samba Samba 3.0.27a 3.0.27a
Samba Samba 3.0.28 3.0.28
Samba Samba 3.0.28a 3.0.28a
Samba Samba 3.0.29 3.0.29
Samba Samba 3.0.30 3.0.30
Samba Samba 3.0.31 3.0.31
Samba Samba 3.0.32 3.0.32
Samba Samba 3.0.33 3.0.33
Samba Samba 3.0.34 3.0.34
Samba Samba 3.0.35 3.0.35
Samba Samba 3.0.36 3.0.36
Samba Samba 3.0.37 3.0.37
Samba Samba 3.1.0 3.1.0
Samba Samba 3.2 3.2
Samba Samba 3.2.0 3.2.0
Samba Samba 3.2.1 3.2.1
Samba Samba 3.2.2 3.2.2
Samba Samba 3.2.3 3.2.3
Samba Samba 3.2.4 3.2.4
Samba Samba 3.2.5 3.2.5
Samba Samba 3.2.6 3.2.6
Samba Samba 3.2.7 3.2.7
Samba Samba 3.2.8 3.2.8
Samba Samba 3.2.9 3.2.9
Samba Samba 3.2.10 3.2.10
Samba Samba 3.2.11 3.2.11
Samba Samba 3.2.12 3.2.12
Samba Samba 3.2.13 3.2.13
Samba Samba 3.2.14 3.2.14
Samba Samba 3.2.15 3.2.15
Samba Samba 3.3 3.3
Samba Samba 3.3.0 3.3.0
Samba Samba 3.3.1 3.3.1
Samba Samba 3.3.2 3.3.2
Samba Samba 3.3.3 3.3.3
Samba Samba 3.3.4 3.3.4
Samba Samba 3.3.5 3.3.5
Samba Samba 3.3.6 3.3.6
Samba Samba 3.3.7 3.3.7
Samba Samba 3.3.8 3.3.8
Samba Samba 3.3.9 3.3.9
Samba Samba 3.3.10 3.3.10
Samba Samba 3.3.11 3.3.11
Samba Samba 3.4 3.4
Samba Samba 3.4.0 3.4.0
Samba Samba 3.4.1 3.4.1
Samba Samba 3.4.2 3.4.2
Samba Samba 3.4.3 3.4.3
Samba Samba 3.4.4 3.4.4
Samba Samba 3.4.5 3.4.5
Samba Samba 3.4.6 3.4.6
Samba Samba * 3.4.7
Samba Samba 3.5 3.5
Samba Samba 3.5.0 3.5.0
Samba Samba 3.5.1 3.5.1
Samba Ubuntu dapper *
Samba Ubuntu devel *
Samba Ubuntu hardy *
Samba Ubuntu jaunty *
Samba Ubuntu karmic *
Samba Ubuntu lucid *
Samba Ubuntu upstream *

Extended Description

Certain languages allow direct addressing of memory locations and do not automatically ensure that these locations are valid for the memory buffer that is being referenced. This can cause read or write operations to be performed on memory locations that may be associated with other variables, data structures, or internal program data. As a result, an attacker may be able to execute arbitrary code, alter the intended control flow, read sensitive information, or cause the system to crash.

Potential Mitigations

  • Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.

  • For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer.

  • Be wary that a language’s interface to native code may still be subject to overflows, even if the language itself is theoretically safe.

  • Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid.

  • Examples include the Safe C String Library (SafeStr) by Messier and Viega [REF-57], and the Strsafe.h library from Microsoft [REF-56]. These libraries provide safer versions of overflow-prone string-handling functions.

  • Run or compile the software using features or extensions that automatically provide a protection mechanism that mitigates or eliminates buffer overflows.

  • For example, certain compilers and extensions provide automatic buffer overflow detection mechanisms that are built into the compiled code. Examples include the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice.

  • Consider adhering to the following rules when allocating and managing an application’s memory:

  • Run or compile the software using features or extensions that randomly arrange the positions of a program’s executable and libraries in memory. Because this makes the addresses unpredictable, it can prevent an attacker from reliably jumping to exploitable code.

  • Examples include Address Space Layout Randomization (ASLR) [REF-58] [REF-60] and Position-Independent Executables (PIE) [REF-64].

References