Skip to content

affected/package: fuzzer #63442

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

Closed
rminnich opened this issue Oct 7, 2023 · 5 comments
Closed

affected/package: fuzzer #63442

rminnich opened this issue Oct 7, 2023 · 5 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@rminnich
Copy link
Contributor

rminnich commented Oct 7, 2023

What version of Go are you using (go version)?

it's pretty much impossible to tell, the fuzzer is not forthcoming.

Does this issue reproduce with the latest release?

I guess so?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
rminnich@pop-os:~/oss-fuzz$ go env
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/rminnich/.cache/go-build'
GOENV='/home/rminnich/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/rminnich/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/rminnich/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/home/rminnich/golang'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/home/rminnich/golang/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21rc3'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/dev/null'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build763893065=/tmp/go-build -gno-record-gcc-switches'

What did you do?

Trying to repro httpsoss-fuzz-build-logs.storage.googleapis.com/log-882ee784-ffad-40b1-a698-7aa86cbcde00.txt

We've got a ton of these coming through, but it's very hard to understand what it's trying to tell us.
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62420

They suggest this command
python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 u-root

What did you expect to see?

I actually don't know, the fuzzer docs are very confusing.

What did you see instead?

  • compile_native_go_fuzzer /src/u-root/cmds/boot/localboot FuzzParseGrubCfg fuzz_parse_grub_cmd_cfg

command-line-arguments

: internal compiler error: have package "main" (0xc0001802d0), want package "github.com/u-root/u-root/cmds/boot/localboot" (0xc0004b9540)

Please file a bug report including a short program that triggers the error.
https://go.dev/issue/new
2023/10/07 20:09:00 failed to build packages:exit status 1
ERROR:main:Building fuzzers failed.

It said to file a bug, so I did.

@seankhliao seankhliao added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Oct 7, 2023
@rminnich
Copy link
Contributor Author

rminnich commented Oct 8, 2023

Sorry this is so incomplete, please lmk what else you need.

git clone --depth=1 https://github.com/google/oss-fuzz.git
cd oss-fuzz/
python infra/helper.py pull_images
python infra/helper.py build_image u-root 
python infra/helper.py build_fuzzers --sanitizer address     --architecture x86_64 u-root 
python infra/helper.py build_fuzzers --sanitizer address --engine libfuzzer --architecture x86_64 u-root 

@ALTree
Copy link
Member

ALTree commented Oct 8, 2023

Happened with oss-fuzz before: #58607

The same error is seen when building a Go program by manually calling go tool compile with the wrong -p flag, as in the small reproducer in #54542. Not sure if the root cause is the same but it could be.

@seankhliao
Copy link
Member

I think we'll want the actual compiler invocations oss-fuzz is using. It appears that oss-fuzz is using https://github.com/AdamKorcz/go-118-fuzz-build to build rather than going through cmd/go.

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 8, 2023
@rminnich
Copy link
Contributor Author

rminnich commented Oct 8, 2023

here is what it runs, from strace (oss-fuzz doesn't make it easy), after it does a lot of setup:

docker
run
--rm
--privileged
--shm-size=2g
--platform
linux/amd64
-i
-e
FUZZING_ENGINE=libfuzzer
-e
SANITIZER=address
-e
ARCHITECTURE=x86_64
-e
PROJECT_NAME=u-root
-e
HELPER=True
-e
FUZZING_LANGUAGE=go
-v
/home/rminnich/oss-fuzz/build/out/u-root/:/out
-v
/home/rminnich/oss-fuzz/build/work/u-root:/work
-t
gcr.io/oss-fuzz/u-root]\

the u-root command runs gobusybox and then exec's go to build it all.

I'll keep digging.

@seankhliao seankhliao added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. and removed WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 10, 2023
@gopherbot
Copy link
Contributor

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
@golang golang locked and limited conversation to collaborators Nov 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants