Skip to content

Add two fuzzers to integrate containerd into OSS-fuzz#4841

Merged
estesp merged 1 commit intocontainerd:masterfrom
AdamKorcz:fuzz1
Dec 23, 2020
Merged

Add two fuzzers to integrate containerd into OSS-fuzz#4841
estesp merged 1 commit intocontainerd:masterfrom
AdamKorcz:fuzz1

Conversation

@AdamKorcz
Copy link
Copy Markdown
Contributor

This PR adds two fuzzers to set up continuous fuzzing for containerd on the OSS-fuzz platform.

Fuzzing is a method for testing whereby pseudo-random data is passed to a target entry point in an application - which in these two fuzzers are filters.Parse and platforms.Parse respectively. The application is then observed in the hope of finding bugs and vulnerabilities.
Integrating containerd into OSS-fuzz will allow these two fuzzers to run continuously and look for harder-to-find bugs. If bugs are found maintainers get notified with emails containing a link to a detailed bug report that includes stacktrace and reproducible test case.
I have set up a draft integration PR on the OSS-fuzz side that will be updated according to the progression of this PR: google/oss-fuzz#4839. The build currently fails but I will get it up and running once the fuzzers here are integrated. In the PR on OSS-fuzz there is a project.yaml file which requires at least one maintainers email address.

Signed-off-by: AdamKorcz [email protected]

@k8s-ci-robot
Copy link
Copy Markdown

Hi @AdamKorcz. Thanks for your PR.

I'm waiting for a containerd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 14, 2020

Build succeeded.

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 14, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@kzys kzys left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Does it make sense to at least build them on GitHub Actions? If we change the signature of Parse() methods, we may forget to update the Fuzz functions, since // +build gofuzz excludes them.

@AdamKorcz
Copy link
Copy Markdown
Contributor Author

@kzys that is a good point, however as OSS-fuzz runs fuzzers several times per week, maintainers will get notified in case the fuzzers can't be built.

@mxpv
Copy link
Copy Markdown
Member

mxpv commented Dec 16, 2020

@AdamKorcz If I get this right, each function/API must be wrapped in order to be tested by oss-fuzz, right? If so I'd rather prefer to have a separate package fuzz/ with all wrappers in one place instead of spreading it across the codebase. Would that be reasonable?

@AdamKorcz
Copy link
Copy Markdown
Contributor Author

@AdamKorcz If I get this right, each function/API must be wrapped in order to be tested by oss-fuzz, right? If so I'd rather prefer to have a separate package fuzz/ with all wrappers in one place instead of spreading it across the codebase. Would that be reasonable?

That is not a problem. It will work fine with OSS-fuzz. I have made the changes in the commit.

Copy link
Copy Markdown
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

@cpuguy83
Copy link
Copy Markdown
Member

can you squash commits?

Signed-off-by: AdamKorcz <[email protected]>
@AdamKorcz
Copy link
Copy Markdown
Contributor Author

Hereby squashed

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented Dec 19, 2020

Build succeeded.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit ac5ca3a into containerd:master Dec 23, 2020
@AdamKorcz
Copy link
Copy Markdown
Contributor Author

Thank you for merging this in. To finish the integration on the OSS-fuzz side we need at least one maintainers email address in the project.yaml file in this PR: google/oss-fuzz#4839. Please leave the maintainer email addresses in this thread or in the PR on the OSS-fuzz github repository and I will get it added in project.yaml.

Please note that I have added my own email address on the mailing list to see the integration through to completion. This does mean that all bugs and vulnerabilities will be visible by me as all email addresses on that list will have access to these, and if you prefer me off the list, just let me know, and I will remove myself.

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.

7 participants