Skip to content

Fix missing check for sanitize_dump in corrupt-dump-fuzzer test#9285

Merged
oranagra merged 3 commits intoredis:unstablefrom
sundb:fix-sanitize-check
Jul 29, 2021
Merged

Fix missing check for sanitize_dump in corrupt-dump-fuzzer test#9285
oranagra merged 3 commits intoredis:unstablefrom
sundb:fix-sanitize-check

Conversation

@sundb
Copy link
Collaborator

@sundb sundb commented Jul 29, 2021

sanitize_dump will never equal 1, so the error log will not be printed in ci.
this means the assertion that checks that when deep sanitization is enabled, there are no crashes, was missing.

Copy link
Member

@oranagra oranagra left a comment

Choose a reason for hiding this comment

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

😱
i assume this bug got into that test in some late stage of my sanitation project.
so the missing assertions didn't hide any bugs.
also, i was probably looking at the verbose prints (Done $cycle cycles) after each long run,
so hopefully the fact the exit code of the tests was wrong didn't cause me to miss anything.

@oranagra oranagra changed the title Fix wrongly check for sanitize_dump in corrupt-dump-fuzzer test Fix missing check for sanitize_dump in corrupt-dump-fuzzer test Jul 29, 2021
@oranagra oranagra merged commit 3db0f1a into redis:unstable Jul 29, 2021
@sundb
Copy link
Collaborator Author

sundb commented Jul 29, 2021

@oranagra Done $cycle cycles is printed out normally, but corrupt payload is not, as I found out in my own daily ci.

@sundb sundb deleted the fix-sanitize-check branch July 29, 2021 10:05
@oranagra
Copy link
Member

yes... i was worried about the other (possibly more important) impact of that bug, which is the missing assertion (not the missing print).
i.e. one prevents us from knowing what was the exact problem, but the other prevents us from knowing there was one..

@oranagra
Copy link
Member

so i take comfort but the fact i probably looksed at the Done print when i was heavily testing this...
and also when i was heavily testing it, maybe that bug didn't yet exist..
anyway, water under the bridge, good that it's fixed now..

oranagra added a commit that referenced this pull request Aug 5, 2021
Recently we found two issues in the fuzzer tester: #9302 #9285
After fixing them, more problems surfaced and this PR (as well as #9297) aims to fix them.

Here's a list of the fixes
- Prevent an overflow when allocating a dict hashtable
- Prevent OOM when attempting to allocate a huge string
- Prevent a few invalid accesses in listpack
- Improve sanitization of listpack first entry
- Validate integrity of stream consumer groups PEL
- Validate integrity of stream listpack entry IDs
- Validate ziplist tail followed by extra data which start with 0xff

Co-authored-by: sundb <[email protected]>
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Sep 8, 2021
…s#9285)

this means the assertion that checks that when deep sanitization is enabled,
there are no crashes, was missing.
JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Sep 8, 2021
Recently we found two issues in the fuzzer tester: redis#9302 redis#9285
After fixing them, more problems surfaced and this PR (as well as redis#9297) aims to fix them.

Here's a list of the fixes
- Prevent an overflow when allocating a dict hashtable
- Prevent OOM when attempting to allocate a huge string
- Prevent a few invalid accesses in listpack
- Improve sanitization of listpack first entry
- Validate integrity of stream consumer groups PEL
- Validate integrity of stream listpack entry IDs
- Validate ziplist tail followed by extra data which start with 0xff

Co-authored-by: sundb <[email protected]>
oranagra added a commit that referenced this pull request Oct 4, 2021
Recently we found two issues in the fuzzer tester: #9302 #9285
After fixing them, more problems surfaced and this PR (as well as #9297) aims to fix them.

Here's a list of the fixes
- Prevent an overflow when allocating a dict hashtable
- Prevent OOM when attempting to allocate a huge string
- Prevent a few invalid accesses in listpack
- Improve sanitization of listpack first entry
- Validate integrity of stream consumer groups PEL
- Validate integrity of stream listpack entry IDs
- Validate ziplist tail followed by extra data which start with 0xff

Co-authored-by: sundb <[email protected]>
(cherry picked from commit 0c90370)
oranagra pushed a commit that referenced this pull request Oct 4, 2021
this means the assertion that checks that when deep sanitization is enabled,
there are no crashes, was missing.

(cherry picked from commit 3db0f1a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants