aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-01-31 10:57:46 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-01-31 11:35:53 +0100
commit25e10a043498087f9427f0698b341d051c310fc4 (patch)
tree7e7b9416711039e1d1f22ba216959cd94134a199 /tools
parent724adc544590747ce47c3be1b4a63951b7171188 (diff)
executor: remove ability to detect kernel bugs
This ability was never used but we maintain a bunch of code for it. syzkaller also recently learned to spoof this error code with some ptrace magic (probably intercepted control flow again and exploited executor binary). Drop all of it.
Diffstat (limited to 'tools')
-rw-r--r--tools/syz-execprog/execprog.go8
-rw-r--r--tools/syz-stress/stress.go6
2 files changed, 5 insertions, 9 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index 82fa00906..f65ad9d9b 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -140,13 +140,9 @@ func (ctx *Context) execute(pid int, env *ipc.Env, entry *prog.LogEntry) {
if *flagOutput {
ctx.logProgram(pid, entry.P, callOpts)
}
- output, info, failed, hanged, err := env.Exec(callOpts, entry.P)
- if failed {
- log.Logf(0, "BUG: executor-detected bug:\n%s", output)
- }
+ output, info, hanged, err := env.Exec(callOpts, entry.P)
if ctx.config.Flags&ipc.FlagDebug != 0 || err != nil {
- log.Logf(0, "result: failed=%v hanged=%v err=%v\n\n%s",
- failed, hanged, err, output)
+ log.Logf(0, "result: hanged=%v err=%v\n\n%s", hanged, err, output)
}
if info != nil {
ctx.printCallResults(info)
diff --git a/tools/syz-stress/stress.go b/tools/syz-stress/stress.go
index e5f4ff845..d1beee34d 100644
--- a/tools/syz-stress/stress.go
+++ b/tools/syz-stress/stress.go
@@ -114,14 +114,14 @@ func execute(pid int, env *ipc.Env, execOpts *ipc.ExecOpts, p *prog.Prog) {
fmt.Printf("executing program %v\n%s\n", pid, p.Serialize())
outMu.Unlock()
}
- output, _, failed, hanged, err := env.Exec(execOpts, p)
+ output, _, hanged, err := env.Exec(execOpts, p)
if err != nil {
fmt.Printf("failed to execute executor: %v\n", err)
}
- if failed || hanged || err != nil || *flagOutput {
+ if hanged || err != nil || *flagOutput {
fmt.Printf("PROGRAM:\n%s\n", p.Serialize())
}
- if failed || hanged || err != nil || *flagOutput {
+ if hanged || err != nil || *flagOutput {
os.Stdout.Write(output)
}
}