1493 Commits

Author SHA1 Message Date
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
Dmitry Vyukov
3874fcc323 Update setup_linux-host_qemu-vm_arm64-kernel.md 2017-10-10 14:19:49 +02:00
Andrey Konovalov
9a2368f5f5 Update found_bugs_usb.md 2017-10-10 13:31:42 +02:00
Dmitry Vyukov
7dabf63f14 Update setup_linux-host_android-device_arm64-kernel.md 2017-10-10 12:10:38 +02:00
Dmitry Vyukov
354c324465 syz-fuzzer: don't send/check CallIndex for inputs
The call index check episodically fails:

2017/10/02 22:07:32 bad call index 1, calls 1, program:

under unknown circumstances. I've looked at the code again
and don't see where/how we can mess CallIndex.
Added a new test for minimization that especially checks resulting
CallIndex.
It would be good to understand what happens, but we don't have
any reproducers. CallIndex is actually unused at this point.
Manager only needs call name. So remove CallIndex entirely.
2017-10-10 10:41:27 +02:00
Andrey Konovalov
2ef9fcaf18 Update found_bugs_usb.md 2017-10-09 20:01:39 +02:00
Andrey Konovalov
215ea05dec Update found_bugs_usb.md 2017-10-09 19:59:03 +02:00
Andrey Konovalov
6dd3a4f915 Update found_bugs_usb.md 2017-10-09 19:54:44 +02:00
Andrey Konovalov
059272bbad Update found_bugs_usb.md 2017-10-09 14:25:29 +02:00
Andrey Konovalov
fcee0e7996 Update found_bugs_usb.md 2017-10-09 14:17:06 +02:00
Andrey Konovalov
94a4afaf66 Update found_bugs_usb.md 2017-10-09 13:57:44 +02:00
Andrey Konovalov
ff01a7626a Update found_bugs.md 2017-10-09 13:22:15 +02:00
Andrey Konovalov
e3d3993445 Create found_bugs_usb.md 2017-10-09 13:22:01 +02:00
Dmitry Vyukov
179a860885 all: basic freebsd support
For now we just make Go part build for freebsd.
2017-10-02 14:17:32 +02:00
Dmitry Vyukov
5ac303b525 vm/qemu: add freebsd support 2017-10-02 13:57:04 +02:00
Dmitry Vyukov
d49f04b345 tools/syz-prog2c: import targets
Currently syz-prog2c is broken as it does not import any targets.
Import sys package.
2017-10-02 13:57:04 +02:00
Dmitry Vyukov
1cfc524354 syz-fuzzer: use osutil.HandleInterrupts instead of custom code
We already have osutil.HandleInterrupts for this.
Simplifies porting to new OSes.
2017-10-02 13:57:04 +02:00
Dmitry Vyukov
2f204f6b96 Makefile: per-install packages during arch build
We currently build fuzzer+stress+execprog per target,
since packages are not installed we build everything 3 times.
This takes time. Install packages before building binaries.
2017-10-02 13:57:04 +02:00
Dmitry Vyukov
eb97aa0610 executor: support fragmentation in syz_emit_ethernet
A recent linux commit "tun: enable napi_gro_frags() for TUN/TAP driver"
added support for fragmentation when emitting packets via tun.
Support this feature in syz_emit_ethernet.
2017-10-02 13:56:36 +02:00
Andrey Konovalov
ffd2a08fd9 Update found_bugs.md 2017-10-02 13:51:08 +02:00
Dmitry Vyukov
1b68e030d8 sys/fuchsia: add more descriptions 2017-10-02 10:53:28 +02:00
Billy Lau
d335103a64 sys/linux: include additional header to ion.txt
This helps with resolving missing AT_FDCWD const.
2017-09-29 08:51:34 +02:00
Andrey Konovalov
61dd85c0cf Update found_bugs.md 2017-09-28 20:00:43 +02:00
Dmitry Vyukov
8136bdad2f pkg/kd: add KD protocol decoder
Very primitive decoder that only decodes amd64 exceptions.
Use it in vm/gce. Now crashes contain something more or less
reasonable which is caught by manager as crash:

BUG: first chance exception 0x80000003

&kd.stateChange64{state:0x3030, processorLevel:0x6, processor:0x0,
numProcessors:0x2, thread:0xffff9c0bd015e080, pc:0xfffff8017615c380,
exception:kd.exception64{code:0x80000003, flags:0x0, record:0x0,
address:0xfffff8017615c380, numParams:0x1, unused:0x0, params:[15]uint64{
0x0, 0x40, 0xfffff801768699e0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0}, firstChance:0x1}, report:kd.controlReport{
dr6:0xffff0ff0, dr7:0x400, eflags:0x86, numInstr:0x10, reportFlags:0x3,
instr:[16]uint8{0xcc, 0xc3, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xf, 0x1f,
0x84, 0x0, 0x0, 0x0, 0x0, 0x0}, cs:0x10, ds:0x2b, es:0x2b, fs:0x53}}
2017-09-28 16:53:58 +02:00
Dmitry Vyukov
a13111c7f3 docs: assorted windows instructions fixes 2017-09-28 16:53:58 +02:00
Dmitry Vyukov
e0e6908d3f vm/gce: fix GCE image check 2017-09-28 16:53:58 +02:00
Andrey Konovalov
404e0fab59 Update found_bugs.md 2017-09-28 13:39:19 +02:00
Dmitry Vyukov
64b6c0724d sys/windows: add more descriptions 2017-09-27 20:17:09 +02:00
Dmitry Vyukov
9de22c7d8b docs: update syz-stress command line for fuchsia
-cover=0 is the default for syz-stress, remove it.
2017-09-27 19:04:31 +02:00
Dmitry Vyukov
9fc15c7ea3 vm/gce: windows support
Support custom pre-created images.
Support non-root user.
Use dir instead of pwd on windows.
Don't use sudo on windows.
2017-09-27 18:59:50 +02:00