RFR: 8243376 java.net.SocketPermission.implies(Permission p) spec is mismatching with implementation
    Jayashree Sk1 
    jayashreesk at in.ibm.com
       
    Thu May 21 08:35:10 UTC 2020
    
    
  
Hello,
Please review the fix and Jtreg testcase to the following issue:
https://bugs.openjdk.java.net/browse/JDK-8243376
The proposed changeset is hosted at:
http://cr.openjdk.java.net/~vtewari/8243376/webrev/index.html
The scenario is: 
- Some specified target hostname resolves to two IP addresses (always the same address pair). 
- The DNS resolved order of the two ip addresses changes (a usual LoadBalancer type behavior). 
- The CNAME of the two ip addresses differ. 
In SocketPermission class(void getIP() method), it internally resolves and saves only the first IP address resolved, not all the IP addresses resolved. 
- Depending on when the implier/implied SocketPermission hostname is resolved, the resolved addresses order differs, and the internally saved IP address mismatches, resulting on SocketPermission#implies() false. 
So the fix is to: 
Pass all the IP addresses of the specified target instead of just saving the first IP.   
Thanks
Jay
 
    
    
More information about the net-dev
mailing list