CWE-122 - Heap-based Buffer Overflow
- 摘要:Variant
- 结构:Simple
- 状态:Draft
- 发布日期:2006-07-19
- 更新日期:2026-01-21
名称
Heap-based Buffer Overflow
描述
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().
常见后果
范围: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.