diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-02-08 16:15:09 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-02-08 16:30:44 +0100 |
| commit | fa6c7b708014d8f73262837982e368f8d1f617b5 (patch) | |
| tree | baf22917ad354f32606ed5a62dfe30ae2697444e /sys/linux/init_test.go | |
| parent | 381ccbf2f8752e9369efc68aacae65f769378ba3 (diff) | |
sys/linux: prohibit opening /proc/self/exe
Fuzzer manages to open it and do bad things with it.
Prevent it from doing so.
Diffstat (limited to 'sys/linux/init_test.go')
| -rw-r--r-- | sys/linux/init_test.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/linux/init_test.go b/sys/linux/init_test.go index 45b6397f8..7e4753115 100644 --- a/sys/linux/init_test.go +++ b/sys/linux/init_test.go @@ -136,6 +136,22 @@ exit_group(0x1) exit_group(0x1) `, }, + { + ` +syz_open_procfs(0x0, &(0x7f0000000000)='io') +syz_open_procfs(0x0, &(0x7f0000000000)='exe') +syz_open_procfs(0x0, &(0x7f0000000000)='exe\x00') +syz_open_procfs(0x0, &(0x7f0000000000)='/exe') +syz_open_procfs(0x0, &(0x7f0000000000)='./exe\x00') +`, + ` +syz_open_procfs(0x0, &(0x7f0000000000)='io') +syz_open_procfs(0x0, &(0x7f0000000000)='net\x00') +syz_open_procfs(0x0, &(0x7f0000000000)='net\x00') +syz_open_procfs(0x0, &(0x7f0000000000)='net\x00') +syz_open_procfs(0x0, &(0x7f0000000000)='net\x00') + `, + }, } for i, test := range tests { t.Run(fmt.Sprint(i), func(t *testing.T) { |
