Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Jul 29, 2021

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 <sundbcn@gmail.com>
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 <sundbcn@gmail.com>
@oranagra oranagra added this to To Do in 6.2 Backport via automation Oct 3, 2021
@oranagra oranagra moved this from To Do to In progress in 6.2 Backport Oct 3, 2021
oranagra added a commit to oranagra/redis that referenced this pull request Oct 4, 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 <sundbcn@gmail.com>
(cherry picked from commit 0c90370)
oranagra pushed a commit to oranagra/redis that referenced this pull request Oct 4, 2021
…s#9285)

this means the assertion that checks that when deep sanitization is enabled,
there are no crashes, was missing.

(cherry picked from commit 3db0f1a)
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 <sundbcn@gmail.com>
(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)
@oranagra oranagra moved this from In progress to Done in 6.2 Backport Oct 4, 2021
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.

None yet

2 participants