CWE-909: Missing Initialization of Resource

Class Incomplete Simple

CWE版本: 4.18

更新日期: 2025-09-09

弱点描述

The product does not initialize a critical resource.

扩展描述

Many resources require initialization before they can be properly used. If a resource is not initialized, it could contain unpredictable or expired data, or it could be initialized to defaults that are invalid. This can have security implications when the resource is expected to have certain properties or values.

常见后果

影响范围: Confidentiality

技术影响: Read Memory Read Application Data

说明: When reusing a resource such as memory or a program variable, the original contents of that resource may not be cleared before it is sent to an untrusted party.

影响范围: Availability

技术影响: DoS: Crash, Exit, or Restart

说明: The uninitialized resource may contain values that cause program flow to change in ways that the programmer did not intend.

潜在缓解措施

阶段: Implementation

描述: Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all specified steps.

阶段: Implementation

描述: Pay close attention to complex conditionals that affect initialization, since some branches might not perform the initialization.

阶段: Implementation

描述: Avoid race conditions (CWE-362) during initialization routines.

阶段: Build and Compilation

描述: Run or compile your product with settings that generate warnings about uninitialized variables or data.

观察示例

参考: CVE-2020-20739

A variable that has its value set in a conditional statement is sometimes used when the conditional fails, sometimes causing data leakage

参考: CVE-2005-1036

Chain: Bypass of access restrictions due to improper authorization (CWE-862) of a user results from an improperly initialized (CWE-909) I/O permission bitmap

引入模式

阶段 说明
Implementation -

适用平台

编程语言
Not Language-Specific (Undetermined)
关键信息

CWE ID: CWE-909

抽象级别: Class

结构: Simple

状态: Incomplete

利用可能性: Medium

相关弱点