RFR(XS): 8057564: JVM hangs at getAgentProperties after attaching to VM with lower IntegrityLevel

Sergey Gabdurakhmanov sergey.gabdurakhmanov at oracle.com
Thu Sep 11 11:49:40 UTC 2014


Hi,

Could I please have a review of this small fix.

webrev: http://cr.openjdk.java.net/~sgabdura/8057564/webrev.00/
bug: https://jbs.oracle.com/bugs/browse/JDK-8057564

Problem description:
On Windows 7 with User Account Control (UAC) enabled, JVM hangs at getAgentProperties or getSystemProperties after attaching from a "high" IntegrityLevel JVM to a "medium" IntegrityLevel JVM, using Attach API:
attachedVM = com.sun.tools.attach.VirtualMachine.attach(pid);
final Properties systemProperties = attachedVM.getSystemProperties();

Root cause:
In WindowsVirtualMachine.attach  is implemented with named pipes.
If named pipe was created with default security properties then windows will not allow process with"medium" IntegrityLevel  to be attached to a processwith "high" IntegrityLevel.

Solution:
Create security properties that allow requested connection.

I'm going to push this fix into JDK9, 8 and 7.
   
BR,
Sergey



More information about the serviceability-dev mailing list