Difference between revisions of "Incorrect block delimitation"

From OWASP
Jump to: navigation, search
(Reverting to last version not containing links to www.textbomono.com)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
{{Template:Vulnerability}}
 
{{Template:SecureSoftware}}
 
{{Template:SecureSoftware}}
{{Template:Vulnerability}}
 
 
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
 
  
 
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
 
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 
[[ASDR Table of Contents]]
 
__TOC__
 
 
  
 
==Description==
 
==Description==
Line 39: Line 33:
  
 
Low
 
Low
 +
 +
In many languages, braces are optional for blocks, and - in a case where braces are omitted - it is possible to insert a logic error where a statement is thought to be in a block but is not. This is a common and well known reliability error.
 +
  
  
 
==Risk Factors==
 
==Risk Factors==
  
* Talk about the [[OWASP Risk Rating Methodology|factors]] that make this vulnerability likely or unlikely to actually happen
+
TBD
* Discuss the technical impact of a successful exploit of this vulnerability
+
* Consider the likely [business impacts] of a successful attack
+
 
+
  
 
==Examples==
 
==Examples==
  
===Short example name===
+
In this example, when the condition is true, the intention may be that both ''x'' and ''y'' run.
: A short example description, small picture, or sample code with [http://www.site.com links]
+
  
===Short example name===
+
<pre>
: A short example description, small picture, or sample code with [http://www.site.com links]
+
if (condition==true) x;
 +
  y;
 +
</pre>
  
  
Line 68: Line 63:
 
* [[Vulnerabiltiy 2]]
 
* [[Vulnerabiltiy 2]]
  
Note: the contents of "Related Problems" sections should be placed here
 
  
  
 
==Related [[Controls]]==
 
==Related [[Controls]]==
  
* [[Control 1]]
+
* Implementation: Always use explicit block delimitation and use static-analysis technologies to enforce this practice.
* [[Control 2]]
+
 
+
Note: contents of "Avoidance and Mitigation" and "Countermeasure" related Sections should be placed here
+
  
  
Line 86: Line 77:
  
 
==References==
 
==References==
Note: A reference to related [http://cwe.mitre.org/ CWE] or [http://capec.mitre.org/ CAPEC] article should be added when exists. Eg:
 
 
* [http://cwe.mitre.org/data/definitions/79.html CWE 79].
 
* http://www.link1.com
 
* [http://www.link2.com Title for the link2]
 
  
 +
TBD
 
[[Category:FIXME|add links
 
[[Category:FIXME|add links
  
Line 122: Line 109:
  
 
[[Category:OWASP ASDR Project]]
 
[[Category:OWASP ASDR Project]]
 
 
==Overview==
 
 
 
==Avoidance and mitigation ==
 
 
Implementation: Always use explicit block delimitation and use static-analysis technologies to enforce this practice.
 
 
==Discussion ==
 
 
In many languages, braces are optional for blocks, and - in a case where braces are omitted - it is possible to insert a logic error where a statement is thought to be in a block but is not. This is a common and well known reliability error.
 
 
==Examples ==
 
 
In this example, when the condition is true, the intention may be that both ''x'' and ''y'' run.
 
 
<pre>
 
if (condition==true) x;
 
  y;
 
</pre>
 
 
==Related problems ==
 
 
Not available.
 
 
 
 
[[Category:Vulnerability]]
 
[[Category:Vulnerability]]
 
[[Category:General Logic Error Vulnerability]]
 
[[Category:General Logic Error Vulnerability]]
 
[[Category:OWASP_CLASP_Project]]
 
[[Category:OWASP_CLASP_Project]]

Latest revision as of 13:30, 27 May 2009

This is a Vulnerability. To view all vulnerabilities, please see the Vulnerability Category page.



Last revision (mm/dd/yy): 05/27/2009

Vulnerabilities Table of Contents

Description

In some languages, forgetting to explicitly delimit a block can result in a logic error that can, in turn, have security implications.

Consequences

This is a general logic error - with all the potential consequences that this entails.

Exposure period

  • Implementation

Platform

C, C++, C#, Java

Required resources

Any

Severity

Varies

Likelihood of exploit

Low

In many languages, braces are optional for blocks, and - in a case where braces are omitted - it is possible to insert a logic error where a statement is thought to be in a block but is not. This is a common and well known reliability error.


Risk Factors

TBD

Examples

In this example, when the condition is true, the intention may be that both x and y run.

if (condition==true) x;
  y;


Related Attacks


Related Vulnerabilities


Related Controls

  • Implementation: Always use explicit block delimitation and use static-analysis technologies to enforce this practice.


Related Technical Impacts


References

TBD