Skip to content
OpenAdvisories

Weakness (CWE)

CWE-908: Use of Uninitialized Resource

Base Incomplete

The product uses or accesses a resource that has not been initialized.

How to prevent it (4 mitigations)
  1. Implementation

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

  2. Implementation

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

  3. Implementation

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

  4. Build and Compilation

    Run or compile the product with settings that generate warnings about uninitialized variables or data.

Source: MITRE CWE-908

551 results · Feed