Commit Graph

1572 Commits

Author SHA1 Message Date
Dmitry Vyukov
7ba02b7e21 Update pull_request_template.txt 2017-10-18 12:26:12 +02:00
Dmitry Vyukov
21c4900972 Update pull_request_template.txt 2017-10-18 12:25:15 +02:00
Dmitry Vyukov
1ba1282960 Create pull_request_template.txt 2017-10-18 12:23:12 +02:00
Dmitry Vyukov
7fdc7eba93 Create issue_template.md 2017-10-18 12:14:53 +02:00
Dmitry Vyukov
83d9b33c5b Update contributing.md 2017-10-18 12:07:21 +02:00
Dmitry Vyukov
f89294761c executor: use forkserver for freebsd
Use forkserver and shmem for freebsd.
This greatly improves speed.
Also introduce fallback coverage signal based
on unique (syscall+errno) pairs.
2017-10-18 12:01:24 +02:00
Dmitry Vyukov
6368c469a5 pkg/report: support freebsd 2017-10-18 12:01:24 +02:00
Dmitry Vyukov
85c802e4cf pkg/report: support multiple OSes
Introduce report.Reporter interface.
Add an implementation per-OS.
Make users be explicit about OS they are testing.
2017-10-18 12:01:24 +02:00
Willem de Bruijn
b69d27d17e docs: minor updates to x86_64 ubuntu setup instruction 2017-10-17 15:26:15 +02:00
Willem de Bruijn
6a3e678181 sys/linux: add MSG_ZEROCOPY 2017-10-17 15:26:15 +02:00
Dmitry Vyukov
6a06c36fe1 pkg/report: don't use access size for KASAN reports
Including access size potentially leads to failure to deduplicate
reports when size comes from user or for racy bugs (bug is detected
on different accesses depending on timings).
We already drop size from UAF and OOB, drop it for other bug types.
2017-10-17 15:09:01 +02:00
Dmitry Vyukov
a1bdb604cc syz-manager: extend periodic messages
Add coverage and number of reproducing programs to the periodic messages.
When all machines are busy reproducing crashes, it appears that
syz-manager hanged as number of executed programs does not increase.
Coverage is just a nice characteristic.
Also print machine check message, it appears once and contains useful info.
2017-10-17 15:00:01 +02:00
Dmitry Vyukov
038cff25e2 vm/qemu: update error message for newer qemu
Newer qemu prints "Could" instead of "could".
2017-10-17 14:09:37 +02:00
Dmitry Vyukov
493f7afa4b docs: add some info about freebsd 2017-10-17 13:56:29 +02:00
Dmitry Vyukov
3d5e81e280 sys/freebsd: more syscall descriptions
This is mostly copied form linux.
We probably need better support for sharing descriptions
between multiple OSes. But there are lots of differences,
so this is not trivial.
2017-10-17 13:50:05 +02:00
Dmitry Vyukov
766bfcfdd0 Makefile: format akaros descriptions 2017-10-17 11:02:27 +02:00
Dmitry Vyukov
bb146866c0 executor: improvements for akaros
1. remove workaround for pthread attrs (was fixed in akaros)
2. remove workaround for dup2 (was fixed in akaros)
3. check that we receive a program
4. implement timeout for test processes
2017-10-17 10:57:38 +02:00
Dmitry Vyukov
a8a0b01a8b tools/syz-mutate: allow to specify target 2017-10-17 10:54:19 +02:00
Dmitry Vyukov
22279cf815 Makefile: don't string executor
This fails on bots with:

