aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/init.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-01-27 12:09:24 +0100
committerDmitry Vyukov <dvyukov@google.com>2019-02-07 09:39:35 +0100
commitcd7a3c250fe213051cd250b111fbf17e48373e33 (patch)
tree9764ed72952f7183babca7dfbc230a59c486588f /sys/linux/init.go
parentd25487bc2e50dbb3ec89a390467d1100744cac63 (diff)
sys/linux: move {i,fa}notify into own files
Diffstat (limited to 'sys/linux/init.go')
-rw-r--r--sys/linux/init.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/linux/init.go b/sys/linux/init.go
index 9b53116d4..a76fd78fb 100644
--- a/sys/linux/init.go
+++ b/sys/linux/init.go
@@ -27,6 +27,7 @@ func InitTarget(target *prog.Target) {
EXT4_IOC_MIGRATE: target.GetConst("EXT4_IOC_MIGRATE"),
FAN_OPEN_PERM: target.GetConst("FAN_OPEN_PERM"),
FAN_ACCESS_PERM: target.GetConst("FAN_ACCESS_PERM"),
+ FAN_OPEN_EXEC_PERM: target.GetConst("FAN_OPEN_EXEC_PERM"),
PTRACE_TRACEME: target.GetConst("PTRACE_TRACEME"),
CLOCK_REALTIME: target.GetConst("CLOCK_REALTIME"),
AF_NFC: target.GetConst("AF_NFC"),
@@ -116,6 +117,7 @@ type arch struct {
EXT4_IOC_MIGRATE uint64
FAN_OPEN_PERM uint64
FAN_ACCESS_PERM uint64
+ FAN_OPEN_EXEC_PERM uint64
PTRACE_TRACEME uint64
CLOCK_REALTIME uint64
ARCH_SET_FS uint64
@@ -164,12 +166,12 @@ func (arch *arch) sanitizeCall(c *prog.Call) {
cmd.Val = arch.EXT4_IOC_MIGRATE
}
case "fanotify_mark":
- // FAN_OPEN_PERM and FAN_ACCESS_PERM require the program to reply to open requests.
+ // FAN_*_PERM require the program to reply to open requests.
// If that does not happen, the program will hang in an unkillable state forever.
// See the following bug for details:
// https://groups.google.com/d/msg/syzkaller-bugs/pD-vbqJu6U0/kGH30p3lBgAJ
mask := c.Args[2].(*prog.ConstArg)
- mask.Val &^= arch.FAN_OPEN_PERM | arch.FAN_ACCESS_PERM
+ mask.Val &^= arch.FAN_OPEN_PERM | arch.FAN_ACCESS_PERM | arch.FAN_OPEN_EXEC_PERM
case "ptrace":
req := c.Args[0].(*prog.ConstArg)
// PTRACE_TRACEME leads to unkillable processes, see: