Bug 50646

Summary: Tribes ByteMessage will get corrupted if message size exceeds the underlying buffer size
Product: Tomcat 6 Reporter: Olivier Costet <ocostet>
Component: ClusterAssignee: Tomcat Developers Mailing List <dev>
Severity: major CC: ronald-lists
Priority: P2 Keywords: PatchAvailable
Version: 6.0.32   
Target Milestone: default   
Hardware: PC   
OS: All   
Attachments: svn diff

Description Olivier Costet 2011-01-25 07:08:10 UTC
The Tribes ByteMessage class is used to transfer byte payloads in the context of the tribes communication framework.

Due to how the message is deserialized, there will be data loss (and hence corruption) if the message size exceeds the underlying buffer size.

The solution is to replace an ObjectInput#read(byte[]) call by ObjectInput#readFully(byte[]).

Fix is attached.
Comment 1 Olivier Costet 2011-01-25 07:09:27 UTC
Created attachment 26544 [details]
svn diff
Comment 2 Mark Thomas 2011-01-26 13:28:56 UTC
Thanks for the patch. It has been applied to 7.0.x and will be included in 7.0.7 onwards.
Comment 3 Ronald Klop 2011-06-29 10:53:45 UTC
Oliver, Mark,
Is it possible that this is an issue on Tomcat 6 also?

This is suggested in this mail:
Comment 4 Mark Thomas 2011-06-29 10:56:07 UTC
Quite possibly.
Comment 5 Mark Thomas 2011-06-29 13:33:42 UTC
Patch proposed for 6.0.x
Comment 6 Mark Thomas 2011-07-02 12:18:38 UTC
Fixed in 6.0.x and will be included in 6.0.33 onwards.