This site is the archived OWASP Foundation Wiki and is no longer accepting Account Requests.
To view the new OWASP Foundation website, please visit https://owasp.org

Difference between revisions of "Dead Code: Unused Field"

From OWASP
Jump to: navigation, search
(Reverting to last version not containing links to www.texteltchile.com)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:Vulnerability}}
+
{{template:CandidateForDeletion}}
{{Template:Fortify}}
 
  
[[Category:FIXME|This is the text from the old template. This needs to be rewritten using the new template.]]
+
#REDIRECT [[Failure to follow guideline/specification]]
  
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 
  
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 
 
[[ASDR Table of Contents]]
 
__TOC__
 
  
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
  
 
==Description==
 
==Description==
Line 85: Line 80:
 
==References==
 
==References==
 
TBD
 
TBD
 
[[Category:FIXME|add links
 
 
In addition, one should classify vulnerability based on the following subcategories: Ex:<nowiki>[[Category:Error Handling Vulnerability]]</nowiki>
 
 
Availability Vulnerability
 
 
Authorization Vulnerability
 
 
Authentication Vulnerability
 
 
Concurrency Vulnerability
 
 
Configuration Vulnerability
 
 
Cryptographic Vulnerability
 
 
Encoding Vulnerability
 
 
Error Handling Vulnerability
 
 
Input Validation Vulnerability
 
 
Logging and Auditing Vulnerability
 
 
Session Management Vulnerability]]
 
 
__NOTOC__
 
 
 
[[Category:OWASP ASDR Project]]
 
[[Category:Code Quality Vulnerability]]
 
[[Category:Java]]
 
[[Category:Implementation]]
 
[[Category:Code Snippet]]
 

Latest revision as of 18:28, 27 May 2009

Template:CandidateForDeletion

#REDIRECT Failure to follow guideline/specification


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

Description

This field is never accessed, except perhaps by dead code. It is likely that the field is simply vestigial, but it is also possible that the unused field points out a bug.


Risk Factors

  • Talk about the factors that make this vulnerability likely or unlikely to actually happen
  • Discuss the technical impact of a successful exploit of this vulnerability
  • Consider the likely [business impacts] of a successful attack


Examples

Example 1

The field named glue is not used in the following class. The author of the class has accidentally put quotes around the field name, transforming it into a string constant.

	public class Dead {
	
	  String glue;
	
	  public String getGlue() {
		return "glue";
	  }
	
	}

Example 2

The field named glue is used in the following class, but only from a method that is never called.

	public class Dead {
	
	  String glue;
	
	  private String getGlue() {
		return glue;
	  }
	
	}


Related Attacks


Related Vulnerabilities


Related Controls


Related Technical Impacts


References

TBD