Umbra Wiki weakness weakness/CWE-909
Back to wiki

CWE-909 — Missing Initialization of Resource

provenance: imported · CWE: CWE-909

CWE-909: Missing Initialization of Resource

MITRE CWE weakness

Kind Weakness
Abstraction Class
Status Incomplete
Likelihood of exploit Medium

Description

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.

Common consequences

  • Confidentiality: Read Memory, Read Application Data
  • Availability: DoS: Crash, Exit, or Restart

Mitigations

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.

References

  • CWE page: https://cwe.mitre.org/data/definitions/909.html
  • CWE list: https://cwe.mitre.org/data/index.html