Compiler Optimization Removal or Modification of Security-critical Code |
Weakness ID: 733 (Weakness Base) | Status: Incomplete |
Description Summary
The developer builds a security-critical protection mechanism into the software but the compiler optimizes the program such that the mechanism is removed or modified.
Black Box This specific weakness is impossible to detect using black box methods. While an analyst could examine memory to see that it has not been scrubbed, an analysis of the executable would not be successful. This is because the compiler has already removed the relevant code. Only the source code shows whether the programmer intended to clear the memory or not, so this weakness is indistinguishable from others. |
White Box This weakness is only detectable using white box methods (see black box detection factor). Careful analysis is required to determine if the code is likely to be removed by the compiler. |
Reference | Description |
---|---|
CVE-2008-1685 | C compiler optimization, as allowed by specifications, removes code that is used to perform checks to detect integer overflows. |
Nature | Type | ID | Name | View(s) this relationship pertains to |
---|---|---|---|---|
ChildOf | Weakness Class | 435 | Interaction Error | Research Concepts (primary)1000 |
ChildOf | Weakness Class | 758 | Reliance on Undefined, Unspecified, or Implementation-Defined Behavior | Research Concepts1000 |
ParentOf | Weakness Base | 14 | Compiler Removal of Code to Clear Buffers | Research Concepts (primary)1000 |
[REF-11] M. Howard and D. LeBlanc. "Writing Secure Code". Chapter 9, "A Compiler Optimization Caveat" Page 322. 2nd Edition. Microsoft. 2002. |
Submissions | ||||
---|---|---|---|---|
Submission Date | Submitter | Organization | Source | |
2008-10-01 | Internal CWE Team | |||
new weakness-focused entry for Research view closes the gap between 14 and 435. | ||||
Modifications | ||||
Modification Date | Modifier | Organization | Source | |
2008-11-24 | CWE Content Team | MITRE | Internal | |
updated Detection Factors | ||||
2009-03-10 | CWE Content Team | MITRE | Internal | |
updated Applicable Platforms, Observed Examples, Related Attack Patterns, Relationships |