Skip to content

[huf] Fix OSS-Fuzz assert#2808

Merged
terrelln merged 1 commit intofacebook:devfrom
terrelln:huf-oss-fuzz-fix
Sep 27, 2021
Merged

[huf] Fix OSS-Fuzz assert#2808
terrelln merged 1 commit intofacebook:devfrom
terrelln:huf-oss-fuzz-fix

Conversation

@terrelln
Copy link
Contributor

PR #2784 introduced a bug in the decompressor that caused some valid
inputs to fail to decompress. The bitstream isn't reloaded after the 4X*
loop if the number of elements remaining is small enough, causing us to
read more bits than are available in the bitcontainer.

This was caught by the MSAN fuzzer in OSS-Fuzz because the assembly
implementation isn't used in the MSAN build.

Credit to OSS-Fuzz.

PR facebook#2784 introduced a bug in the decompressor that caused some valid
inputs to fail to decompress. The bitstream isn't reloaded after the 4X*
loop if the number of elements remaining is small enough, causing us to
read more bits than are available in the bitcontainer.

This was caught by the MSAN fuzzer in OSS-Fuzz because the assembly
implementation isn't used in the MSAN build.

Credit to OSS-Fuzz.
@terrelln terrelln merged commit 9ef055d into facebook:dev Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants