| Home > CWE List > CWE-758: Reliance on Undefined, Unspecified, or Implementation-Defined Behavior (4.20) |
|
|
Weakness ID: 758
Vulnerability Mapping:
ALLOWED
This CWE ID could be used to map to real-world vulnerabilities in limited situations requiring careful review
(with careful review of mapping notes)
Abstraction: Class Class - a weakness that is described in a very abstract fashion, typically independent of any specific language or technology. More specific than a Pillar Weakness, but more general than a Base Weakness. Class level weaknesses typically describe issues in terms of 1 or 2 of the following dimensions: behavior, property, and resource. |
This table specifies different individual consequences
associated with the weakness. The Scope identifies the application security area that is
violated, while the Impact describes the negative technical impact that arises if an
adversary succeeds in exploiting this weakness. The Likelihood provides information about
how likely the specific consequence is expected to be seen relative to the other
consequences in the list. For example, there may be high likelihood that a weakness will be
exploited to achieve a certain impact, but a low likelihood that it will be exploited to
achieve a different impact.
| Impact | Details |
|---|---|
|
Reduce Maintainability; Unexpected State; Quality Degradation |
Scope: Other |
This table shows the weaknesses and high level categories that are related to this
weakness. These relationships are defined as ChildOf, ParentOf, MemberOf and give insight to
similar items that may exist at higher and lower levels of abstraction. In addition,
relationships such as PeerOf and CanAlsoBe are defined to show similar weaknesses that the user
may want to explore.
Relevant to the view "Research Concepts" (View-1000)
| Nature | Type | ID | Name |
|---|---|---|---|
| ChildOf |
|
710 | Improper Adherence to Coding Standards |
| ParentOf |
|
474 | Use of Function with Inconsistent Implementations |
| ParentOf |
|
562 | Return of Stack Variable Address |
| ParentOf |
|
587 | Assignment of a Fixed Address to a Pointer |
| ParentOf |
|
588 | Attempt to Access Child of a Non-structure Pointer |
| ParentOf |
|
1038 | Insecure Automated Optimizations |
| ParentOf |
|
1102 | Reliance on Machine-Dependent Data Representation |
| ParentOf |
|
1103 | Use of Platform-Dependent Third Party Components |
| ParentOf |
|
1105 | Insufficient Encapsulation of Machine-Dependent Functionality |
The different Modes of Introduction provide information
about how and when this
weakness may be introduced. The Phase identifies a point in the life cycle at which
introduction
may occur, while the Note provides a typical scenario related to introduction during the
given
phase.
| Phase | Note |
|---|---|
| Implementation |
This listing shows possible areas for which the given
weakness could appear. These
may be for specific named Languages, Operating Systems, Architectures, Paradigms,
Technologies,
or a class of such platforms. The platform is listed along with how frequently the given
weakness appears for that instance.
| Languages |
Class: Not Language-Specific (Undetermined Prevalence) |
Example 1
This code assumes a particular function will always be found at a particular address. It assigns a pointer to that address and calls the function.
The same function may not always be found at the same memory address. This could lead to a crash, or an attacker may alter the memory at the expected address, leading to arbitrary code execution.
Example 2
The following function returns a stack address.
Note: this is a curated list of examples for users to understand the variety of ways in which this weakness can be introduced. It is not a complete list of all CVEs that are related to this CWE entry.
| Reference | Description |
|---|---|
|
Change in C compiler behavior causes resultant buffer overflows in programs that depend on behaviors that were undefined in the C standard.
|
| Ordinality | Description |
|---|---|
|
Indirect
|
(where the weakness is a quality issue that might indirectly make it easier to introduce security-relevant weaknesses or make them more difficult to detect)
|
Primary
|
(where the weakness exists independent of other weaknesses)
|
| Method | Details |
|---|---|
|
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 |
This MemberOf Relationships table shows additional CWE Categories and Views that
reference this weakness as a member. This information is often useful in understanding where a
weakness fits within the context of external information sources.
| Nature | Type | ID | Name |
|---|---|---|---|
| MemberOf | 1001 | SFP Secondary Cluster: Use of an Improper API | |
| MemberOf | 1157 | SEI CERT C Coding Standard - Guidelines 03. Expressions (EXP) | |
| MemberOf | 1158 | SEI CERT C Coding Standard - Guidelines 04. Integers (INT) | |
| MemberOf | 1160 | SEI CERT C Coding Standard - Guidelines 06. Arrays (ARR) | |
| MemberOf | 1162 | SEI CERT C Coding Standard - Guidelines 08. Memory Management (MEM) | |
| MemberOf | 1163 | SEI CERT C Coding Standard - Guidelines 09. Input Output (FIO) | |
| MemberOf | 1167 | SEI CERT C Coding Standard - Guidelines 12. Error Handling (ERR) | |
| MemberOf | 1170 | SEI CERT C Coding Standard - Guidelines 48. Miscellaneous (MSC) | |
| MemberOf | 1306 | CISQ Quality Measures - Reliability | |
| MemberOf | 1412 | Comprehensive Categorization: Poor Coding Practices |
| Usage |
ALLOWED-WITH-REVIEW
(this CWE ID could be used to map to real-world vulnerabilities in limited situations requiring careful review)
|
| Reason | Abstraction |
|
Rationale |
This CWE entry is a Class and might have Base-level children that would be more appropriate |
|
Comments |
Examine children of this entry to see if there is a better fit |
| Mapped Taxonomy Name | Node ID | Fit | Mapped Node Name |
|---|---|---|---|
| CERT C Secure Coding | ARR32-C | CWE More Abstract | Ensure size arguments for variable length arrays are in a valid range |
| CERT C Secure Coding | ERR34-C | Imprecise | Detect errors when converting a string to a number |
| CERT C Secure Coding | EXP30-C | CWE More Abstract | Do not depend on the order of evaluation for side effects |
| CERT C Secure Coding | EXP33-C | CWE More Abstract | Do not read uninitialized memory |
| CERT C Secure Coding | FIO46-C | CWE More Abstract | Do not access a closed file |
| CERT C Secure Coding | INT34-C | CWE More Abstract | Do not shift an expression by a negative number of bits or by greater than or equal to the number of bits that exist in the operand |
| CERT C Secure Coding | INT36-C | CWE More Abstract | Converting a pointer to integer or integer to pointer |
| CERT C Secure Coding | MEM30-C | CWE More Abstract | Do not access freed memory |
| CERT C Secure Coding | MSC14-C | Do not introduce unnecessary platform dependencies | |
| CERT C Secure Coding | MSC15-C | Do not depend on undefined behavior | |
| CERT C Secure Coding | MSC37-C | CWE More Abstract | Ensure that control never reaches the end of a non-void function |
|
Use of the Common Weakness Enumeration (CWE™) and the associated references from this website are subject to the Terms of Use. CWE is sponsored by the U.S. Department of Homeland Security (DHS) Cybersecurity and Infrastructure Security Agency (CISA) and managed by the Homeland Security Systems Engineering and Development Institute (HSSEDI) which is operated by The MITRE Corporation (MITRE). Copyright © 2006–2026, The MITRE Corporation. CWE, CWSS, CWRAF, and the CWE logo are trademarks of The MITRE Corporation. |
||
