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 out of bounds read/write in Snappy decompressor #184

Merged
merged 1 commit into from
Feb 8, 2024

Conversation

martint
Copy link
Member

@martint martint commented Feb 8, 2024

In the slow literal copy path, it wasn't validating that the literal fit within the input buffer, so the call to copyMemory could read from out of bounds and cause a crash.

When copying a match, it wasn't validating that the match fit within the output buffer in both branches (slow & fast path), so the operation could write outside of the output buffer if the match length was corrupted.

Fixes #183

In the slow literal copy path, it wasn't validating that the literal
fit within the input buffer, so the call to copyMemory could
read from out of bounds and cause a crash.

When copying a match, it wasn't validating that the match fit
within the output buffer in both branches (slow & fast path),
so the operation could write outside of the output buffer if
the match length was corrupted.
@martint martint merged commit b89db18 into airlift:master Feb 8, 2024
3 checks passed
@martint martint deleted the snappy-corruption branch February 8, 2024 18:50
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.

Security vulnerability: Snappy decompressor can be made to crash JVM
2 participants