From 25e10a043498087f9427f0698b341d051c310fc4 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 31 Jan 2019 10:57:46 +0100 Subject: 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. --- pkg/csource/csource.go | 1 - pkg/csource/generated.go | 2 -- 2 files changed, 3 deletions(-) (limited to 'pkg/csource') diff --git a/pkg/csource/csource.go b/pkg/csource/csource.go index c9ebce62f..bcb40472a 100644 --- a/pkg/csource/csource.go +++ b/pkg/csource/csource.go @@ -422,7 +422,6 @@ func (ctx *context) postProcess(result []byte) []byte { result = regexp.MustCompile(`\t*debug_dump_data\((.*\n)*?.*\);\n`).ReplaceAll(result, nil) result = regexp.MustCompile(`\t*exitf\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) result = regexp.MustCompile(`\t*fail\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) - result = regexp.MustCompile(`\t*error\((.*\n)*?.*\);\n`).ReplaceAll(result, []byte("\texit(1);\n")) result = ctx.hoistIncludes(result) result = ctx.removeEmptyLines(result) diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index b8ba20bc2..5a402b66f 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -4666,8 +4666,6 @@ static void loop(void) status = WEXITSTATUS(status); if (status == kFailStatus) fail("child failed"); - if (status == kErrorStatus) - error("child errored"); reply_execute(0); #endif #if SYZ_EXECUTOR || SYZ_USE_TMP_DIR -- cgit mrf-deployment