Skip to content

add CuckooInsert_MemAllocFailed - #134

Merged
ashtul merged 3 commits into
masterfrom
Cuckoo-insert-flags
Nov 18, 2019
Merged

ashtul merged 3 commits into
masterfrom
Cuckoo-insert-flags

Conversation

@ashtul

@ashtul ashtul commented Oct 23, 2019

Copy link
Copy Markdown
Contributor

No description provided.

@ashtul
ashtul requested a review from mnunberg October 23, 2019 14:53
@codecov

codecov Bot commented Oct 23, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #134 into master will increase coverage by 0.03%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   88.06%   88.09%   +0.03%     
==========================================
  Files          15       15              
  Lines        2086     2084       -2     
==========================================
- Hits         1837     1836       -1     
+ Misses        249      248       -1

Comment thread src/rebloom.c Outdated
RedisModule_ReplyWithLongLong(ctx, -1);
}
} else {
} else if (insStatus == CuckooInsert_MemAllocFailed){ // LCOV_EXCL_LINE

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.

This series of if-statements over insStatus really belongs in a switch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@rafie As requested

@ashtul
ashtul requested a review from rafie November 15, 2019 12:26
@ashtul
ashtul merged commit 0749113 into master Nov 18, 2019
@ashtul
ashtul deleted the Cuckoo-insert-flags branch November 18, 2019 09:10
AvivDavid23 added a commit that referenced this pull request Aug 17, 2026
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]>
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)

* MOD-17621 MOD-17622 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)

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

* MOD-17621 MOD-17622 fixes (#247)

---------

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