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

Add compression bomb test #843

Open
masih opened this issue Jan 22, 2025 · 1 comment · May be fixed by #842
Open

Add compression bomb test #843

masih opened this issue Jan 22, 2025 · 1 comment · May be fixed by #842
Assignees

Comments

@masih
Copy link
Member

masih commented Jan 22, 2025

Can we add a compression bomb test? I think we're fine, but it would be nice to have a test.

  • The fact that we're stream decoding into the CBOR decoder coupled with the fact that the CBOR decoder has a bunch of limits should protect us against memory issues.
  • The fact that our CBOR decoder won't read through unlimited input (e.g., doesn't have logic that skips unknown fields, etc.) means we can't get "stuck" when decoding. But it would be nice if we could wrap the decompressed reader in a limited reader before passing it off to the CBOR decoder, just in case. That way we can guarantee that we'll process at most N bytes of CBOR before giving up.

Originally posted by @Stebalien in #842 (comment)

@github-project-automation github-project-automation bot moved this to Todo in F3 Jan 22, 2025
@masih masih self-assigned this Jan 22, 2025
@masih masih added this to the M2: Mainnet Passive Testing milestone Jan 22, 2025
@masih masih linked a pull request Jan 22, 2025 that will close this issue
@masih masih moved this from Todo to In progress in F3 Jan 23, 2025
@masih
Copy link
Member Author

masih commented Jan 23, 2025

Added strict limits to zstd decoded values here: 05bc578 anlong with tests.

@masih masih linked a pull request Jan 24, 2025 that will close this issue
@BigLep BigLep moved this from In progress to In review in F3 Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

Successfully merging a pull request may close this issue.

1 participant