strip --strip-debug ./bin/linux_arm64/syz-executor
strip: Unable to recognise the format of the input file `./bin/linux_arm64/syz-executor'
2017-10-16 20:25:19 +02:00
Dmitry Vyukov
974ad2210c syz-manager: check git revision on start
If we have no git revision, we will fail later anyway.
Better to fail earlier.
2017-10-16 20:21:47 +02:00
Dmitry Vyukov
8793f74c6c sys/fuchsia: more descriptions 2017-10-16 19:23:13 +02:00
Dmitry Vyukov
6222b00f4b sys/fuchsia: minor improvements to syscall descriptions 2017-10-16 15:53:28 +02:00
Dmitry Vyukov
f6cbb2f891 executor: fix fuchsia syz_mmap 2017-10-16 14:58:24 +02:00
Dmitry Vyukov
4a4ad885ab executor: repair fuchsia nonfailing mode 2017-10-16 14:38:09 +02:00
Dmitry Vyukov
17f8d6a03d Makefile: strip executor
We don't generate debug info for Go binaries to reduce their size.
Don't generate debug info for executor as well.
For akaros this reduces binary size from 4.5MB to 800KB.
2017-10-16 14:21:54 +02:00
Dmitry Vyukov
c2337c94bf executor: fix akaros nonfailing mode 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
85b1f93f8d executor, pkg/ipc: unify ipc protocol between linux and other OSes
We currently use more complex and functional protocol on linux,
and a simple ad-hoc protocol on other OSes.
This leads to code duplication in both ipc and executor.
Linux supports coverage, shared memory communication and fork server,
which would also be useful for most other OSes.

Unify communication protocol and parametrize it by
(1) use of shmem or only pipes, (2) use of fork server.

This reduces duplication in ipc and executor and will
allow to support the useful features for other OSes easily.

Finally, this fixes akaros support as it currently uses
syz-stress running on host (linux) and executor running on akaros.
2017-10-16 14:21:54 +02:00
Dmitry Vyukov
f78642861b pkg/csource: support akaros 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
d158fb9d3b executor: add akaros support
Does not work yet, also needs ipc changes.
2017-10-16 14:21:54 +02:00
Dmitry Vyukov
2647772874 sys/akaros: add akaros support 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
aa2533b98d tools/syz-prog2c: allow to specify target OS 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
4a4739bd45 sys/linux: fix fcntl signature 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
63c290f77c pkg/host: add akaros support 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
7553c19941 sys/syz-extract: support akaros 2017-10-16 14:21:54 +02:00
Dmitry Vyukov
fb05d27bb8 executor: pass attr to pthread_mutex/cond_init
pthread_mutex/cond_init should accept NULL attr,
but Akaros crashes with NULL attr:
https://github.com/brho/akaros/issues/40
2017-10-16 14:21:54 +02:00
Dmitry Vyukov
f0565e6231 executor: write debug output to stderr
We print all other output to stderr, write debug output to stderr as well.
This does not matter for the main use case of running syz-execprog -debug,
but can is helpful if we want to communicate with syz-executor via stdin/stdout.
2017-10-16 14:21:54 +02:00
Dmitry Vyukov
9444f97045 tools/syz-stress: allow to specify target OS 2017-10-16 14:21:54 +02:00
Alexander Potapenko
419e3a859c executor: add PC to kcov_comparison_t
KCOV comparisons support is in the kernel mm tree already, and the
patch contains an additional uint64_t to store PCs of functions calling
__sanitizer_cov_trace_XXX().
Change kcov_comparison_t accordingly.
2017-10-16 14:09:52 +02:00
Dmitry Vyukov
66aeb467de pkg/ipc: don't send program padding to executor
Currently we always send 2MB of data to executor in ipc_simple.go.
Send only what's consumed by the program, and don't send the trailing zeros.
Serialized programs usually take only few KBs.
2017-10-12 19:08:18 +02:00
Dmitry Vyukov
81e199f719 sys/syz-extract: support freebsd 2017-10-12 18:16:25 +02:00
Dmitry Vyukov
02a7a54019 sys/syz-extract: factor out compilation function
Each arch duplicates significant portion of logic
to compile the extract source file.
Factor this logic into a separate function and reuse
it across all OSes.
2017-10-12 18:16:25 +02:00
Dmitry Vyukov
95a2bea795 pkg/ipc, pkg/osutil: remove filepath.Abs fuchsia workarounds
This claimed to be fixed:
https://fuchsia.atlassian.net/browse/DNO-158
2017-10-12 10:16:39 +02:00
Dmitry Vyukov
4dc2659337 executor: simple freebsd executor 2017-10-12 10:16:15 +02:00
Dmitry Vyukov
128c09f19d syz-manager: expose raw cover in http handler
This adds /rawcover handler which returns a file with all covered so far PCs, e.g.:

0xffffffff8100763e
0xffffffff81007667
...
0xffffffff8100767d

Useful for offline coverage processing, diffing coverage, etc.
In particular allows to do:

curl http://localhost:1234/rawcover | addr2line -e vmlinux
2017-10-11 22:47:40 +02:00
Andrey Konovalov
f5c3010743 Update found_bugs_usb.md 2017-10-11 12:31:27 +02:00
Dmitry Vyukov
c2aee24101 executor: include missing header
writev requires <sys/uio.h>. Include it.
2017-10-10 19:03:04 +02:00
Dmitry Vyukov
4906c32192 pkg/ipc: extend error when fail to start executor
We currently return raw error, so sometimes it's hard to tell
even what call produced the error (e.g. just "invalid argument").
Extend the error so that it's clear that it comes from cmd.Start.
2017-10-10 18:59:23 +02:00
Dmitry Vyukov
0dbd9145b9 executor: set own PATH when starting subprocesses
Executor process does not have any env, including PATH.
On some distributions, system/shell adds a minimal PATH, on some it does not.
Set own standard PATH to make it work across distributions.
2017-10-10 18:56:11 +02:00
Dmitry Vyukov
817b677396 syz-manager/mgrconfig: add gce examples 2017-10-10 15:47:27 +02:00
Andrey Konovalov
abb0204238 Update found_bugs_usb.md 2017-10-10 15:36:37 +02:00