Skip to content

[fix](thirdparty) Upgrade Brotli to 1.0.10 (branch-4.1) - #71039

Open
Gabriel39 wants to merge 1 commit into
apache:branch-4.1from
Gabriel39:fix/brotli-1.0.10-4.1
Open

Gabriel39 wants to merge 1 commit into
apache:branch-4.1from
Gabriel39:fix/brotli-1.0.10-4.1

Conversation

@Gabriel39

Copy link
Copy Markdown
Contributor

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

### 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: apache#69906 (original fix), apache#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
@Gabriel39
Gabriel39 requested a review from yiguolei as a code owner November 25, 2026 14:53
@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen hello-stephen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed all three changed paths at c764051. No actionable source findings. Coverage includes Brotli/Arrow metadata consistency, fresh and cached patching, build-cache invalidation, and static-library consumers. Two delegated reviews and main verification converged in one round. No builds or tests were run. The archive MD5 was not independently recomputed because archive download was unavailable.

Review converged after 1 round(s).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants