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 "Code Correctness: Class Does Not Implement Cloneable"

From OWASP
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Template:Vulnerability}}
 
{{Template:Vulnerability}}
 
{{Template:Fortify}}
 
{{Template:Fortify}}
 +
{{Template: Stub}}
 +
Last revision (mm/dd/yy): '''{{REVISIONMONTH}}/{{REVISIONDAY}}/{{REVISIONYEAR}}'''
 +
__TOC__
  
==Abstract==
+
[[ASDR_TOC_Vulnerabilities|Vulnerabilities Table of Contents]]
 +
 
 +
[[ASDR Table of Contents]]
  
This class implements a clone() method but does not implement Cloneable.
 
  
 
==Description==
 
==Description==
 +
 +
This class implements a clone() method but does not implement Cloneable.
  
 
It appears that the programmer intended for this class to implement the Cloneable interface because it implements a method named clone(). However, the class does not implement the Cloneable interface and the clone() method will not behave correctly.
 
It appears that the programmer intended for this class to implement the Cloneable interface because it implements a method named clone(). However, the class does not implement the Cloneable interface and the clone() method will not behave correctly.
  
==Examples ==
+
 
 +
==Risk Factors==
 +
TBD
 +
 
 +
==Examples==
  
 
Calling clone() for this class will result in a CloneNotSupportedException.
 
Calling clone() for this class will result in a CloneNotSupportedException.
Line 22: Line 32:
 
</pre>
 
</pre>
  
==Related Threats==
+
==Related [[Attacks]]==
 +
 
 +
* [[Attack 1]]
 +
* [[Attack 2]]
 +
 
 +
 
 +
==Related [[Vulnerabilities]]==
 +
 
 +
* [[Vulnerability 1]]
 +
* [[Vulnerabiltiy 2]]
 +
 
 +
 
 +
==Related [[Controls]]==
 +
 
 +
* [[Control 1]]
 +
* [[Control 2]]
 +
 
 +
 
 +
==Related [[Technical Impacts]]==
 +
 
 +
* [[Technical Impact 1]]
 +
* [[Technical Impact 2]]
 +
 
 +
 
 +
==References==
 +
TBD
 +
 
 +
[[Category:FIXME|need subcategory
 +
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
  
==Related Attacks==
+
Session Management Vulnerability]]
  
==Related Vulnerabilities==
+
__NOTOC__
  
==Related Countermeasures==
 
  
==Categories==
 
  
 
[[Category:Code Quality Vulnerability]]
 
[[Category:Code Quality Vulnerability]]
 
 
[[Category:Java]]
 
[[Category:Java]]
 
 
[[Category:Implementation]]
 
[[Category:Implementation]]
 
 
[[Category:Code Snippet]]
 
[[Category:Code Snippet]]
 +
[[Category:OWASP ASDR Project]]

Revision as of 10:58, 23 September 2008

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

This article includes content generously donated to OWASP by MicroFocus Logo.png
This article is a stub. You can help OWASP by expanding it or discussing it on its Talk page.


Last revision (mm/dd/yy): 09/23/2008

Vulnerabilities Table of Contents

ASDR Table of Contents


Description

This class implements a clone() method but does not implement Cloneable.

It appears that the programmer intended for this class to implement the Cloneable interface because it implements a method named clone(). However, the class does not implement the Cloneable interface and the clone() method will not behave correctly.


Risk Factors

TBD

Examples

Calling clone() for this class will result in a CloneNotSupportedException.

	public class Kibitzer {
	  public Object clone() throws CloneNotSupportedException {
		... 
	  }
	}

Related Attacks


Related Vulnerabilities


Related Controls


Related Technical Impacts


References

TBD