Skip to content

GH-51354: [C++][Parquet] Update bundled Apache Thrift to 0.24.0 - #51559

Open
Hanayoshi-8744 wants to merge 1 commit into
apache:mainfrom
Hanayoshi-8744:GH-51354-update-thrift
Open

Hanayoshi-8744 wants to merge 1 commit into
apache:mainfrom
Hanayoshi-8744:GH-51354-update-thrift

Conversation

@Hanayoshi-8744

Copy link
Copy Markdown

Rationale for this change

The bundled Apache Thrift dependency (0.22.0) is affected by
CVE-2026-55969, an integer overflow vulnerability in
TTransport::checkReadBytesAvailable() that could bypass message
size checks when reading maliciously crafted Thrift-encoded data.
Arrow's Parquet module relies on Thrift's compact protocol to
deserialize Parquet file metadata, so this is relevant to Arrow.

What changes are included in this PR?

  • Bump the bundled Apache Thrift version from 0.22.0 to 0.24.0 in
    cpp/thirdparty/versions.txt (including the SHA256 checksum).
  • Remove the Clang-only thrift-3187.patch and its application logic
    in ThirdpartyToolchain.cmake. This patch pre-applied Thrift's
    upstream fix for THRIFT-3268 (a compiler warning), which has since
    been merged into Thrift itself and is already included in 0.24.0.
    Keeping the patch would make git apply/patch fail during the
    bundled build with Clang.

Are these changes tested?

  • Verified that thrift-0.24.0.tar.gz downloads correctly and its
    SHA256 checksum matches the value published at
    downloads.apache.org.
  • Confirmed the CVE fix is present in Thrift 0.24.0 by diffing
    TProtocol.h, TCompactProtocol.h, TBinaryProtocol.h, and
    TTransport.h against 0.22.0.
  • Confirmed thrift-3187.patch no longer applies cleanly against
    0.24.0 sources (already fixed upstream), which is why it was
    removed rather than kept as a no-op.
  • Built Arrow C++ locally with -DARROW_PARQUET=ON -DARROW_BUILD_TESTS=ON -DThrift_SOURCE=BUNDLED and ran
    parquet-internals-test, parquet-file-deserialize-test,
    parquet-schema-test, parquet-reader-test, and
    parquet-writer-test. All tests passed.

Are there any user-facing changes?

No.


Disclosure: this change was prepared with the assistance of an AI
coding tool (Claude Code). I reviewed the diff, verified the CVE fix
and checksum myself, and ran the test suite locally before opening
this PR.

🤖 Generated with Claude Code

Update the bundled Apache Thrift dependency from 0.22.0 to 0.24.0 to
address CVE-2026-55969, an integer overflow vulnerability in
TTransport::checkReadBytesAvailable() that could bypass message size
checks when reading maliciously crafted Thrift-encoded data (e.g. via
Parquet file metadata parsed with the compact protocol).

The Clang-only patch (thrift-3187.patch) that suppressed a
gnu-zero-variadic-macro-arguments warning is removed, since the
underlying fix (THRIFT-3268) has been merged upstream and is already
included in Thrift 0.24.0; keeping the patch would cause `git apply`/
`patch` to fail and break the build.

Verified:
- Downloaded thrift-0.24.0.tar.gz and confirmed its SHA256 matches the
  official checksum published at downloads.apache.org.
- Confirmed the CVE fix is present in Thrift 0.24.0 by diffing
  TProtocol.h/TCompactProtocol.h/TBinaryProtocol.h/TTransport.h against
  0.22.0.
- Confirmed thrift-3187.patch no longer applies cleanly against
  0.24.0 (already fixed upstream).
- Built Arrow C++ with -DARROW_PARQUET=ON -DARROW_BUILD_TESTS=ON
  -DThrift_SOURCE=BUNDLED and ran parquet-internals-test,
  parquet-file-deserialize-test, parquet-schema-test,
  parquet-reader-test, and parquet-writer-test; all passed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #51354 has been automatically assigned in GitHub to PR creator.

@Hanayoshi-8744

Copy link
Copy Markdown
Author

Hi @wgtmac, this is my first contribution to Arrow. No rush at all, but I noticed the CI workflows for this PR seem to be stuck in "action_required" (likely pending approval for a first-time contributor). Could someone take a look when you have a chance? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant