Commit Graph

2995 Commits

Author SHA1 Message Date
Dmitry Vyukov
758cd203cb sys/linux: fix kvm_ioeventfd layout 2018-08-26 05:54:16 +02:00
Dmitry Vyukov
0be67307ca sys/linux: add few assorted new flags/ioctls 2018-08-26 05:51:30 +02:00
Dmitry Vyukov
98b0bddc4d sys/linux: treat cuse as fuse
It's mostly fuse.

Also regenerate consts on latest kernel.
2018-08-26 05:17:40 +02:00
Dmitry Vyukov
ce0eccdea6 sys/linux: add IOCB_CMD_POLL 2018-08-26 05:01:08 +02:00
Dmitry Vyukov
77e79ca08e sys/linux: add userio descriptions
Update #533
2018-08-26 04:54:54 +02:00
Dmitry Vyukov
36d87ddbf8 pkg/report: refactor and improve fuchsia report parsing
Switch to the existing oops-based infrastructure.
Extending existing code is nearly impossible.

Detect service crashes on fuchsia.

Add more tests.
2018-08-25 18:18:11 -07:00
Dmitry Vyukov
76e7c3dfb4 sys/netbsd: use posix helper instead of copy-pasted code
We now have this common logic in sys/targets,
so use it instread of copy-pasted code.
I missed this file during the refactoring.
2018-08-25 09:05:51 -07:00
Dmitry Vyukov
bf3cf0c965 pkg/host: enable coverage on freebsd, disable on netbsd
I messed it up during refactoring.
It's freebsd that has coverage support.
2018-08-25 08:59:51 -07:00
Dmitry Vyukov
20749b5987 pkg/report: ignore android art debug output
Now actually ignore it.
2018-08-25 08:00:22 -07:00
Dmitry Vyukov
dd62265df8 pkg/report: ignore android art debug output 2018-08-25 07:59:35 -07:00
Dmitry Vyukov
9be5aa1d05 executor: update special fuchsia syscalls
zx_clock_get_monotonic was added,
zx_debuglog_read was renamed (or we forgot to add it earlier).
2018-08-24 20:07:56 -07:00
Dokyung Song
1d9f787ea6 sys/fuchsia: Remove read_status from zx_channel_call args, and reflect zx_time_t type change (unsigned -> signed) 2018-08-24 20:01:29 -07:00
Dmitry Vyukov
307deaee5e dashboard/app: add space between colon and url in bug emails
As asked by Peter Zijlstra: "the lack of whitespace between "repro:"
and the URL makes it hard to copy paste".

We keep lines below 78 colons because otherwise some email clients will reflow them.
And also we want it all properly aligned as asked by Ted Ts'o.
So shorten "syzkaller repro" to "syz repro".
2018-08-24 22:11:46 +02:00
Dmitry Vyukov
e02ac807a0 dashboard/app: show recent crashes first after time sorting 2018-08-24 20:39:37 +02:00
Dmitry Vyukov
8ec5fc8d3c dashboard/app: add fragment links for jobs/managers and bug sections 2018-08-24 20:20:32 +02:00
Kees Cook
9b0f5c758d dashboard/app: Add anchor links for BugNamespaces
To make it possible to provide URLs that jump to a specific BugNamespace,
this adds clickable anchors for each of the BugNamespaces without changing
the current appearance of the h2 tag.
2018-08-24 10:55:51 -07:00
Dmitry Vyukov
95b5c82b28 pkg/build: do not use asan for fuchsia
If we build fuchsia with asan, syz-executor binary fails to run with:

$ /tmp/syz-executor
[00041.656] 01128.01275> dlsvc: could not open 'libc++.so.2'
[00041.656] 06074.06088> Error loading shared library libc++.so.2: ZX_ERR_NOT_FOUND (needed by
[00041.656] 06074.06088> /tmp/syz-executor
[00041.656] 06074.06088> )
[00041.656] 01128.01275> dlsvc: could not open 'libc++abi.so.1'
[00041.656] 06074.06088> Error loading shared library libc++abi.so.1: ZX_ERR_NOT_FOUND (needed by
[00041.656] 06074.06088> /tmp/syz-executor
[00041.656] 06074.06088> )
[00041.663] 01128.01275> dlsvc: could not open 'libunwind.so.1'
[00041.663] 06074.06088> Error loading shared library libunwind.so.1: ZX_ERR_NOT_FOUND (needed by
[00041.663] 06074.06088> /tmp/syz-executor
[00041.663] 06074.06088> )

