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

syz-fuzzer: add NULL check in supported features #4763

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,4 @@ Krzysztof Pawlaczyk
Simone Weiß
Amazon
Bjoern Doebel
Alessandro Carminati
8 changes: 7 additions & 1 deletion syz-fuzzer/fuzzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,13 @@ func main() {
checkReq = new(rpctype.CheckArgs)
}

for _, feat := range r.Features.Supported() {
suppFeatures := r.Features.Supported()

if suppFeatures == nil {
log.SyzFatalf("The currently running kernel image seems not to support any required feature, have you forgotten to mount debugfs?")
}

for _, feat := range suppFeatures {
log.Logf(0, "%v: %v", feat.Name, feat.Reason)
}

Expand Down