CWE-908

Use of Uninitialized Resource

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

Mitigation

Phase: Implementation

Description:

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

Phase: Implementation

Description:

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

Phase: Implementation

Description:

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

Phase: Build and Compilation

Description:

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

No CAPEC attack patterns related to this CWE.

Back to CWE stats page