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. --- sys/linux/init_test.go | 6 +++--- sys/targets/common.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/linux/init_test.go b/sys/linux/init_test.go index 104d3c068..fb81c1140 100644 --- a/sys/linux/init_test.go +++ b/sys/linux/init_test.go @@ -121,10 +121,10 @@ mknod(0x0, 0x6000, 0x700) exit(0x3) exit(0x43) exit(0xc3) -exit(0xc4) +exit(0xc3) exit_group(0x5a) -exit_group(0x44) -exit_group(0x444) +exit_group(0x43) +exit_group(0x443) `, ` exit(0x3) diff --git a/sys/targets/common.go b/sys/targets/common.go index 325e6ca88..0096bcf75 100644 --- a/sys/targets/common.go +++ b/sys/targets/common.go @@ -104,8 +104,8 @@ func (arch *UnixSanitizer) SanitizeCall(c *prog.Call) { } case "exit", "exit_group": code := c.Args[0].(*prog.ConstArg) - // These codes are reserved by executor. - if code.Val%128 == 67 || code.Val%128 == 68 { + // This code is reserved by executor. + if code.Val%128 == 67 { code.Val = 1 } } -- cgit mrf-deployment