APAR status
Closed as program error.
Error description
If a JAXB context is created manually (e.g. when processing a JMS message) and a Base64 string that contains more than 2 filler characters is unmarked, an endless loop occurs in the XSBase64BinaryUtil class. Thread stack of looping thread: 3XMTHREADINFO "WebContainer : 1" J9VMThread:0x0000000002BF5000, omrthread_t:0x00007FCD90003AE8, java/lang/Thread:0x00000000EF26AD88, state:R, prio=5 3XMJAVALTHREAD (java/lang/Thread getId:0xFB, isDaemon:true) 3XMTHREADINFO1 (native thread ID:0xFB0C, native priority:0x5, native policy:UNKNOWN, vmstate:CW, vm thread flags:0x00000081) 3XMTHREADINFO2 (native stack address range from:0x00007FCFF40CB000, to:0x00007FCFF410B000, size:0x40000) 3XMCPUTIME CPU usage total: 267.061820697 secs, current category="Application" 3XMHEAPALLOC Heap bytes allocated since last GC cycle=0 (0x0) 1INTERNAL Unable to obtain lock context information 3XMTHREADINFO3 Java callstack: 4XESTACKTRACE at com/ibm/xml/xlxp2/datatype/validation/XSBase64 BinaryUtil.parseBase64BinaryUnbuffered(XSBase64BinaryUtil.java: 181(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/datatype/validation/XSBase64 BinaryUtil.parseBase64Binary(XSBase64BinaryUtil.java:75) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/impl/Deserial izationContext.getBase64BinaryValue(DeserializationContext.java :1334) 4XESTACKTRACE at foo/bar/Tes tType_JAXB_Deserialization_Stub.write(at.gv.brz.namespace.websp hereunmarshalling.TestType_JAXB_Deseria lization_Stub.java) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/impl/Deserial izationContext.handleSimpleContent(DeserializationContext.java: 762(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/impl/Deserial izationContext.handleEndElementEvent(DeserializationContext.jav a:412(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/impl/JAXBDocu mentScanner.produceEndElementEvent(JAXBDocumentScanner.java:234) 4XESTACKTRACE at com/ibm/xml/xlxp2/scan/DocumentScanner.scanEnd Element(DocumentScanner.java:2583(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/scan/DocumentScanner.scanCon tent(DocumentScanner.java:1848(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/runtime/VMContext.scanConten t(VMContext.java:502(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/scan/DocumentScanner.nextEve nt(DocumentScanner.java:1283(CompiledCode)) 4XESTACKTRACE at com/ibm/xml/xlxp2/scan/DocumentScanner.parseDo cumentEntity(DocumentScanner.java:1175) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/impl/JAXBDocu mentScanner.unmarshal(JAXBDocumentScanner.java:147) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/UnmarshallerI mpl.unmarshal(UnmarshallerImpl.java:131) 4XESTACKTRACE at com/ibm/xml/xlxp2/jaxb/unmarshal/AbstractUnmar shallerImpl.unmarshal(AbstractUnmarshallerImpl.java:81) 4XESTACKTRACE at at/gv/brz/test/websphereunmarshaling/CrashReso urce.getMessage(CrashResource.java:28) 4XESTACKTRACE at sun/reflect/NativeMethodAccessorImpl.invoke0(Native Method) 4XESTACKTRACE at sun/reflect/NativeMethodAccessorImpl.invoke(Na tiveMethodAccessorImpl.java:90(CompiledCode)) 4XESTACKTRACE at sun/reflect/DelegatingMethodAccessorImpl.invok e(DelegatingMethodAccessorImpl.java:55(CompiledCode)) 4XESTACKTRACE at java/lang/reflect/Method.invoke(Method.java:508(Compiled Code)) 4XESTACKTRACE at com/ibm/ws/jaxrs20/server/LibertyJaxRsServerFa ctoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java: 659) 4XESTACKTRACE at com/ibm/ws/jaxrs20/server/LibertyJaxRsInvoker. performInvocation(LibertyJaxRsInvoker.java:108) 4XESTACKTRACE at org/apache/cxf/service/invoker/AbstractInvoker .invoke(AbstractInvoker.java:96) 4XESTACKTRACE at com/ibm/ws/jaxrs20/server/LibertyJaxRsInvoker. invoke(LibertyJaxRsInvoker.java:174) 4XESTACKTRACE at org/apache/cxf/jaxrs/JAXRSInvoker.invoke(JAXRSInvoker.java:191) Code snippet where the error occurs: JAXBContext jaxbContext = JAXBContext.newInstance(ObjectFactory.class); Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller(); NotificationMessage notificationMessage = (NotificationMessage) JAXBIntrospector.getValue(jaxbUnmarshaller .unmarshal(new StringReader(xmlString))); XML parser hangs in the last line and leads to a cpu loop caused by the four equal signs at the end of the Base64 string (instead of 2).
Local fix
As possible way to avoid it would be to set com.ibm.xml.xlxp.jaxb.opti.level property set to 2 to disable IBM unmarshaller and use reference implementation instead
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server * **************************************************************** * PROBLEM DESCRIPTION: PROCESSING BASE64 ENCODED DATA USING * * JAXB * * CAN CAUSE A LOOP * **************************************************************** * RECOMMENDATION: * **************************************************************** When unamarshalling base64 encoded data inside XML using JAXB an infinite loop can occur.
Problem conclusion
The fix for this APAR is targeted for inclusion in fix pack 9.0.5.11 and 8.5.5.21. For more information, see 'Recommended Updates for WebSphere Application Server': https://www.ibm.com/support/pages/node/715553
Temporary fix
Comments
APAR Information
APAR number
PH39085
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2021-07-19
Closed date
2021-12-20
Last modified date
2021-12-20
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WEBS APP SERV N
Fixed component ID
5724H8800
Applicable component levels
[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0"}]
Document Information
Modified date:
21 December 2021