1095
Nature Type ID Name Page
ChildOf 665 Improper Initialization 1456
Relevant to the view "CISQ Data Protection Measures" (CWE-1340)
Nature Type ID Name Page
ChildOf 665 Improper Initialization 1456
Applicable Platforms
Language : C (Prevalence = Sometimes)
Language : C++ (Prevalence = Sometimes)
Language : Perl (Prevalence = Often)
Language : PHP (Prevalence = Often)
Language : Not Language-Specific (Prevalence = Undetermined)
Likelihood Of Exploit
High
Common Consequences
Scope Impact Likelihood
Availability
Integrity
Other
Other
Initial variables usually contain junk, which can not
be trusted for consistency. This can lead to denial of
service conditions, or modify control flow in unexpected
ways. In some cases, an attacker can "pre-initialize"
the variable using previous actions, which might enable
code execution. This can cause a race condition if a lock
variable check passes when it should not.
Authorization
Other
Other
Strings that are not initialized are especially dangerous,
since many functions expect a null at the end -- and only at
the end -- of a string.
Detection Methods
Fuzzing
Fuzz testing (fuzzing) is a powerful technique for generating large numbers of diverse inputs
- either randomly or algorithmically - and dynamically invoking the code with those inputs.
Even with random inputs, it is often capable of generating unexpected results such as crashes,
memory corruption, or resource consumption. Fuzzing effectively produces repeatable test cases
that clearly indicate bugs, which helps developers to diagnose the issues.
Effectiveness = High
Automated Static Analysis
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.)
Effectiveness = High
Potential Mitigations
Phase: Implementation
CWE Version 4.14
CWE-457: Use of Uninitialized Variable
CWE-457: Use of Uninitialized Variable