This is an automated email from the ASF dual-hosted git repository.

Gabriel39 pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new e3ea69db467 [fix](thirdparty) Upgrade Brotli to 1.0.10 (branch-4.1) 
(#71039)
e3ea69db467 is described below

commit e3ea69db467575556e50886b09046d950cbc68d9
Author: Gabriel <[email protected]>
AuthorDate: Fri Nov 27 09:32:37 2026 +0800

    [fix](thirdparty) Upgrade Brotli to 1.0.10 (branch-4.1) (#71039)
    
    ### Background
    
    Doris statically links its third-party Brotli decoder through Arrow.
    Arrow verifies its Brotli archive against a separate version and SHA256
    pin, so an operating-system package update does not replace the linked
    decoder.
    
    ### What problem does this PR solve?
    
    Issue Number: None
    Related PR: #69906 (original fix), #69937 (same fix on branch-4.2)
    PR Type: Bugfix
    
    Problem Summary:
    
    Branch-4.1 still pins Brotli 1.0.9. Upgrade to 1.0.10, including the
    upstream fix for CVE-2026-111497, and synchronize Arrow 24's archive
    metadata. An independent patch marker also updates sources that already
    carry the other Arrow patches.
    
    ### Details
    
    - **Frequency:** Not observed end to end in Doris; found by dependency
    audit of the 1.0.9 source pin.
    - **Root cause:** Brotli remains at the vulnerable version, while Arrow
    independently expects its old archive digest; changing only the download
    URL would fail source verification.
    - **Why existing tests missed it:** Existing codec/Parquet tests do not
    establish the dependency version or test the upstream decoder's
    initialized block-switch guard boundaries.
    - **Fix:** Backport the three upstream pieces: 1.0.10 archive/MD5, Arrow
    24 version/SHA256 patch, and its independent cached-source marker.
    English comments explain the static-link and cache invariants.
    - **Other paths and branches:** Master and branch-4.2 already contain
    the upstream fix. This PR targets branch-4.1, without changing APIs,
    data formats or runtime configuration.
    
    ### Testing
    
    - Fresh official archive digests, pristine/cached Arrow patching and
    repeated downloader invocation passed.
    - ASan+UBSan Brotli 1.0.10 build: 14 available upstream
    roundtrip/compatibility tests passed.
    - Initialized block-switch guard probe: 12 expectations fail on 1.0.9
    and 12 pass on 1.0.10; this is not an end-to-end exploit reproduction.
    - Arrow's actual build_brotli macro rejects the old pin and
    builds/installs with the corrected pin. A consumer links all three
    imported static targets and passes a public-API roundtrip.
    - Existing download-fallback test, shell syntax and whitespace checks
    passed locally.
    
    ### Notes for Reviewers
    
    Rebuild third-party dependencies and relink BE before validating a
    delivered image. Full Arrow/Doris BE builds and image rescanning were
    not run locally.
    
    ### Release note
    
    Upgrade statically linked Brotli to 1.0.10 with the upstream security
    fix and consistent Arrow source verification.
    
    ### Check List (For Author)
    
    - Behavior changed: No
    - Does this need documentation: No
    - Pre-submission status: Partially verified: full BE relink and
    delivered-image rescan were not run locally
    
    ### AI Disclosure
    
    - Tool: Codex (GPT-6)
    - Generated: Upstream backport, explanatory comments, verification and
    this description
    - Human review: not stated
---
 thirdparty/download-thirdparty.sh                          |  6 ++++++
 thirdparty/patches/apache-arrow-24.0.0-brotli-1.0.10.patch | 13 +++++++++++++
 thirdparty/vars.sh                                         | 10 ++++++----
 3 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/thirdparty/download-thirdparty.sh 
b/thirdparty/download-thirdparty.sh
index 431d5a5d013..dd23680ef32 100755
--- a/thirdparty/download-thirdparty.sh
+++ b/thirdparty/download-thirdparty.sh
@@ -458,6 +458,12 @@ if [[ " ${TP_ARCHIVES[*]} " =~ " ARROW " ]]; then
             patch -p1 <"${TP_PATCH_DIR}/apache-arrow-24.0.0-lzo.patch"
             touch "${PATCHED_MARK}"
         fi
+        # Arrow also verifies the overridden Brotli archive against its own 
SHA256.
+        # A separate marker updates sources that already have the other Arrow 
patches.
+        if [[ ! -f "${PATCHED_MARK}_brotli_1_0_10" ]]; then
+            patch -p1 
<"${TP_PATCH_DIR}/apache-arrow-24.0.0-brotli-1.0.10.patch"
+            touch "${PATCHED_MARK}_brotli_1_0_10"
+        fi
         cd -
     fi
     echo "Finished patching ${ARROW_SOURCE}"
diff --git a/thirdparty/patches/apache-arrow-24.0.0-brotli-1.0.10.patch 
b/thirdparty/patches/apache-arrow-24.0.0-brotli-1.0.10.patch
new file mode 100644
index 00000000000..ca7b7c82ae0
--- /dev/null
+++ b/thirdparty/patches/apache-arrow-24.0.0-brotli-1.0.10.patch
@@ -0,0 +1,13 @@
+--- a/cpp/thirdparty/versions.txt
++++ b/cpp/thirdparty/versions.txt
+@@ -58,8 +58,8 @@
+ 
ARROW_AZURE_SDK_BUILD_SHA256_CHECKSUM=97065bfc971ac8df450853ce805f820f52b59457bd7556510186a1569502e4a1
+ ARROW_BOOST_BUILD_VERSION=1.88.0
+ 
ARROW_BOOST_BUILD_SHA256_CHECKSUM=dcea50f40ba1ecfc448fdf886c0165cf3e525fef2c9e3e080b9804e8117b9694
+-ARROW_BROTLI_BUILD_VERSION=v1.0.9
+-ARROW_BROTLI_BUILD_SHA256_CHECKSUM=f9e8d81d0405ba66d181529af42a3354f838c939095ff99930da6aa9cdf6fe46
++ARROW_BROTLI_BUILD_VERSION=v1.0.10
++ARROW_BROTLI_BUILD_SHA256_CHECKSUM=b517ebdb5266b963d28d6e639b973479874ec72086deb6ee4a2d639e1b13606b
+ ARROW_BZIP2_BUILD_VERSION=1.0.8
+ 
ARROW_BZIP2_BUILD_SHA256_CHECKSUM=ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269
+ ARROW_CARES_BUILD_VERSION=1.17.2
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 377a30b9b7b..51b4d7d0564 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -235,10 +235,12 @@ ZSTD_SOURCE=zstd-1.5.7
 ZSTD_MD5SUM="780fc1896922b1bc52a4e90980cdda48"
 
 # brotli
-BROTLI_DOWNLOAD="https://github.com/google/brotli/archive/v1.0.9.tar.gz";
-BROTLI_NAME="brotli-1.0.9.tar.gz"
-BROTLI_SOURCE="brotli-1.0.9"
-BROTLI_MD5SUM="c2274f0c7af8470ad514637c35bcee7d"
+# Arrow builds and BE statically links this decoder, so a system library update
+# cannot replace the vulnerable code fixed in 1.0.10 (CVE-2026-111497).
+BROTLI_DOWNLOAD="https://github.com/google/brotli/archive/v1.0.10.tar.gz";
+BROTLI_NAME="brotli-1.0.10.tar.gz"
+BROTLI_SOURCE="brotli-1.0.10"
+BROTLI_MD5SUM="830ce41562b2ec8cbdfe3f70111db0fa"
 
 # flatbuffers
 
FLATBUFFERS_DOWNLOAD="https://github.com/google/flatbuffers/archive/v23.5.26.tar.gz";


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to