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

Interpret a blob of memory as a rar file for fuzzing. #1090

Merged
merged 2 commits into from
Jan 18, 2018
Merged

Interpret a blob of memory as a rar file for fuzzing. #1090

merged 2 commits into from
Jan 18, 2018

Conversation

aawc
Copy link
Contributor

@aawc aawc commented Jan 18, 2018

This is experimental but is expected to increase fuzzing speed.

I am going to run with this configuration for 1 week and then compare the performance from previous week to see if it is worth doing this.

For more discussion, see #951

* Use the in-memory representation of the file

std::unique_ptr<CommandData> cmd_data(new CommandData);
cmd_data->ParseArg(const_cast<wchar_t *>(L"-p"));
cmd_data->ParseArg(const_cast<wchar_t *>(L"x"));
cmd_data->ParseDone();
std::wstring wide_filename(filename.begin(), filename.end());
cmd_data->SetArcInMem(const_cast<unsigned char *>(data), size);
cmd_data->AddArcName(wide_filename.c_str());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the filename be entirely removed now, or is it still required?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, it is still required. Once we decide that we are definitely going down this path (in-memory), I can convince the maintainer to support it better i.e. not have to set filename at all,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does filename have to be unique, otherwise, we can just set it to a default like temp.rar ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't have to be but I agree that having a fixed name now is possible and faster so let me change that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

* Use the in-memory representation of the file
* Use a fixed filename, skip calling getpid
@inferno-chromium inferno-chromium merged commit 2d49182 into google:master Jan 18, 2018
tmatth pushed a commit to tmatth/oss-fuzz that referenced this pull request Oct 22, 2018
* Interpret a blob of memory as a rar file for fuzzing. (google#4)

* Use the in-memory representation of the file

* Interpret a blob of memory as a rar file for fuzzing. (google#5)

* Use the in-memory representation of the file
* Use a fixed filename, skip calling getpid
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