Skip to content

librocksdb_sys: update zstd-sys for security fixes - #865

Closed
hbisheng wants to merge 1 commit into
tikv:masterfrom
hbisheng:bh-update-zstd-sys-security
Closed

hbisheng wants to merge 1 commit into
tikv:masterfrom
hbisheng:bh-update-zstd-sys-security

Conversation

@hbisheng

@hbisheng hbisheng commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

The current zstd-sys <=2.0.13 constraints prevent resolving the patched zstd-safe 8.2.0 / zstd 0.14.3 dependency chain and retain RUSTSEC-2026-0410.

Pin both RocksDB and Titan to zstd-sys =2.1.2, the minimum patched release, so they continue to share one C library. This changes bundled libzstd from 1.5.6 to 1.5.7; the RocksDB and Titan source revisions stay unchanged. The exact pin keeps the existing bounded-upgrade policy without selecting future releases.

Issue Number: ref tikv/tikv#20333

Validation:

  • The external ZSTD/ZDICT functions used by RocksDB remain available in the new headers.
  • cargo test --tests --no-default-features passed on macOS arm64 (48 unit tests and 136 integration tests).
  • Cross-version frame checks passed: 72 round trips between libzstd 1.5.6 and 1.5.7 (both directions; levels 1, 3, 9; 0 B to 1 MiB; random and repeated data).
  • TiKV dependency resolution and cargo-deny 0.18.9 check --show-stats pass with the proposed dependency chain (0 advisory errors).
  • Linux validation and TiKV workload performance measurements remain pending. The C-library upgrade can affect compression CPU, memory and compressed sizes; passing security checks does not establish absence of performance regressions.

The upper bound was introduced in #826; its PR discussion does not document the reason. This stays draft while native compatibility validation is incomplete.

Pin RocksDB and Titan to zstd-sys 2.1.2, the minimum release fixing RUSTSEC-2026-0410 and supporting the patched zstd-safe 8.2.0 dependency chain. Both engines continue to share one libzstd build.

Signed-off-by: Bisheng Huang <hbisheng@gmail.com>
@ti-chi-bot

ti-chi-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@ti-chi-bot ti-chi-bot Bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. dco-signoff: yes Indicates the PR's author has signed the dco. labels Oct 27, 2026
@ti-chi-bot

ti-chi-bot Bot commented Oct 27, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign busyjay for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ti-chi-bot ti-chi-bot Bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 27, 2026
@hbisheng

Copy link
Copy Markdown
Member Author

duplicated

@hbisheng hbisheng closed this Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant