1711
The table(s) below shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOr and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition, relationships such
as PeerOf and CanAlsoBe are defined to show similar weaknesses that may want to be explored.
Relevant to the view "Research Concepts" (CWE-1000)
Nature Type ID Name Page
ChildOf 805 Buffer Access with Incorrect Length Value 1702
Weakness Ordinalities
Resultant :
Primary :
Applicable Platforms
Language : C (Prevalence = Sometimes)
Language : C++ (Prevalence = Sometimes)
Common Consequences
Scope Impact Likelihood
Availability Modify Memory
DoS: Crash, Exit, or Restart
DoS: Resource Consumption (CPU)
Buffer overflows generally lead to crashes. Other attacks
leading to lack of availability are possible, including putting
the program into an infinite loop.
Integrity
Confidentiality
Availability
Read Memory
Modify Memory
Execute Unauthorized Code or Commands
Buffer overflows often can be used to execute arbitrary
code, which is usually outside the scope of a program's
implicit security policy.
Access Control Bypass Protection Mechanism
When the consequence is arbitrary code execution, this
can often be used to subvert any other security service.
Potential Mitigations
Phase: Architecture and Design
Use an abstraction library to abstract away risky APIs. Examples include the Safe C String
Library (SafeStr) by Viega, and the Strsafe.h library from Microsoft. This is not a complete
solution, since many buffer overflows are not related to strings.
Phase: Operation
Phase: Build and Compilation
Strategy = Environment Hardening
Use automatic buffer overflow detection mechanisms that are offered by certain compilers or
compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat
FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms
including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary
Validation) from D3FEND [REF-1334] discusses canary-based detection in detail.
Effectiveness = Defense in Depth
CWE Version 4.14
CWE-806: Buffer Access Using Size of Source Buffer
CWE-806: Buffer Access Using Size of Source Buffer