syzkaller/sys/openbsd
Greg Steuck 77c702cf1a sys/openbsd: avoid /dev/fd node creation
Prevents corpus explosion with corrupted coverage data.

The two parallel runs of:
`doas ./syz-execprog -cover -coverfile /tmp/{fixed,unfixed} r.syz`
show markedly different coverage pictures:

unfixed:
```
2019/01/12 13:55:38 parsed 1 programs
2019/01/12 13:55:38 executed programs: 0
2019/01/12 13:55:38 call #0: signal 821, coverage 2438
2019/01/12 13:55:38 call #1: signal 243, coverage 1363
2019/01/12 13:55:38 call #2: signal 502, coverage 1993
2019/01/12 13:55:38 call #3: signal 15, coverage 44
2019/01/12 13:55:38 call #4: signal 335, coverage 8196
```

fixed:
```
2019/01/12 13:51:57 parsed 1 programs
2019/01/12 13:51:57 executed programs: 0
2019/01/12 13:51:57 call #0: signal 837, coverage 2491
2019/01/12 13:51:57 call #1: signal 241, coverage 1341
2019/01/12 13:51:57 call #2: signal 27, coverage 61
2019/01/12 13:51:57 call #3: signal 13, coverage 44
2019/01/12 13:51:57 call #4: signal 39, coverage 299
```

The contents of `r.syz` is
```
mknod(&(0x7f0000000180)='./file0\x00', 0x2006, 0x10000016e8)
r0 = open(&(0x7f0000000100)='./file0\x00', 0x0, 0x0)
mmap(&(0x7f0000000000/0x3000)=nil, 0x3000, 0x2, 0x10, r0, 0x0, 0x0)
writev(0xffffffffffffffff, &(0x7f0000002480)=[{&(0x7f0000001480)="<junk>", 0x573}], 0x1)
lstat(&(0x7f0000000240)='./file0\x00', &(0x7f0000000000))
```

So, it's the final lstat which was getting that extra coverage.  In
particular, the end of unfixed.4 has some 4734 values
0xffffffff00000000.
2019-01-14 09:48:45 +01:00
..
gen pkg/csource: use 0 for missing syscall args 2018-12-27 13:11:57 +01:00
fs_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
fs.txt sys: consistently mark all paddings as const[0] 2018-12-10 16:37:02 +01:00
init.go sys/openbsd: avoid /dev/fd node creation 2019-01-14 09:48:45 +01:00
ipc_amd64.const sys/openbsd: correct semctl syscall number 2018-12-07 09:45:14 +01:00
ipc.txt sys/openbsd: correct semctl syscall number 2018-12-07 09:45:14 +01:00
kqueue_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
kqueue.txt Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
mm_amd64.const sys/openbsd: added minherit, extended/simplified mmap 2018-10-29 18:59:16 +01:00
mm.txt sys/openbsd: added minherit, extended/simplified mmap 2018-10-29 18:59:16 +01:00
socket_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
socket_inet6_amd64.const sys: remove socketpair for AF_INET and AF_INET6 2018-12-04 08:58:22 +00:00
socket_inet6.txt sys: remove socketpair for AF_INET and AF_INET6 2018-12-04 08:58:22 +00:00
socket_inet_amd64.const sys: remove socketpair for AF_INET and AF_INET6 2018-12-04 08:58:22 +00:00
socket_inet.txt sys: remove socketpair for AF_INET and AF_INET6 2018-12-04 08:58:22 +00:00
socket_unix_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
socket_unix.txt Makefile: format openbsd syscall descriptions 2018-09-20 11:21:51 +02:00
socket.txt sys/openbsd: fix socketpair usage 2018-12-09 15:31:32 +01:00
sys_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
sys.txt sys/linux: add syz_execute_func 2018-08-30 21:45:04 -07:00
tty_amd64.const Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
tty.txt Add mandatory OpenBSD bits (#689) 2018-08-28 10:07:26 -07:00
vnet.txt executor: OpenBSD network package injection 2018-11-17 15:42:37 -08:00