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

libarchive: handle erroneous archives #9452

Merged
merged 1 commit into from
Jan 18, 2023
Merged

libarchive: handle erroneous archives #9452

merged 1 commit into from
Jan 18, 2023

Conversation

DavidKorczynski
Copy link
Collaborator

Some more codepaths were added to the fuzzer in
#9003 However, these paths are only valid to call in the event archive_read_open_memory returns ARCHIVE_OK -- the fuzzer is currently blocked due to this and is why the coverage decreased between 17th Nov to 19th Nov (https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221117/linux/src/libarchive/report.html vs
https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221119/linux/src/libarchive/report.html)

Am looking to get the coverage back up as I'm writing some documentation about
ossf/fuzz-introspector#580 (comment)

@jvoisin could you help review?

Signed-off-by: David Korczynski [email protected]

Some more codepaths were added to the fuzzer in
#9003 However, these paths are
only valid to call in the event `archive_read_open_memory` returns
`ARCHIVE_OK` -- the fuzzer is currently blocked due to this and is why
the coverage decreased between 17th Nov to 19th Nov
(https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221117/linux/src/libarchive/report.html
vs
https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221119/linux/src/libarchive/report.html)

Am looking to get the coverage back up as I'm writing some documentation
about
ossf/fuzz-introspector#580 (comment)

Signed-off-by: David Korczynski <[email protected]>
@jvoisin
Copy link
Contributor

jvoisin commented Jan 18, 2023

Good catch, thanks!

@AdamKorcz AdamKorcz merged commit 0b97ad9 into master Jan 18, 2023
@AdamKorcz AdamKorcz deleted the libarchive-upd-33 branch January 18, 2023 16:01
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
Some more codepaths were added to the fuzzer in
google#9003 However, these paths are
only valid to call in the event `archive_read_open_memory` returns
`ARCHIVE_OK` -- the fuzzer is currently blocked due to this and is why
the coverage decreased between 17th Nov to 19th Nov
(https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221117/linux/src/libarchive/report.html
vs

https://storage.googleapis.com/oss-fuzz-coverage/libarchive/reports/20221119/linux/src/libarchive/report.html)

Am looking to get the coverage back up as I'm writing some documentation
about

ossf/fuzz-introspector#580 (comment)

@jvoisin could you help review?

Signed-off-by: David Korczynski <[email protected]>

Signed-off-by: David Korczynski <[email protected]>
DavidKorczynski pushed a commit that referenced this pull request Jul 1, 2024
This fixes a major harness issue in the `libarchive` fuzzer and resolves
a fuzzing roadblock issue related to the build setup.
All calls after `archive_read_add_passphrase` currently exit early
because the decoder state is marked as invalid due to incorrect API
usage.

When combined with libarchive/libarchive#2229,
this should improve coverage from ~15% to >45%.
While the harness issue
[regressed](#9452 (comment))
at some point, it seems like the CRC build flag issue was always present
in oss-fuzz's libarchive setup.

Thanks!
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.

3 participants