Skip to content

Commit 1d1999a

Browse files
GH-51354: [C++][Parquet] Update bundled Apache Thrift to 0.24.0
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 <[email protected]>
1 parent e85e181 commit 1d1999a

3 files changed

Lines changed: 2 additions & 185 deletions

File tree

‎cpp/cmake_modules/ThirdpartyToolchain.cmake‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,29 +1816,8 @@ function(build_thrift)
18161816
if(CMAKE_VERSION VERSION_LESS 3.26)
18171817
message(FATAL_ERROR "Require CMake 3.26 or later for building bundled Apache Thrift")
18181818
endif()
1819-
set(THRIFT_PATCH_COMMAND)
1820-
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
1821-
find_program(PATCH patch)
1822-
if(PATCH)
1823-
list(APPEND
1824-
THRIFT_PATCH_COMMAND
1825-
${PATCH}
1826-
-p1
1827-
-i)
1828-
else()
1829-
find_program(GIT git)
1830-
if(GIT)
1831-
list(APPEND THRIFT_PATCH_COMMAND ${GIT} apply)
1832-
endif()
1833-
endif()
1834-
if(THRIFT_PATCH_COMMAND)
1835-
# https://github.com/apache/thrift/pull/3187
1836-
list(APPEND THRIFT_PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/thrift-3187.patch)
1837-
endif()
1838-
endif()
18391819
fetchcontent_declare(thrift
18401820
${FC_DECLARE_COMMON_OPTIONS}
1841-
PATCH_COMMAND ${THRIFT_PATCH_COMMAND}
18421821
URL ${THRIFT_SOURCE_URL}
18431822
URL_HASH "SHA256=${ARROW_THRIFT_BUILD_SHA256_CHECKSUM}")
18441823

‎cpp/cmake_modules/thrift-3187.patch‎

Lines changed: 0 additions & 162 deletions
This file was deleted.

‎cpp/thirdparty/versions.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ ARROW_SUBSTRAIT_BUILD_VERSION=v0.44.0
110110
ARROW_SUBSTRAIT_BUILD_SHA256_CHECKSUM=f989a862f694e7dbb695925ddb7c4ce06aa6c51aca945105c075139aed7e55a2
111111
ARROW_S2N_TLS_BUILD_VERSION=v1.7.0
112112
ARROW_S2N_TLS_BUILD_SHA256_CHECKSUM=a6e8228e238239bb3c17b1eda3ed702bcbb2eaebc792eac4d754cc5619b0ea06
113-
ARROW_THRIFT_BUILD_VERSION=0.22.0
114-
ARROW_THRIFT_BUILD_SHA256_CHECKSUM=794a0e455787960d9f27ab92c38e34da27e8deeda7a5db0e59dc64a00df8a1e5
113+
ARROW_THRIFT_BUILD_VERSION=0.24.0
114+
ARROW_THRIFT_BUILD_SHA256_CHECKSUM=e0fa5839a4c5c1d631b0931cf2c554ebbfa4e2fee3a9fb3ffd4f82ce4396c6e4
115115
ARROW_URIPARSER_BUILD_VERSION=1.0.2
116116
ARROW_URIPARSER_BUILD_SHA256_CHECKSUM=dd2e4843f43de6f5aedf430e530f1e2d159eba8ca4d64c2787af1c20f707a9e4
117117
ARROW_UTF8PROC_BUILD_VERSION=v2.10.0

0 commit comments

Comments
 (0)