From 2d51d57a71659b063ddcb21cc50845d05d39708b Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Fri, 1 Apr 2022 13:16:03 +0000 Subject: all: run strace on each found reproducer If `strace_bin` is specified, syzkaller will invoke a reproducer with it and save the output. This should help in debugging. If syz-manager is attached to a dashboard, upload the strace-powered output and report. --- pkg/mgrconfig/config.go | 5 +++++ pkg/mgrconfig/load.go | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'pkg/mgrconfig') diff --git a/pkg/mgrconfig/config.go b/pkg/mgrconfig/config.go index c13e6f452..20a0b7b57 100644 --- a/pkg/mgrconfig/config.go +++ b/pkg/mgrconfig/config.go @@ -168,6 +168,11 @@ type Config struct { // Regexps are matched against bug title, guilty file and maintainer emails. Interests []string `json:"interests,omitempty"` + // Path to the strace binary compiled for the target architecture. + // If set, for each reproducer syzkaller will run it once more under strace and save + // the output. + StraceBin string `json:"strace_bin"` + // Type of virtual machine to use, e.g. "qemu", "gce", "android", "isolated", etc. Type string `json:"type"` // VM-type-specific parameters. diff --git a/pkg/mgrconfig/load.go b/pkg/mgrconfig/load.go index c9528b38a..2b49d0cbd 100644 --- a/pkg/mgrconfig/load.go +++ b/pkg/mgrconfig/load.go @@ -256,6 +256,12 @@ func (cfg *Config) completeBinaries() error { if cfg.ExecutorBin != "" && !osutil.IsExist(cfg.ExecutorBin) { return fmt.Errorf("bad config syzkaller param: can't find %v", cfg.ExecutorBin) } + if cfg.StraceBin != "" { + if !osutil.IsExist(cfg.StraceBin) { + return fmt.Errorf("bad config param strace_bin: can't find %v", cfg.StraceBin) + } + cfg.StraceBin = osutil.Abs(cfg.StraceBin) + } return nil } -- cgit mrf-deployment