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

[decompress] Fix nullptr addition & improve fuzzer #3356

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

terrelln
Copy link
Contributor

@terrelln terrelln commented Dec 15, 2022

Fix an instance of NULL + 0 in ZSTD_decompressStream(). Also, improve our stream_decompress fuzzer to pass NULL in/out buffers to ZSTD_decompressStream(), and fix 2 issues that were immediately surfaced.

The stream_decompress fuzzer now catches this bug when the relevant UBSAN warning is enabled.

I scanned through ZSTD_decompressStream() and this seems to be the only offending pointer arithmetic.

Fixes #3351

Fix an instance of `NULL + 0` in `ZSTD_decompressStream()`. Also, improve our
`stream_decompress` fuzzer to pass `NULL` in/out buffers to
`ZSTD_decompressStream()`, and fix 2 issues that were immediately surfaced.

Fixes facebook#3351
@terrelln terrelln merged commit f31b83f into facebook:dev Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants