目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1336

100%

CWE-908 对未经初始化资源的使用 类漏洞列表 197

CWE-908 对未经初始化资源的使用 类弱点 197 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-908 属于资源使用不当漏洞,指程序访问或操作未初始化的资源。攻击者通常利用此缺陷触发程序崩溃、非法内存访问或引发不可预期的异常行为,进而可能导致拒绝服务或进一步利用。开发者应避免此类问题,需在访问资源前确保其已完成正确的初始化流程,并增加对资源状态的严格检查与错误处理机制,以保障系统的稳定性与安全性。

MITRE CWE 官方描述
CWE:CWE-908 使用未初始化的资源(Use of Uninitialized Resource) 英文:产品使用了或访问了一个尚未初始化的资源。 当资源未被正确初始化时,产品可能会出现意外行为。这可能导致崩溃或无效内存访问,但其后果因资源类型及其在产品中的使用方式而异。
常见影响 (2)
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.
缓解措施 (4)
Implementation Explicitly initialize the resource before use. If this is performed through an API function or standard procedure, follow all required 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 the product with settings that generate warnings about uninitialized variables or data.
代码示例 (2)
Here, a boolean initiailized field is consulted to ensure that initialization tasks are only completed once. However, the field is mistakenly set to true during static initialization, so the initialization code is never reached.
private boolean initialized = true; public void someMethod() { if (!initialized) { // perform initialization tasks ... initialized = true; }
Bad · Java
The following code intends to limit certain operations to the administrator only.
$username = GetCurrentUser(); $state = GetStateData($username); if (defined($state)) { $uid = ExtractUserID($state); } # do stuff if ($uid == 0) { DoAdminThings(); }
Bad · Perl

CWE-908(对未经初始化资源的使用) 是常见的弱点类别,本平台收录该类弱点关联的 197 条 CVE 漏洞。