[
https://issues.apache.org/jira/browse/THRIFT-1643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niraj Tolia updated THRIFT-1643:
--------------------------------
Attachment: 0002-Add-test-for-TBinaryProtocol-OOM-Denial-of-Service.patch
0001-Add-test-for-TCompactProtocol-OOM-Denial-of-Service.patch
Here is a test case for TCompactProtocol.
Turns out that TBinaryProtocol was already protected by something similar to my
previous patch and does not need any modification. I have also included a test
case for TBinaryProtocol based on the Attack.java test included by the Devesh,
the original filer.
That said, would you like me to add a new patch for TCompactProtocol that, like
https://svn.apache.org/viewvc?view=revision&revision=1383515, also throws
TProtocolException instead of TException?
> Denial of Service attack in TBinaryProtocol.readString
> ------------------------------------------------------
>
> Key: THRIFT-1643
> URL: https://issues.apache.org/jira/browse/THRIFT-1643
> Project: Thrift
> Issue Type: Bug
> Components: Java - Library
> Affects Versions: 0.6.1, 0.8
> Environment: All
> Reporter: Devesh Parekh
> Assignee: Roger Meier
> Priority: Critical
> Labels: security
> Attachments:
> 0001-Address-denial-of-service-in-TCompactProtocol.patch,
> 0001-Add-test-for-TCompactProtocol-OOM-Denial-of-Service.patch,
> 0002-Add-test-for-TBinaryProtocol-OOM-Denial-of-Service.patch, Attack.java,
> Foo.thrift
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> In readString, if the string field's size is greater than the number of bytes
> remaining in the byte array to deserialize, libthrift will happily allocate a
> byte array of that size in readStringBody, filling the heap.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira