
يوضح تسرب ذاكرة في عميل JBoss عند استخدام UserTransaction بشكل متكرر، مع PoC وتحليل لـ CVE-2022-0853.
تسرب ذاكرة على جانب عميل jboss عند استخدام UserTransaction بشكل متكرر.
مثل:
private void testTransaction() throws Exception {
for(int i=1; i< 500000; i++) {
System.out.println("Starting process " + i);
// get the UserTransaction and EJB Proxy
Context ctx = getInitialContext(host, port, username, password);
UserTransaction tx = getUserTransaction(ctx);
ControllerRemote cr = (ControllerRemote)
ctx.lookup("Controller/Controller" + "!com.test.usertransaction.ControllerRemote");
try {
tx.begin();
}
catch(Exception ex1) {
ex1.printStackTrace();
}
//System.out.println("user transaction started");
cr.mainCall();
try {
tx.commit();;
}
catch(Exception ex1) {
ex1.printStackTrace();
throw ex1;
}
//System.out.println("commited user transaction");
if(ctx != null)
ctx.close();
}
}
يتم تنفيذ المعاملة بواسطة عميل بعيد على EJB منشور في EAP 7.3. يتم تكرار المعاملة 50000 مرة. في نهاية التكرارات يُلاحظ تسرب في الذاكرة. 32% من الذاكرة تحتلها org.wildfly.transaction.client.provider.remoting.TransactionClientChannel.