Skip to content

MOD-17228 Pin t-digest-c to latest master - #1049

Merged
gabsow merged 1 commit into
masterfrom
codex/mod-17228-pin-tdigest-public
Aug 5, 2026
Merged

gabsow merged 1 commit into
masterfrom
codex/mod-17228-pin-tdigest-public

Conversation

@gabsow

@gabsow gabsow commented Aug 2, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Advance deps/t-digest-c from 5b89d70 to daf1f4a.
  • Bring in the MOD-17228 fix that bounds t-digest compression sorting to O(n log n), including duplicate-heavy and adversarial inputs.
  • Include the upstream capacity/cleanup hardening, CI coverage, and the total_weight=1 correctness fix already merged in RedisBloom/t-digest-c.

Security scope

VDP-5320 is assessed as Medium severity (availability impact). This pin does not modify RedisBloom's RDB/RESTORE loader or introduce a separate High-severity fix; that hardening is maintained independently in RedisBloom.

Validation

  • make unit_tests in deps/t-digest-c
  • 3/3 tests passed: td_test, td_sort_complexity_test, and td_capacity_test

Note

Medium Risk
Updates core quantile/digest logic used at build time; the sorting bound fixes availability under adversarial input but any digest behavior change can affect percentile accuracy or performance in production workloads.

Overview
Advances the deps/t-digest-c git submodule from 5b89d70 to daf1f4a, pulling in upstream fixes without changing RedisBloom application code in this PR.

The main driver is MOD-17228: t-digest compression/sorting is bounded to O(n log n), including duplicate-heavy and adversarial inputs—addressing VDP-5320 (Medium availability risk from pathological CPU use). The pin also includes upstream capacity/cleanup hardening, CI coverage, and a total_weight=1 correctness fix from RedisBloom/t-digest-c.

RedisBloom’s RDB/RESTORE loader hardening is called out as unchanged and maintained separately from this dependency bump.

Reviewed by Cursor Bugbot for commit 77e29cb. Bugbot is set up for automated code reviews on this repo. Configure here.

@gabsow
gabsow force-pushed the codex/mod-17228-pin-tdigest-public branch from a208dac to 77e29cb Compare August 3, 2026 08:58
@gabsow
gabsow marked this pull request as ready for review August 3, 2026 09:00
@gabsow
gabsow requested a review from AvivDavid23 August 3, 2026 09:00
@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@gabsow
gabsow merged commit a39ef31 into master Aug 5, 2026
58 of 60 checks passed
@gabsow
gabsow deleted the codex/mod-17228-pin-tdigest-public branch August 5, 2026 07:03
AvivDavid23 added a commit that referenced this pull request Aug 17, 2026
* MOD-15410 TOPK - OOB access after restore validation cleanup (#172)

* MOD-15410 TOPK - OOB access after restore validation cleanup

* format

* more gaurds for memory

(cherry picked from commit 5d17079)
(cherry picked from commit 7883695)

* MOD-15408 more guards against CMS rdb load malicious payloads(after lili fixes) (#171)

* more guards against CMS rdb load malicious payloads

* topk->heap error gaurd

* .

* Revert "topk->heap error gaurd"

This reverts commit 27454d26f492e0e4f4f68addc4cf44cadc3902b6.

(cherry picked from commit 492d15b)
(cherry picked from commit b82f8c5a48617bb2c7ee3d52502ff3bb91ea48ed)

* MOD-17228 Pin t-digest-c to latest master

Cherry-pick of the master pin (#1049) onto 8.10.
Moves deps/t-digest-c 5b89d70 -> daf1f4a, which brings in:

  50edef3 MOD-13821 Fix compression with total_weight=1 (#39)
  91b46bf Guard TDigest capacity calculation before integer narrowing (#41)
  21bfb00 ci: add GitHub Actions build/test + ASan/UBSan (#43)
  fddc36e test: extend td_init coverage + guard td_free(NULL) (#44)
  daf1f4a MOD-17228 Fix O(n^2) t-digest compress on duplicate input (#45)

* MOD-17621 MOD-17622 Bump version to 8.10.1

* Harden RedisBloom RDB loading against crafted payloads (#134)

* Fix TDigest RDB load node count overflow check

Avoid signed overflow when validating merged and unmerged node counts by widening the addition.

* Validate TDigest RDB node counts before narrowing

Load merged and unmerged node counts into int64_t locals, validate their combined capacity with an overflow-free subtraction check, and narrow only after validation. Add RESTORE regressions for both fields using values above the int range.

* Explicitly bound TDigest RDB node counts to int range

* Update t-digest-c with TDigest capacity guard

* Avoid null TDigest cleanup on RDB load failure

* Validate TopK RDB item buffers before use

* Validate TDigest RDB numeric state before conversion

* Validate Bloom RDB numeric state before narrowing

* Fix TDigest corrupt-RDB test SINT parsing

* Remove redundant TDigest RDB weight overflow check

* Validate TDigest centroid weight totals on RDB load

* Handle signed integers in corrupt RDB test helpers

* Update t-digest-c 64-bit capacity guard

Advance the t-digest-c dependency to include explicit uint64_t capacity derivation and allocation-bound validation from RedisBloom/t-digest-c#41. This addresses review feedback without changing the existing published commits.

(cherry picked from commit 9f42a26a57d88fd9331d1b577763654f5d894eb4)
(cherry picked from commit b1e82c7)

* MOD-17621 MOD-17622 fixes

* Revert "MOD-17621 MOD-17622 fixes"

This reverts commit d1c8a40.

* Revert "Harden RedisBloom RDB loading against crafted payloads (#134)"

This reverts commit fe3c85a.

---------

Co-authored-by: Tom Gabsow <[email protected]>
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