Skip to content

MOD-16514 - add another fix to bloom - #1030

Merged
TalBarYakar merged 1 commit into
masterfrom
tal.ba/fix/bootstrap
Jul 5, 2026
Merged

TalBarYakar merged 1 commit into
masterfrom
tal.ba/fix/bootstrap

Conversation

@TalBarYakar

@TalBarYakar TalBarYakar commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Note

Medium Risk
Changes shared-host bootstrap behavior (cmake skip/reinstall, global Debian compiler alternatives, bullseye gcc pinning) and apt install env handling; wrong alternatives logic could affect builds on Debian 11 or multi-module CI hosts.

Overview
Hardens .install bootstrap so repeated runs and multiple module checkouts on the same machine don’t fight each other or hang CI/images.

install_cmake.sh now no-ops when cmake on PATH is already ≥ 3.25.1, avoiding redundant installs that could overwrite /usr/local. Linux installs download the Kitware installer into a temp directory and remove it after install instead of leaving the script in the cwd.

apt_install passes DEBIAN_FRONTEND=noninteractive through sudo env, so debconf (e.g. tzdata on focal) can’t block on an interactive prompt when sudo strips exported env vars.

Compiler alternatives: debian_default_install no longer pins cc/gcc/g++ to the highest installed GCC on the host—a behavior that depended on what other checkouts had installed. os/bullseye.sh alone restores a fixed gcc-10 default to undo bullseye’s clang hijacking of cc without affecting other Debian variants.

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

@TalBarYakar
TalBarYakar force-pushed the tal.ba/fix/bootstrap branch from de5e807 to 8114cd7 Compare July 4, 2026 20:48
@TalBarYakar TalBarYakar changed the title Tal.ba/fix/bootstrap MOD-16514 - add another fix to bloom Jul 4, 2026
@TalBarYakar
TalBarYakar marked this pull request as ready for review July 4, 2026 20:48
@TalBarYakar
TalBarYakar requested a review from gabsow July 4, 2026 20:49
@sonarqubecloud

sonarqubecloud Bot commented Jul 4, 2026

Copy link
Copy Markdown

@TalBarYakar
TalBarYakar merged commit ab734fa into master Jul 5, 2026
59 checks passed
@TalBarYakar
TalBarYakar deleted the tal.ba/fix/bootstrap branch July 5, 2026 09:15
TalBarYakar added a commit that referenced this pull request Jul 5, 2026
* MOD-16514 - fix the bootstrap and build (#1028)

* 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

* try another methood (#1030)

* bump version 8.9.81
TalBarYakar added a commit that referenced this pull request Jul 27, 2026
* MOD-16514 - fix the bootstrap and build (#1028)

* 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

* try another methood (#1030)

* bump version 8.9.81
TalBarYakar added a commit that referenced this pull request Jul 27, 2026
TalBarYakar added a commit that referenced this pull request Jul 27, 2026
* MOD-16514 - fix the bootstrap and build (#1028)

* 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

* try another methood (#1030)

* MOD-16871: replicate in `cfInsertCommon` after `cfCreate` in case of errors (#1034)

* MOD-16871: relicate in  after

* .

* MOD-16306 - pull docker images from registry (#1036)

* MOD-16306 - pull docker images from registry

* cherry pick changes to bloom

* MOD-13409 Harden RDB loading (#1038)

* 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.

* MOD-16952 - enhance bootstrap (add list and dry-run arg) (#1037)

* 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.

* bump version to 8.10.0

---------

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