JDK-6567025 : OOM condition not handled in PCSS11
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • CPU: sparc
  • Submitted: 2007-06-07
  • Updated: 2011-01-21
  • Resolved: 2009-04-01
Related Reports
Duplicate :  
Description
Specjvm2007 becnhmark crashes in pkcs code. Crash happens because function
jobject ckSlotInfoPtrToJSlotInfo(JNIEnv *env, const CK_SLOT_INFO_PTR ckpSlotInfo)
has code:
jSlotInfoObject = (*env)->AllocObject(env, jSlotInfoClass);
...
(*env)->SetObjectField(env, jSlotInfoObject, jFieldID, jTempVersion);

and it does no check for pending OOME and null, so when no memory available
whole application crashes.

Comments
EVALUATION Fixes for 6812738 "SSL stress test with GF leads to 32 bit max process size in less than 5 minutes with PCKS11 provider" includes many error checkings in the native code which should cover this specific OOM condition. Thus, will close this as a duplicate of 6812738.
01-04-2009