coheigea opened a new pull request, #3732: URL: https://github.com/apache/cxf/pull/3732
In CORBA’s binary wire format, each sequence starts with a length field written by the sender. CXF’s CORBA binding used that length to allocate memory before reading any of the data. A request of about 100 bytes claiming a sequence of 2 billion octets made the server try to allocate 2 GB, and for other sequences up to around 8–16 GB. Lengths above about 2.1 billion arrived as negative numbers and crashed with a NegativeArraySizeException. The bound declared in the IDL was never checked either. The length is now checked first. Values that don’t fit in a Java int, or that exceed the sequence’s IDL bound, are rejected with a CorbaBindingException. Large octet sequences are read in 64 KB chunks, and other sequences grow as their elements are read, so a message claiming more data than it actually sends simply fails when the data runs out, without allocating anything large. -- 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]
