Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

When Java source code is compiled, it is converted into bytecode, saved in one or more class files, and executed by the Java Virtual Machine ( JVM). Java class files may be compiled on one machine and executed on another machine. A properly generated class file is said to be conforming. When the JVM loads a class file, it has no way of knowing whether the class file is conforming. The class file could have been created by some other process, or an attacker could tamper with a conforming class file.

The Java bytecode verifier is an internal component of the JVM that is responsible for detecting non-conforming nonconforming Java bytecode. It ensures that the class file is in the proper Java class format, that illegal type casts are avoided, that operand stack underflows are impossible, and that each method eventually removes from the operand stack everything pushed by that method.

...

Code Block
bgColor#ccccff
java -Xverify:all ApplicationName

Exceptions

ENV04-EX0: On Java 2 systems, the primordial class loader is permitted to omit bytecode verification of classes loaded from the boot class path. These system classes are protected through platform and file system protections rather than by the bytecode verification process.

...

Bytecode verification ensures that the bytecode contains many of the security checks mandated by the Java Language Specification. Omitting the verification step could permit execution of unsafe Java code.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad03cf81054d2b46-9fc833f8-45234c34-a502afa8-ab0069a4a51fbb9fc60ebc66"><ac:plain-text-body><![CDATA[

[[Oaks 2001

AA. Bibliography#Oaks 01]]

The Bytecode Verifier

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ad1f56bb6cc076b0-28c38f2e-4b4649db-b2b7b241-6590eb98501a58888ec125b4"><ac:plain-text-body><![CDATA[

[[Pistoia 2004

AA. Bibliography#Pistoia 04]]

Section 7.3, The Class File Verifier

]]></ac:plain-text-body></ac:structured-macro>

...