-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 lzo #1862
Add lzo #1862
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We approve of adding this project.
Did you want feedback from @markus-oberhumer before we merged this?
|
||
/* Decompress. */ | ||
new_len = size; | ||
r = lzo1x_decompress(out,out_len,in,&new_len,NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be nice to have another target that tried to decompress data
. Right now lzo1x_decompress
is not decompressing anything invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. @markus-oberhumer What do you think of adding lzo to oss fuzz?
Would it be better to move this and future test harnesses to lzo repo? Currently this PR picks up an lzo release. Would it be better to fuzz the current development commit instead? I couldn't find a public repository for lzo unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Markus: we prefer to have fuzz targets upstream (less likely to break)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonathanmetzman I added a decompress
only target in the source branch of this PR. Looking forward to feedback.
At the moment, there is a shallow heap-buffer overrun (READ) like so for a 1 byte compressed data:
READ of size 8 at 0x6020000000d1 thread T0
SCARINESS: 23 (8-byte-read-heap-buffer-overflow)
#0 0x5bdcce in lzo1x_decompress /src/lzo-2.10/src/lzo1x_d.ch:120:13
Brainstorming here: To do this systematically, we would need to add two targets per compression method, one that compresses fuzzed data and another that decompresses it. I believe there are 10 or more compression methods in the current release version, do that would mean around 20 targets. This is excluding other compression parameters such as the number of rounds to use etc. Wouldn't having so many targets sit in the oss-fuzz repo lead to bit rot? |
I think having these two kinds of targets are worthwhile:
and
(decompression in the first target is controversial, since theoretically it shouldn't cover anything the second target won't, but my guess is it would be useful in practice).
So instead of creating one (or two) new target(s) for every method/parameter combination, you can
Yes. This is probably too many. |
Thank you @jonathanmetzman for the discussion. I will address these concerns on my fork and ping you back when that's ready for review. In the meanwhile, looking forward to hearing from Markus. |
Ping back from Berlin :-) @markus-oberhumer: What email address should I use as the primary contact in |
This commit adds a minimal lzo seed as a seed for the lzo_decompress_target. Still results in a heap-buffer-overflow at the moment.
…d remove assertion
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. |
@viniul I think you need to sign the Google CLA :-) |
I'll make sure to sign it :) |
This commit adds more decompression targets to decompress_target.c. The target function is chosen based on the first byte of the data given by libfuzzer.
…include paths in build script
ping. |
@jonathanmetzman Sorry, I did not have the time to look into it yet. Planning on signing it this weekend. |
@jonathanmetzman I have filled out and submitted the Google CLA. |
@bshastry can you comment again so that I can see if the bot updates the status? |
Bot do you think? |
Yeah, we need to make sure that CLA is signed for each email from the following:
or you can try to squash the commits and upload a separate PR / force update this one. |
Just a check on the cla. |
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
Ok, as per some documentation I've found, @googlebot is not going to change the status here, and we can merge after getting the consent from all authors. Given that we have only two authors here (with a couple different git emails), I think we have a consent from everyone. Merging. |
This reverts commit 754db9e.
This PR:
CC @viniul