Skip to content

Improvements to corrupt payload sanitization#9321

Merged
oranagra merged 10 commits intoredis:unstablefrom
oranagra:sanitization_issues
Aug 5, 2021
Merged

Improvements to corrupt payload sanitization#9321
oranagra merged 10 commits intoredis:unstablefrom
oranagra:sanitization_issues

Conversation

@oranagra
Copy link
Member

@oranagra oranagra commented 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

joint effort with @sundb

yossigo
yossigo previously approved these changes Aug 5, 2021
Copy link
Collaborator

@yossigo yossigo left a comment

Choose a reason for hiding this comment

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

LGTM, one typo.

Co-authored-by: Yossi Gottlieb <[email protected]>
yossigo
yossigo previously approved these changes Aug 5, 2021
@oranagra oranagra added the release-notes indication that this issue needs to be mentioned in the release notes label Aug 5, 2021
@oranagra oranagra merged commit 0c90370 into redis:unstable Aug 5, 2021
@oranagra oranagra deleted the sanitization_issues branch August 5, 2021 19:56
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 Sep 26, 2021
This was recently broken in #9321 when we validated stream IDs to be
integers but did that after to the stepping next record instead of before.
@oranagra oranagra mentioned this pull request Oct 4, 2021
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 added a commit that referenced this pull request Oct 4, 2021
This was recently broken in #9321 when we validated stream IDs to be
integers but did that after to the stepping next record instead of before.

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

Labels

release-notes indication that this issue needs to be mentioned in the release notes

Projects

Development

Successfully merging this pull request may close these issues.

3 participants