Disable asan until we figure out how to fix this.
2018-08-20 11:40:44 -07:00
Dmitry Vyukov
2dc4378f02 prog: don't add fallback signal after seccomp
seccomp filter can produce arbitrary errno values for subsequent syscalls.
Don't trust anything afterwards.
2018-08-19 00:13:24 -07:00
Dmitry Vyukov
4e1e8035f3 pkg/build: update gvisor race build process
Use separate target as this is something that can be upstreamed.
2018-08-18 22:04:17 -07:00
Dmitry Vyukov
7067e78fd6 executor: fix gcc warnings in fuchsia generated code
gcc complains about function declarations not being prototypes,
signed/unsigned cast mismatch and casts between incompatible functions.
Fix them.
2018-08-19 01:53:59 +02:00
Dmitry Vyukov
48613af61c pkg/vcs: use garnet instead of topaz layer for fuchsia
Topaz contains end user applications that are not interesting for us
and only increase build time. The applications also consume lots of memory,
so switching to garnet should leave more memory for the fuzzer
(maybe eliminate some OOMs).
2018-08-18 13:55:01 -07:00
Anton Lindqvist
de20bcbb68 vm/vmm: support for vmm found on OpenBSD (#678)
vm/vmm: add vmm implementation found on OpenBSD
2018-08-18 13:06:44 -07:00
Dokyung Song
db1858f6b9 sys/fuchsia: semi-automatically generated FIDL launcher description 2018-08-17 14:31:53 -07:00
Julia Hansbrough
738da825b2 [fuchsia] Change QEMU args to use multiboot shim. 2018-08-17 07:02:12 -07:00
Julia Hansbrough
f22e81b500 [doc] Update contributing instructions.
Details how to run tests and how to work around gofmt bug.
2018-08-17 06:57:27 -07:00
Dmitry Vyukov
9ccc1d4565 sys/linux: add uinput support 2018-08-15 01:50:08 +02:00
Dmitry Vyukov
0e6dcb8809 sys/linux: add uhid support 2018-08-15 00:10:16 +02:00
Dmitry Vyukov
e1dda36ed9 dashboard/config: enable UHID and USERIO 2018-08-15 00:10:11 +02:00
Dmitry Vyukov
5084a6252d pkg/build: build asan-ified fuchsia
Building with asan is useful to detect any bugs in C/C++ services.
2018-08-14 08:50:56 -07:00
Dmitry Vyukov
565e2ad078 pkg/report: ignore another mutex lock guts function 2018-08-13 17:14:08 -07:00
Dmitry Vyukov
7a88b14122 pkg/compiler: prohibit subargs 2018-08-10 18:50:03 +02:00
Dmitry Vyukov
1be453f07b sys/linux: fix invalid cdrom description 2018-08-10 18:44:31 +02:00
Dmitry Vyukov
44944d8c80 dashboard/config: enable KMSAN in KMSAN config
Somehow it ended up being turned off.
2018-08-10 13:56:04 +02:00
Dmitry Vyukov
1fb62d5815 executor: fix FS_XFLAG_IMMUTABLE for 32-bit mode
FS_IOC_FSSETXATTR is not supported in compat mode, use FS_IOC_SETFLAGS instead.
2018-08-09 16:05:46 +02:00
Dmitry Vyukov
fa9be14164 pkg/csource: fix 32-bit syscall calls
syscall accepts args as ellipsis, resources are uint64
and take 2 slots without the cast, which is wrong.
Cast resources to long when passing to syscall.
2018-08-09 16:05:46 +02:00
Dmitry Vyukov
3a2fe60529 executor: fix cgroups
1. Create per-proc cgroup in executor.
2. Setup cgroups after chdir into test dir
   (it assumes relative paths against test dir).
3. Add test.
2018-08-09 16:05:46 +02:00
Dmitry Vyukov
922e8e2734 executor: mount binfmt_mist
We forgot to mount binfmt_misc. Mount it. Add a test.
Increase per-call timeout, otherwise last execve timesout.
Fix csource waiting for call completion at the end of program.
2018-08-09 16:05:46 +02:00
Dmitry Vyukov
acf31536e9 executor: clean up immutable dirs
Turns out dirs can be immutable too.

Update #650
2018-08-09 16:05:46 +02:00
Dmitry Vyukov
23b45a7525 executor: remove unnecessary hooks on fuchsia
These are not needed now.
2018-08-09 16:05:46 +02:00
Dokyung Song
2eeda842c8 sys/fuchsia: add syscall description for binding channels to Launcher 2018-08-08 19:31:56 +02:00
Dmitry Vyukov
17a0470620 executor: manually define struct fsxattr
It should be in <linux/fs.h> but is not there on some distros/arches as expected.

Travis build fails with:

      		<stdin>: In function ‘remove_dir’:
        		<stdin>:152:13: error: variable ‘attr’ has initializer but incomplete type
        		<stdin>:152:13: error: excess elements in struct initializer [-Werror]
        		<stdin>:152:13: error: (near initialization for ‘attr’) [-Werror]
        		<stdin>:152:21: error: storage size of ‘attr’ isn’t known
        		<stdin>:153:20: error: ‘FS_IOC_FSSETXATTR’ undeclared (first use in this function)
        		<stdin>:153:20: note: each undeclared identifier is reported only once for each function it appears in
        		<stdin>:152:21: error: unused variable ‘attr’ [-Werror=unused-variable]
        		cc1: all warnings being treated as errors

https://travis-ci.org/google/syzkaller/jobs/413574080
2018-08-08 17:04:50 +02:00
Dmitry Vyukov
d46deef51c executor: clean up immutable files
Fixes #650
2018-08-08 15:06:29 +02:00
Dmitry Vyukov
3653592507 pkg/runtest: assorted improvements
Support checking "blocked"/"unfinished" flags for calls.
Support test constanints, e.g. "requires: threaded" or "requires: -sandbox=setuid".
Some improvements in tools/syz-runtest.

Update #603
2018-08-08 15:05:01 +02:00
Dmitry Vyukov
4207dbaa99 tools/syz-execprog: print blocked/unfinished/faulted flags for calls 2018-08-08 15:03:31 +02:00
Dmitry Vyukov
91e4f273d6 pkg/csource: don't do checkpoint/reset net with setuid sandbox
Missing part of
"executor: don't checkpoint/reset net namespace with setuid sandbox"
2018-08-08 15:02:25 +02:00
Dmitry Vyukov
c00da3df66 prog: collect all prog comments
Parse and collect and prog comments.
Will be needed for runtest annotations
(e.g. "requires threaded mode", etc).
2018-08-08 13:07:49 +02:00
Dmitry Vyukov
9a791c3992 executor: remap cover fd's to higher values
Remap cover fd's to 24x range to prevent interference
with fd's used during fuzzing and also to make
fd number consistent with/without cover enabled.
2018-08-08 12:48:06 +02:00
Dmitry Vyukov
ddeb9f8d88 executor: don't checkpoint/reset net namespace with setuid sandbox
After setuid the process won't have rights to reset net namespace,
but it should not be able to change it during fuzzing too.
So just skip that part.
2018-08-08 11:16:54 +02:00
Dan Austin
14f8a76fe7 executor: checkpoint net namespace in the right namespace
With checkpoint_net_namespace moved to setup_common,
and Android fuzzing session terminates prematurely due to
ipv4_tables not being initialized at this time.
Moving the call back to loop fixes this behavior.
2018-08-08 11:03:33 +02:00
Dmitry Vyukov
1beb81367c executor: check write return value
gcc complains:

error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]

Also fix includes.
2018-08-05 13:05:47 +02:00