Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft Jtest 2020.2

...

Calling overridable methods on the clone under construction can expose class internals to malicious code or violate class invariants by exposing the clone to trusted code in a partially initialized state, affording the opportunity to corrupt the state of the clone, the object being cloned, or both.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

MET06-J

Medium

Probable

Low

P12

L1

Automated Detection

Automated detection is straightforward.

ToolVersionCheckerDescription
Parasoft Jtest

Include Page
Parasoft_V
Parasoft_V

SECURITY.WSC.CLONEMake your 'clone()' method "final" for security

Bibliography

[Bloch 2008]

Item 11, "Override clone Judiciously"

[Gong 2003]

 

...



...