You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "digi-scrypt (via GitHub)" <gi...@apache.org> on 2026/06/05 15:08:21 UTC
[PR] validate deserialized size in CircularFifoQueue.readObject [commons-collections]
digi-scrypt opened a new pull request, #678:
URL: https://github.com/apache/commons-collections/pull/678
1. maxElements is reconstructed from the stream and the backing array is sized to it, but the element count read with readInt() is never checked against it.
2. a count greater than maxElements writes past elements[] (ArrayIndexOutOfBoundsException), and a negative count yields a queue whose start/end are inconsistent so size() reports elements that were never read.
What happens with a tampered stream: have we considered that maxElements is final and trusted while the count beside it is not? Validated both (maxElements >= 1, 0 <= size <= maxElements) in readObject and throw InvalidObjectException, which keeps the check at the only layer that sees the raw stream.
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Validate deserialized size in CircularFifoQueue.readObject [commons-collections]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory merged PR #678:
URL: https://github.com/apache/commons-collections/pull/678
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Validate deserialized size in CircularFifoQueue.readObject [commons-collections]
Posted by "garydgregory (via GitHub)" <gi...@apache.org>.
garydgregory commented on PR #678:
URL: https://github.com/apache/commons-collections/pull/678#issuecomment-4820265751
TY @digi-scrypt , merged 🚀
--
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: issues-unsubscribe@commons.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org