Skip to content

cherry pick master to 8.10 - #1048

Merged
TalBarYakar merged 7 commits into
8.10from
tal.ba/cp/master_to_8_10
Jul 27, 2026
Merged

TalBarYakar merged 7 commits into
8.10from
tal.ba/cp/master_to_8_10

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary
Bumps the pinned MODULE_VERSION for RedisBloom from v8.9.90 to v8.10.0. RedisTimeSeries and RedisJSON are unchanged.

Module | From | To -- | -- | -- RedisBloom | v8.9.90 | v8.10.0

Note: this RedisBloom range contains 4 relevant commits. The main fixes are Cuckoo-filter replication correctness, GHCR-based CI Docker image reuse, RDB/RESTORE hardening, and bootstrap list / dry-run support.

Module Changes
RedisBloom range

  • MOD-16871 — replicate CF.ADD / CF.INSERT autocreated keys before early error returns, preventing master/replica key-existence divergence (#1034)
  • MOD-16306 — pull prebuilt RedisBloom CI Docker images from GHCR and fall back to local builds only when needed (#1036)
  • MOD-13409 — harden BF, CF, and TDigest RDB loading against crafted RESTORE payloads that could cause metadata/buffer desync and OOB access (#1038)
  • MOD-16952 — enhance bootstrap with make bootstrap list and make bootstrap dry-run, plus fixes for root containers without sudo (#1037)

0 commits excluded
All 4 listed commits are part of the requested RedisBloom update set.

Test Plan

  • CI passes for RedisBloom at the new pinned version
  • make all builds RedisBloom cleanly against unstable
  • Module tests run under make test
Summary Bumps the pinned MODULE_VERSION for RedisBloom from v8.9.90 to v8.10.0. RedisTimeSeries and RedisJSON are unchanged. Module From To RedisBloom v8.9.90 v8.10.0

Note: this RedisBloom range contains 4 relevant commits. The main fixes are Cuckoo-filter replication correctness, GHCR-based CI Docker image reuse, RDB/RESTORE hardening, and bootstrap list / dry-run support.
Module Changes
RedisBloom range
MOD-16871 — replicate CF.ADD / CF.INSERT autocreated keys before early error returns, preventing master/replica key-existence divergence (#1034)
MOD-16306 — pull prebuilt RedisBloom CI Docker images from GHCR and fall back to local builds only when needed (#1036)
MOD-13409 — harden BF, CF, and TDigest RDB loading against crafted RESTORE payloads that could cause metadata/buffer desync and OOB access (#1038)
MOD-16952 — enhance bootstrap with make bootstrap list and make bootstrap dry-run, plus fixes for root containers without sudo (#1037)
0 commits excluded
All 4 listed commits are part of the requested RedisBloom update set.
Test Plan
CI passes for RedisBloom at the new pinned version
make all builds RedisBloom cleanly against unstable
Module tests run under make test


Note

Medium Risk
Touches replication semantics, RESTORE/RDB security boundaries, and CI image supply chain; changes are targeted with new tests but affect production module behavior on replicas and malicious payloads.

Overview
RedisBloom v8.9.91 → v8.10.0 (src/version.h).

CI adds a Push Docker Images workflow that publishes per-OS/arch images to GHCR (scheduled, on pack/ramp.yml Redis version changes, merged PRs). Linux and random-traffic jobs pull prebuilt images tagged from .install/get-redis-ref.sh and fall back to local docker build when pull fails or the PR has the docker-image-changes label. Workflows gain packages: read for GHCR pulls.

Bootstrap gains make bootstrap list and make bootstrap dry-run via CHECK_DEPS / DRY_RUN in .install (non-mutating dep checks, copy-paste install plans, optional vs required deps, idempotent OS scripts, root-without-sudo shim, apt retry tuning).

Cuckoo filter replication: cfInsertCommon now calls RedisModule_ReplicateVerbatim when autocreate succeeds but later paths return early (expansion limit, full filter, OOM), so replicas stay consistent with the master.

Tests add master/replica coverage for that CF path and a P88W-style crafted RESTORE regression for TDigest (plus related RDB corruption helpers).

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

@TalBarYakar TalBarYakar self-assigned this Jul 27, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cdbd570. Configure here.

raise RuntimeError(f"Unknown module opcode {opcode} at pos={pos}")

if not patched:
raise RuntimeError("Did not find target SINT to patch")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Test parser crashes on SINT opcode in TDigest dump

Medium Severity

_corrupt_dump_set_first_uint_after_3_doubles doesn't handle RDB_MODULE_OPCODE_SINT (opcode 1). TDigestRdbSave writes cap via RedisModule_SaveSigned which uses SINT opcode (1), but this parser only handles EOF (0), UINT (2), DOUBLE (4), and STRING (5). When it encounters opcode 1, the fallthrough raise RuntimeError fires, crashing test_restore_rejects_corrupted_tdigest_cap before any corrupted payload reaches Redis. Separately, _build_p88w_first_restore_payload uses _module_uint (opcode 2) for fields loaded by LoadSigned_IOError (expects opcode 1), so the payload is rejected for opcode mismatch rather than the cap validation being tested.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit cdbd570. Configure here.

@gabsow

gabsow commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

I checked this against the current master and 8.10 refs.

Verdict: content-wise, all current master features and bug fixes are present, but this is not a clean "merge master into 8.10" PR and it is not safely mergeable as submitted.

  • Current master (5088e68) is an ancestor of the PR head (cdbd570).
  • The only two commits after master change release metadata: the module version to 8.10.0 and compatible_redis_version to 8.10.
  • Current 8.10 (11f521a) is not an ancestor of the PR branch. The branches diverged, and GitHub reports the PR as conflicting/dirty.
  • The merge conflicts are in:
    • .install/lib/packages.sh
    • .install/lib/pm.sh
    • .install/os/amazonlinux2.sh
    • .install/os/bionic.sh
    • .install/os/bullseye.sh
    • .install/os/focal.sh
    • src/version.h
    • tests/flow/test_bf_restore_corrupt_rdb.py

A simulated merge resolving the overlapping hunks in favor of the PR/master content produced a tree identical to the current PR tip, so no current master functionality appears to be missing.

I recommend rebuilding the source branch from 8.10, merging master into it, resolving the conflicts, and retaining the intended 8.10.0 release metadata. This will make both the content and history accurately represent "merge master into 8.10."

Separately, the existing Bugbot finding appears valid: the TDigest corruption-test parser handles the UINT opcode, while TDigestRdbSave writes those fields using RedisModule_SaveSigned/SINT. That test should be corrected before release, although the problem is inherited from master rather than introduced by this synchronization PR.

@TalBarYakar
TalBarYakar force-pushed the tal.ba/cp/master_to_8_10 branch from cdbd570 to 87bacd1 Compare July 27, 2026 15:41
@gabsow

gabsow commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Rechecked after the force-push.

The commit history was rewritten, but the resulting tree is identical to the previous PR tip. The PR still does not contain the current 8.10 branch in its ancestry, and GitHub still reports it as CONFLICTING / DIRTY.

The same eight merge conflicts remain:

  • .install/lib/packages.sh
  • .install/lib/pm.sh
  • .install/os/amazonlinux2.sh
  • .install/os/bionic.sh
  • .install/os/bullseye.sh
  • .install/os/focal.sh
  • src/version.h
  • tests/flow/test_bf_restore_corrupt_rdb.py

All current master content is still present, but I cannot approve while the PR is unmergeable. Please merge the current 8.10 branch into the source branch as a new commit, resolve these conflicts while retaining the intended master content and 8.10.0 metadata, and push the resolution for another review.

The previously noted TDigest corruption-test concern also remains in the resulting tree.

TalBarYakar and others added 7 commits July 27, 2026 19:09
* install aws if and only if it is not installed yet

* add another build fixes

* fix build for amazonlinux2

* fix(al2): add cc symlink to devtoolset-11 to fix LTO version mismatch

* alma8 +rhel8+rhel9+bionic +focal passes

* fix for bionic

* fix

* bump rltest

* fix bionic bootstrap

* fix azurelinux3

* bionic fix

* fix for bullesye

* fix focal ci

* fix the test due to bump rltest version

* fix for bionic and focal

* fix

* fix remarks
* MOD-16306 - pull docker images from registry

* cherry pick changes to bloom
* MOD-13409 Validate Bloom RDB bitset size on load (#126)

* MOD-13409 Validate Bloom RDB bitset size on load

Reject crafted module payloads where the loaded bloom bitset buffer length does not match the declared bits/n2, and add a flow regression test covering RESTORE with a corrupted DUMP payload.

* MOD-13409 clang-format rebloom.c

Run clang-format on rebloom.c to satisfy make lint formatting checks.

* MOD-13409 Validate Bloom RDB bitset length on load

Reject crafted module payloads where persisted bits do not match the loaded bitset buffer length, preventing OOB access after RESTORE.

* Mod 13409 rdb hardening (#127)

* MOD-13409 clang-format rebloom.c

Run clang-format on rebloom.c to satisfy make lint formatting checks.

* MOD-13409 Harden CF RDB load buffer validation

Replace assert-only checks in CFRdbLoad with explicit validation of loaded sizes and ranges, and add a flow test that corrupts a CF DUMP payload to ensure RESTORE is rejected.

* MOD-13409 Harden remaining RDB loaders (TDigest)

TDigest RDB loading trusted attacker-controlled cap, which could desync the allocated centroid arrays from the loaded metadata and enable OOB access after RESTORE.

Reject payloads where loaded cap differs from the allocated cap derived from compression, validate node counters, and add a flow regression that corrupts a TDigest DUMP payload and asserts RESTORE is rejected.

With the earlier BF/CF fixes, this covers all remaining module data structures that load raw buffers from RDB/RESTORE (CMS/TopK already validate buffer sizes).

* Revert "MOD-13409 clang-format rebloom.c"

This reverts commit 456e53503f51b68c4d7a9df988e50a36adf2e61a.

* MOD-13409 Add regression for published P88W exploit

* MOD-13409 Share RDB corruption test helpers

* Fix TDigest RDB load node count overflow check

Avoid signed overflow when validating merged and unmerged node counts by widening the addition.
* add bootstrap dry-run and chrck-deps

* remove dry-run

* write list to afile

* add optional deps

* add another optional deps

* add another optional deps

* add versioning managment

* rename command to list

* renme to list

* add dry run

* fix colors

* fix bloom missing deps only for dry run

* fix missing

* remove min cmake version

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* fix remarks

* add _sh so we can have the full bootstrap output

* always return to the workspace dir

* make single copy paste install all

* fix alma8

* fix bad dry-run print

* gaurd tool-set version 11

* fix curl minimal

* remove centos-release-scl for amazonlinux2

* fix macos env

* fix(bootstrap): make sudo a no-op on root containers without a sudo binary

The install scripts run privileged steps via literal `sudo` inside `_sh`
command strings (e.g. `sudo ln -sf ...`, `| sudo tee`, `&& sudo make install`).
On a slim Docker image that runs install_script.sh directly as root with no
`sudo` package installed (e.g. RedisTimeSeries' amazonlinux2 CI), those steps
fail with `sudo: command not found` (exit 127), aborting the whole bootstrap.

Add a root-only pass-through in pm.sh/deps_lib.sh: when running as root and no
real `sudo` binary exists, define `sudo()` to run its arguments directly. When
not root, a missing sudo stays a genuine error and is left unmasked.
@TalBarYakar
TalBarYakar force-pushed the tal.ba/cp/master_to_8_10 branch from 87bacd1 to 0b7034f Compare July 27, 2026 16:10
@sonarqubecloud

Copy link
Copy Markdown

@TalBarYakar
TalBarYakar merged commit f3b6639 into 8.10 Jul 27, 2026
56 checks passed
@TalBarYakar
TalBarYakar deleted the tal.ba/cp/master_to_8_10 branch July 27, 2026 17:31
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.

3 participants