COMMON WEAKNESS ENUMERATIONIncomplete

CWE-909

Missing Initialization of Resource

The product does not initialize a critical resource.

Soyutlama

Class

Yapı

Simple

Sömürü İhtimali

Medium

Problemi anla

Problem nedir?

The product does not initialize a critical resource.

Genişletilmiş açıklama

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.

Kök neden

Problem nasıl ve ne zaman oluşur?

Yaşam döngüsü evresi

Implementation

Risk

Başarılı sömürü neye yol açar?

Read MemoryRead Application Data

Etkilenen güvenlik alanları: Confidentiality

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.
DoS: Crash, Exit, or Restart

Etkilenen güvenlik alanları: Availability

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

Savunma

Nasıl önlenir ve çözülür?

Implementation

Uygulama aşaması savunması

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

Implementation

Uygulama aşaması savunması

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

Implementation

Uygulama aşaması savunması

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

Build and Compilation

Build and Compilation aşaması savunması

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

Doğrulama

Nasıl tespit edilir?

Automated Static Analysis

High
Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)