CWE-1325 詳細資料

CWE-1325

Improperly Controlled Sequential Memory Allocation
2020-12-10
00h00 +00:00
Incomplete
2023-06-29
00h00 +00:00
指定 CWE 通知
掌握特定 CWE 的任何變更。
管理通知

名稱: Improperly Controlled Sequential Memory Allocation

The product manages a group of objects or resources and performs a separate memory allocation for each object, but it does not properly limit the total amount of memory that is consumed by all of the combined objects.

一般資訊

引入方式

Implementation

適用平台

程式語言

名稱: C (Undetermined)
名稱: C++ (Undetermined)
類別: Not Language-Specific (Undetermined)

常見後果

範圍 影響 可能性
AvailabilityDoS: Resource Consumption (Memory)

注意:Not controlling memory allocation can result in a request for too much system memory, possibly leading to a crash of the application due to out-of-memory conditions, or the consumption of a large amount of memory on the system.

觀察到的案例

參考資料 描述

CVE-2020-36049

JavaScript-based packet decoder uses concatenation of many small strings, causing out-of-memory (OOM) condition

CVE-2019-20176

Product allocates a new buffer on the stack for each file in a directory, allowing stack exhaustion

CVE-2013-1591

Chain: an integer overflow (CWE-190) in the image size calculation causes an infinite loop (CWE-835) which sequentially allocates buffers without limits (CWE-1325) until the stack is full.

潛在緩解措施

Phases : Implementation
Ensure multiple allocations of the same kind of object are properly tracked - possibly across multiple sessions, requests, or messages. Define an appropriate strategy for handling requests that exceed the limit, and consider supporting a configuration option so that the administrator can extend the amount of memory to be used if necessary.
Phases : Operation
Run the program using system-provided resource limits for memory. This might still cause the program to crash or exit, but the impact to the rest of the system will be minimized.

漏洞對應備注

理由說明 : This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
備註 : Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

相關攻擊模式

CAPEC ID 攻擊模式名稱
CAPEC-130 Excessive Allocation
An adversary causes the target to allocate excessive resources to servicing the attackers' request, thereby reducing the resources available for legitimate services and degrading or denying services. Usually, this attack focuses on memory allocation, but any finite resource on the target could be the attacked, including bandwidth, processing cycles, or other resources. This attack does not attempt to force this allocation through a large number of requests (that would be Resource Depletion through Flooding) but instead uses one or a small number of requests that are carefully formatted to force the target to allocate excessive resources to service this request(s). Often this attack takes advantage of a bug in the target to cause the target to allocate resources vastly beyond what would be needed for a normal request.

提交

名稱 機構 日期 發布日期 Version
CWE Content Team MITRE 2020-12-07 +00:00 2020-12-10 +00:00 4.3

修改記錄

名稱 機構 日期 備註
CWE Content Team MITRE 2021-07-20 +00:00 updated Observed_Examples
CWE Content Team MITRE 2023-04-27 +00:00 updated Relationships
CWE Content Team MITRE 2023-06-29 +00:00 updated Mapping_Notes