Bug 1080991 - Messages#getBundle() in jboss-logging is missing privileged action
Messages#getBundle() in jboss-logging is missing privileged action
Status: CLOSED CURRENTRELEASE
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Logging (Show other bugs)
6.2.1
Unspecified Unspecified
unspecified Severity unspecified
: ER1
: EAP 6.3.0
Assigned To: James Perkins
Nikoleta Ziakova
Russell Dickenson
:
Depends On: 1081196
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-26 08:56 EDT by Ivo Studensky
Modified: 2014-06-28 11:38 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In previous versions of JBoss EAP 6, running with a security manager enabled without sufficient permissions resulted in errors attempting to retrieve a message bundle. As a consequence, an exception presented when attempting to get a message bundle if class loader permissions were not enabled. In this release, retrieving message bundles is now done in a privilege block. The exceptions no longer occur when retrieving the message bundle when a security manager is enabled.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-28 11:38:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBLOGGING-102 Major Closed Messages#getBundle() needs to be privileged 2016-09-09 00:45 EDT

  None (edit)
Description Ivo Studensky 2014-03-26 08:56:40 EDT
Description of problem:
org.jboss.logging.Messages#getBundle(Class<T> type, Locale locale) calls type.getClassLoader which requires privileges when running with Security Manager, see the stack-trace below:

13:25:41,600 ERROR [stderr] (pool-1-thread-1) access: AccessControlContext invoking the Combiner
13:25:41,600 ERROR [stderr] (pool-1-thread-1) access: access allowed (java.io.FilePermission /content/mdb-read-props-deny.jar read)
13:25:41,601 ERROR [stderr] (pool-1-thread-1) access: access denied (java.lang.RuntimePermission getClassLoader)
13:25:41,601 ERROR [stderr] (pool-1-thread-1) java.lang.Exception: Stack trace
13:25:41,602 ERROR [stderr] (pool-1-thread-1) 	at java.lang.Thread.dumpStack(Thread.java:1249)
13:25:41,603 ERROR [stderr] (pool-1-thread-1) 	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:364)
13:25:41,603 ERROR [stderr] (pool-1-thread-1) 	at java.security.AccessController.checkPermission(AccessController.java:549)
13:25:41,603 ERROR [stderr] (pool-1-thread-1) 	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
13:25:41,604 ERROR [stderr] (pool-1-thread-1) 	at java.lang.Class.getClassLoader(Class.java:596)
13:25:41,604 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.logging.Messages.getBundle(Messages.java:66)
13:25:41,604 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.logging.Messages.getBundle(Messages.java:43)
13:25:41,604 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.pool.mcp.SemaphoreArrayListManagedConnectionPool.<clinit>(SemaphoreArrayListManagedConnectionPool.java:76)
13:25:41,604 ERROR [stderr] (pool-1-thread-1) 	at java.lang.Class.forName0(Native Method)
13:25:41,605 ERROR [stderr] (pool-1-thread-1) 	at java.lang.Class.forName(Class.java:249)
13:25:41,605 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.pool.mcp.ManagedConnectionPoolFactory.<clinit>(ManagedConnectionPoolFactory.java:62)
13:25:41,605 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getManagedConnectionPool(AbstractPool.java:172)
13:25:41,605 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.pool.AbstractPool.getConnection(AbstractPool.java:357)
13:25:41,606 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.getManagedConnection(AbstractConnectionManager.java:329)
13:25:41,606 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:368)
13:25:41,606 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:464)
13:25:41,606 ERROR [stderr] (pool-1-thread-1) 	at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:832)
13:25:41,607 ERROR [stderr] (pool-1-thread-1) 	at org.hornetq.ra.HornetQRASessionFactoryImpl.createQueueSession(HornetQRASessionFactoryImpl.java:232)
13:25:41,607 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.as.testsuite.integration.secman.AbstractMDBPermissionPropertyReadTestCase.sendMessage(AbstractMDBPermissionPropertyReadTestCase.java:107)
13:25:41,607 ERROR [stderr] (pool-1-thread-1) 	at org.jboss.as.testsuite.integration.secman.MDBDenyPermissionPropertyReadTestCase.testJavaHomePropertyDeny(MDBDenyPermissionPropertyReadTestCase.java:47)




Version-Release number of selected component (if applicable):
jboss-logging-3.1.4.GA
Comment 1 JBoss JIRA Server 2014-03-26 13:36:37 EDT
James Perkins <jperkins@redhat.com> updated the status of jira JBLOGGING-102 to Closed
Comment 2 Kabir Khan 2014-03-26 18:35:47 EDT
https://github.com/jbossas/jboss-eap/pull/1143
Comment 3 Petr Kremensky 2014-04-23 08:59:32 EDT
Verified on EAP 6.3.0.ER2.

Note You need to log in before you can comment on or make changes to this bug.