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

Adopt Go 1.18 fuzzing and fix btf crashes #530

Merged
merged 3 commits into from
Dec 20, 2021
Merged

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Dec 17, 2021

commit 83a63d0
Author: Lorenz Bauer lmb@cloudflare.com
Date: Fri Dec 17 10:57:25 2021 +0000

btf: fix missing error return in parseFuncInfos, parseLineInfos

Found by fuzzing!

commit 8e15fa9
Author: Lorenz Bauer lmb@cloudflare.com
Date: Fri Dec 17 10:49:13 2021 +0000

btf: move loadExtInfos to ext_info.go

commit e1971f6
Author: Lorenz Bauer lmb@cloudflare.com
Date: Fri Dec 17 11:06:56 2021 +0000

elf, btf: make fuzzing 1.18 ready

Migrate the existing (and bitrotted) fuzz harness to the built
in fuzzing support available from Go 1.18.

This makes some refactoring of BTF necessary, since it's currently not
easy to parse ext infos on their own.

@lmb lmb requested a review from ti-mo December 17, 2021 11:09
@lmb
Copy link
Collaborator Author

lmb commented Dec 17, 2021

You can try this by running go1.18beta1 test -fuzz=Spec -run XXX -v in the project root.

Copy link
Collaborator

@ti-mo ti-mo left a comment

Choose a reason for hiding this comment

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

Nice! Left a few nits.

internal/btf/ext_info.go Outdated Show resolved Hide resolved
internal/btf/btf.go Show resolved Hide resolved
Migrate the existing (and bitrotted) fuzz harness to the built
in fuzzing support available from Go 1.18.

This makes some refactoring of BTF necessary, since it's currently not
easy to parse ext infos on their own.
@ti-mo
Copy link
Collaborator

ti-mo commented Dec 20, 2021

I've found another crasher in extinfos, let's not merge this yet.

@ti-mo ti-mo merged commit 2b73b3a into cilium:master Dec 20, 2021
@lmb lmb deleted the go-1.18-fuzzing branch February 27, 2023 16:12
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.

None yet

2 participants