319
A heap overflow condition is a buffer overflow, where the buffer that can be overwritten is allocated
in the heap portion of memory, generally meaning that the buffer was allocated using a routine
such as malloc().
Relationships
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 787 Out-of-bounds Write 1661
ChildOf 788 Access of Memory Location After End of Buffer 1669
Weakness Ordinalities
Primary :
Applicable Platforms
Language : C (Prevalence = Undetermined)
Language : C++ (Prevalence = Undetermined)
Likelihood Of Exploit
High
Common Consequences
Scope Impact Likelihood
Availability DoS: Crash, Exit, or Restart
DoS: Resource Consumption (CPU)
DoS: Resource Consumption (Memory)
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
Access Control
Execute Unauthorized Code or Commands
Bypass Protection Mechanism
Modify Memory
Buffer overflows often can be used to execute arbitrary
code, which is usually outside the scope of a program's
implicit security policy. Besides important user data,
heap-based overflows can be used to overwrite function
pointers that may be living in memory, pointing it to the
attacker's code. Even in applications that do not explicitly
use function pointers, the run-time will usually leave many
in memory. For example, object methods in C++ are
generally implemented using function pointers. Even in C
programs, there is often a global offset table used by the
underlying runtime.
Integrity
Confidentiality
Availability
Access Control
Other
Execute Unauthorized Code or Commands
Bypass Protection Mechanism
Other
When the consequence is arbitrary code execution, this
can often be used to subvert any other security service.
Detection Methods
CWE Version 4.14
CWE-122: Heap-based Buffer Overflow
CWE-122: Heap-based Buffer Overflow