-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/image: add a sample fuzz test for prototype of "fuzzing as a first class citizen" #30719
Comments
This was discussed also at google/oss-fuzz#2188 (comment) and I believe @FiloSottile is taking the lead on it. FYI, I have been working on go-fuzz some recently, including improving the API (broadly interpreted). I have been doing so with one eye on #19109, but mainly with an emphasis on making it more useful and usable now. One of the next things I plan to do is your step 5 above ("Add a new fuzzing signature"). |
Sounds good to me. I am pretty sure we do not want corpuses check-in with code. Based on my experience with go-fuzz[-corpus] this produces too much churn and changes. Imagine we have 100 fuzzers in the std lib, each day infra checks in corpus update for each. That's 100 additional changes each day and tons of diff on each check out and significant repo increase. |
Change https://golang.org/cl/167097 mentions this issue: |
I also have an interest in fuzzing as a first class citizen, so I have sent a CL to hopefully make the conversation more concrete. |
Earlier today, @dvyukov wrote in google/oss-fuzz#2188 (comment):
That makes sense to me. |
@josharian Thank you for the reference to the conversation from the last 1-2 weeks in google/oss-fuzz#2188. I had not read that recent portion, but makes sense. @FiloSottile Based on the comments from @dvyukov and the CL from @acln0, do you think it makes sense to proceed with this issue here? |
CC @nigeltao |
General approach SGTM. I'm happy for people like @dvyukov or @josharian to review actual CLs. |
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This change adds a sample Fuzz test function to package tiff, under the gofuzz build tag. The function is based on the tiff/tiff.go code, from github.com/dvyukov/go-fuzz-corpus. Fixes golang/go#30719 Updates golang/go#19109 Change-Id: I78771e9a1bd01651ba6ca421ba41f0c0e95d0c53 Reviewed-on: https://go-review.googlesource.com/c/image/+/167097 Run-TryBot: Dmitry Vyukov <dvyukov@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: thepudds <thepudds1460@gmail.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
Summary
This is an issue covering adding a sample
Fuzz
function tox/image
in support of the proposal to "make fuzzing a first class citizen" in #19109.The suggestion in this issue is to add https://github.com/dvyukov/go-fuzz-corpus/blob/master/tiff/tiff.go to
golang.org/x/image/tiff
, perhaps astiff_fuzz.go
orfuzz.go
. (Ultimately, the proposal is allowFuzz
functions to reside in a standard*_test.go
file, but currently I thinkdvyukov/go-fuzz
does not support that).It likely should be protected by a
gofuzz
build tag (or alternatively, afuzz
build tag; some additional discussion below).Once a single
Fuzz
function is added, additionalFuzz
functions could be added togolang.org/x/image
or othergolang.org/x
repositories, but that could be viewed as a follow-on steps for now.If there is agreement to proceed on this issue, likely someone from the broader Go community could send a CL.
Background
I suspect the people interested in weighing in on this issue here might not wish to re-read the entirety of the now lengthy #19109 discussion, so a brief recap:
After some discussion in #19109, the core Go team asked for a prototype before evaluating the proposal. For example, comments from Russ in #19109 (comment), #19109 (comment), and #19109 (comment), including:
In order to break things down into more manageable chunks of work (including in an attempt to break out items that must be done by someone on the core Go team vs. could be done by someone from the broader community), the following steps were suggested in #19109 (comment):
Some progress on Step 1 is thepudds/fzgo, a simple work-in-progress prototype that currently implements the majority of the proposed command from the March 2017 proposal document.
Separately, @josharian has done some experimentation regarding compiler level integration, including some related discussion in #29430.
Additional Details
This issue is intended to cover at least the start of Step 2 above. @dvyukov suggested in #19109 (comment) starting with
x/image
.Regarding what build tag to use here,
dvyukov/go-fuzz
defaults to setting thegofuzz
build tag:The March 2017 proposal document suggests supporting the
fuzz
build tag.thepudds/fzgo
sets bothgofuzz
andfuzz
build tags. For the purposes of this issue, I suggest using thegofuzz
build tag for now inx/image
given that is the default fordvyukov/go-fuzz
.This issue is not currently intended to cover Step 3 above in terms of creating a new corpus repository under
golang.org/x
(which would require action by specific people on the core Go team). I would be happy to file a separate issue for creating a new corpus repository, or if people prefer this single issue could be expanded in scope to cover discussing that as well.Comments? Concerns? Alternative thoughts on how to make concrete progress on Step 2 above?
CC @FiloSottile @bradfitz @acln0
The text was updated successfully, but these errors were encountered: