GH-3572: Bump thrift to 0.23#3589
Conversation
Bump thrift to 0.23 Added instructions in docs as to where to find the gpg/sha signatures and a link to the thrift team KEYS file.
|
new thrift is triggering NPEs in tests. That is bad |
But it means: if you don't supply a TTransport to TProtocol ctor you hit an NPE during IO whenever those limits are validated. Add a StubTTransport which no-ops the read range check and declares there's no limit on depth checking.
|
NPE cause is THRIFT-5916 Bring Java recursion limit support at parity with C++; commit #66dae3f is the "least change to existing code" patch, not necessarily the most elegant. It provides enough of a stub class to stop thrift blowing up. The alternative is for ParquetProtocol and BufferedProtocolReadToWrite.NullProtocol to
Good: less stubbing of thrift internals
Either way there's a risk of regressions if they add more checks in future releases. There's also the open issue "should there be a depth limit?"; we're adding one when hardening variants after all. But there we can be fairly confident there are no large datasets using the type. If thrift cpp enforces a depth of 64, then so will parquet-cpp, won't it? In which case modifying this PR to use the default depth of 64 would be consistent. |
Fokko
left a comment
There was a problem hiding this comment.
Thanks @steveloughran for fixing this 🙌
| * A stub transport which implements the minimum amount needed for range/depth | ||
| * validation within the thrift library to succeed. | ||
| */ | ||
| public final class StubTTransport extends TTransport { |
There was a problem hiding this comment.
Should we make this package private?
| /** | ||
| * There's no limits on recursion depth. | ||
| */ | ||
| private final TConfiguration conf = new TConfiguration( |
Rationale for this change
There's a new Thrift release out.
Changes include a fix for the CVE GHSA-526f-jxpj-jmg2
This is server side and only affect thrift javascript code. While parquet is unaffected, security scanner tools aren't necessarily going to be that nuanced.
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?
No
Closes #3572