sahvx655-wq commented on PR #310:
URL: https://github.com/apache/calcite-avatica/pull/310#issuecomment-4830063188

   Sure, I'll raise it on the Apache JIRA and put the CALCITE key in the PR 
title so it's tracked properly. For the writeup I'll describe what I found 
while tracing the server parse path: CursorFactory.fromProto resolves the 
wire-supplied className with the single-arg Class.forName, which loads and 
initialises the class in one go. That path is reachable on the server straight 
from an untrusted ExecuteRequest, through StatementHandle.fromProto then 
Signature.fromProto then CursorFactory.fromProto, so a client can name any 
class on the server's classpath and have its static initialiser run at 
request-parse time.
   
   Left unfixed, the concern is initialisation side effects firing before the 
class is ever legitimately used, which is the usual CWE-470 unsafe class 
loading case. The change keeps the three-arg Class.forName with 
initialize=false so the class is still linked and resolved, and genuine 
initialisation still happens lazily when a cursor actually gets built. I'll 
post the JIRA link back here once it's raised.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to