Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

ReflectPermission, suppressAccessChecks

Wiki MarkupGranting {{ReflectPermission}} on the target {{suppressAccessChecks}} suppresses all standard Java language access checks when the permitted class attempts to operate on package-private, protected, or private members of another class. Consequently, the permitted class can obtain permissions to examine any field or invoke any method belonging to an arbitrary class \ [[Reflect 2006|AA. References#Reflect 06]\]. As a result, {{ReflectPermission}} must never be granted with target {{suppressAccessChecks}}.

Wiki MarkupAccording to the technical note _Permissions in the Java SE 6 Development Kit_ \ [[Permissions 2008|AA. References#Permissions 08]\], Section [ReflectPermission|http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html#ReflectPermission], target {{suppressAccessChecks}}:

Warning: Extreme caution should be taken before granting this permission to code, for it provides the ability to access fields and invoke methods in a class. This includes not only public, but protected and private fields and methods as well.

...

The permission java.lang.RuntimePermission applied to target createClassLoader grants code the permission to create a ClassLoader object. This is extremely dangerous because malicious code can create its own custom class loader and load classes by assigning them arbitrary permissions. A custom class loader can define a class (or ProtectionDomain) with permissions that override any restrictions specified in the systemwide security policy file.

Wiki Markup_Permissions in the Java SE 6 Development Kit_ \ [[Permissions 2008|AA. References#Permissions 08] \] states:

This is an extremely dangerous permission to grant. Malicious applications that can instantiate their own class loaders could then load their own rogue classes into the system. These newly loaded classes could be placed into any protection domain by the class loader, thereby automatically granting the classes the permissions for that domain.

...

MITRE CWE

CWE-732. Incorrect permission assignment for critical resource

Bibliography

...

[[API 2006AA. References#API 06]]

[Class AllPermissionhttp://java.sun.com/javase/6/docs/api/java/security/AllPermission.html], [ReflectPermissionhttp://java.sun.com/javase/6/docs/api/java/lang/reflect/ReflectPermission.html], [ RuntimePermission

http://java.sun.com/javase/6/docs/api/java/lang/reflect/RuntimePermission.html]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6fcc1c97-b933-4d5d-a4c3-a1d445fa6d93"><ac:plain-text-body><![CDATA[

[[Gong 2003AA. References#Gong 03]]

 

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b7c9f03b-3bfe-40de-9031-65efcf87e7ae"><ac:plain-text-body><![CDATA[

[[Long 2005AA. References#Long 05]]

Section 2.5, Reflection

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="433d0ea1-28a1-4c0e-9561-e67aeaef0f34"><ac:plain-text-body><![CDATA[

[[Permissions 2008AA. References#Permissions 08]]

Section [ReflectPermission

http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html#ReflectPermission]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="84a22d84-380c-4118-8eb7-3cbed0020765"><ac:plain-text-body><![CDATA[

[[Reflect 2006

AA. References#Reflect 06]]

]] ></ac:plain-text-body></ac:structured-macro><ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8e9b31d5-5125-4ae5-b2f7-0c576479d8ce"><ac:plain-text-body><!

[CDATA[ [[Security 2006AA. References#Security 06]]

[Security Architecturehttp://java.sun.com/javase/6/docs/technotes/guides/security/spec/security-spec.doc.html], Section [RuntimePermission

http://java.sun.com/javase/6/docs/technotes/guides/security/permissions.html#RuntimePermission]

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

...

      15. Runtime Environment (ENV)