Commit Graph

49 Commits

Author SHA1 Message Date
Dmitry Vyukov
0d845719c3 syz-manager: move syscall info to a separate page
It's rarely needed. So move from main page.
2018-04-02 20:09:30 +02:00
Dmitry Vyukov
188daeb272 syz-manager: show what crashes are currently being reproduced 2018-04-02 20:09:26 +02:00
Dmitry Vyukov
36d1c4540a all: fix gometalinter warnings
Fix typos, non-canonical code, remove dead code, etc.
2018-03-08 18:48:26 +01:00
Dmitry Vyukov
04cbdbd1ae syz-fuzzer: prioritize signal from successful syscalls
Signal on successful syscalls is more valuable than
signal on unsuccessful syscalls.y
2018-02-20 20:51:41 +01:00
Dmitry Vyukov
26eab5e866 syz-manager: speed up main page rendering
Remove unused calculation of total coverage.
Reduce critical section duration.
2017-12-17 11:39:14 +01:00
Dmitry Vyukov
535474e22e syz-manager: add favicon handler 2017-12-17 11:39:14 +01:00
Dmitry Vyukov
29b0fd90e6 pkg/report: include Maintainers into report
Currently getting a complete report requires a complex,
multi-step dance (including getting information that
external users are not interested in -- guilty file).

Simplify interface down to 2 functions: Parse and Symbolize.
Parse does what it did before, Symbolize symbolizes report
and fills in maintainers. This simplifies both implementations
of Reporter interface and all users of the interface.

Potentially we could get this down to 1 function Parse
that does everything. However, (1) Symbolize can fail,
while Parse cannot, (2) usually we want to ignore (log)
Symbolize errors, but otherwise proceed with the report,
(3) repro does not need symbolization for all but the
last report.
2017-11-29 18:24:30 +01: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
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
Dmitry Vyukov
8f8cf20bd2 syz-manager: make vmlinux optional
It's currently both optional and non optional.
We require it to be non-empty, but at the same time allow fake "-"
which effectively means "no vmlinux". Make it optional.
2017-09-23 10:02:53 +02:00
Dmitry Vyukov
0818340e80 syz-manager: don't take mutex when serving static files
Crash log serving does not touch any manager state.
2017-09-20 14:00:20 +02:00
Dmitry Vyukov
52a33fd516 prog: remove default target and all global state
Now each prog function accepts the desired target explicitly.
No global, implicit state involved.
This is much cleaner and allows cross-OS/arch testing, etc.
2017-09-15 16:02:37 +02:00
Dmitry Vyukov
ffe7e17368 prog, sys: move types to prog
Large overhaul moves syscalls and arg types from sys to prog.
Sys package now depends on prog and contains only generated
descriptions of syscalls.
Introduce prog.Target type that encapsulates all targer properties,
like syscall list, ptr/page size, etc. Also moves OS-dependent pieces
like mmap call generation from prog to sys.

Update #191
2017-09-05 15:52:42 +02:00
Dmitry Vyukov
5db39ab953 sys: rename Call to Syscall
In preparation for moving sys types to prog
to avoid confusion between sys.Call and prog.Call.
2017-09-05 10:38:22 +02:00
Dmitry Vyukov
8af91f61b4 syz-manager, syz-hub: share repros between managers via hub
Currently hub allows managers to exchange programs from corpus.
But reproducers are not exchanged and we don't know if a crash
happens on other managers as well or not.

Allow hub to exchange reproducers.

Reproducers are stored in a separate db file with own sequence numbers.
This allows to throttle distribution of reproducers to managers,
so that they are not overloaded with reproducers and don't lose them on restarts.

Based on patch by Andrey Konovalov:
https://github.com/google/syzkaller/pull/325

Fixes #282
2017-08-07 15:28:59 +02:00
Andrey Konovalov
d1e3265562 syz-manager: don't print empty tag on report page 2017-07-19 17:35:40 +02:00
Andrey Konovalov
f9f0e027d8 syz-manager: fix repro log filename 2017-07-19 17:32:48 +02:00
Dmitry Vyukov
a7785e15ba syz-manager: output maintainers in html reports 2017-06-30 15:09:57 +02:00
Dmitry Vyukov
c2028e38d2 pkg/report: change arg of ExtractGuiltyFile to []byte
We usually store reports as []byte, not as string. They can be large.
So change arg type to []byte.
Also rename it from log to report. In our terminology log is
not symblized/processed crash output. What this function wants
is called report in manager.
2017-06-30 15:09:57 +02:00
Andrey Konovalov
e379542e8b repro, manager: show repro logs and stats on manager dashboard 2017-06-27 16:27:21 +02:00
Dmitry Vyukov
68621900a3 pkg/report: move from report 2017-06-17 14:41:15 +02:00
Dmitry Vyukov
ec95d17c32 pkg/cover: move from cover 2017-06-17 14:41:15 +02:00
Dmitry Vyukov
4cc7e08628 all: use osutil.IsExist instead of os.Stat 2017-06-17 12:23:52 +02:00
Andrey Konovalov
493434090e report: extract guilty file 2017-06-13 19:33:21 +02:00
Dmitry Vyukov
23b94422d3 pkg/log: move from log 2017-06-03 10:41:09 +02:00
Dmitry Vyukov
22361c62e9 manager: collect crash info without holding the global mutex
Crash collection just reads files, so the mutex is unnecessary.
2017-01-30 15:23:29 +01:00
Dmitry Vyukov
8365c3838d all: implement edge coverage
Currently syzkaller uses per-call basic block (BB) coverage.
This change implements edge (not-per-call) coverage.
Edge coverage is more detailed than BB coverage as it captures
not-taken branches, looping, etc. So it provides better feedback signal.
This coverage is now called "signal" throughout the code.
BB code coverage is also collected as it is required for visualisation.
Not doing per-call coverage reduces corpus ~6-7x (from ~35K to ~5K),
this has profound effect on fuzzing efficiency.
2017-01-27 20:46:18 +01:00
Dmitry Vyukov
823604de7e syz-manager: track fuzzing time
Fuzzing time is amount of time we spent actually fuzzing.
It excludes VM creation time, crash reproducing time, etc.
On the other hand it is multipled by number of currently
fuzzing VMs, so it can be larger than uptime time.
2017-01-20 14:56:20 +01:00
Dmitry Vyukov
f6c7b90523 syz-manager: speed up crash reading
Currently we read lots of unnecessary files. This is slow on GCE.
Read only necessary info.
For summary report use on readdirnames (which does not do stat on every file).
For detailed crash report read additional info, but only for this crash.
2017-01-16 21:39:34 +01:00
Dmitry Vyukov
ec9744f3e5 syz-manager, syz-gce: output 20 log lines instead of 50 in web UI
50 lines take too much space, there is scroll bar if necessary.
2017-01-09 20:19:44 +01:00
Dmitry Vyukov
9604794dce manager: reproduce crashes on the fly
With this change manager will run reproduction on crashes
until reproducer is discovered, but at most 3 times.

If reproducer is discovered it is saved with crashes and shown on the web UI.
2016-11-25 11:07:52 +01:00
Andrey Konovalov
5f1dc34693 manager: add empty line before per-call coverage in html 2016-11-22 16:06:49 +01:00
Dmitry Vyukov
128816142c syz-gce,syz-manager: add name config parameter
Name is used for identification on web ui
and included in gce instance names (so that
several managers can coexist in a single project).
2016-11-16 13:19:33 +01:00
Dmitry Vyukov
f5a15094af syz-gce, syz-manager: save image tag in syz-gce, show in syz-manager 2016-10-10 17:32:27 +02:00
Dmitry Vyukov
ef3ee4ad56 manager: minor tweaks to web ui 2016-10-10 13:11:31 +02:00
Dmitry Vyukov
6796d65400 syz-manager, syz-gce: show latest log messages in log textarea 2016-10-10 13:00:27 +02:00
Dmitry Vyukov
1af94b8f0c manager: show cached log in web ui 2016-10-09 11:45:39 +02:00
Dmitry Vyukov
222090e3b4 log: add package
Log is a simple wrapper around std log package.
It is meant to solve 2 main problems:
1. Logging from non-main packages (mainly, vm/* packages).
   Currently they can either always log or not log at all.
   But they can't respect program verbosity setting.
   Log package allows all packages to use the same verbosity setting.
2. Exposing recent logs in html UI.
   Namely we want to tee logs to console and html UI.
2016-10-09 11:27:48 +02:00
Dmitry Vyukov
ff62857ef3 manager: fix html table markup 2016-10-07 09:25:42 +02:00
Dmitry Vyukov
f032ffb788 manager: unify handling of various stats in web ui 2016-10-06 19:53:32 +02:00
Dmitry Vyukov
ec073e08ad manager: show crashes in web ui 2016-10-06 18:48:14 +02:00
Dmitry Vyukov
2bdb521fb0 manager: server http over ipv4
ipv4 is still more prevalent. In particular, GCE does not support ipv6.
2016-10-06 16:22:35 +02:00
Dmitry Vyukov
6b42c2d6da manager: show unique coverage
Add an option to view unique coverage per syscall (i.e. not covered
by any other calls) and unique coverage per-program (not covered by
any other program).
2016-09-06 19:34:55 +02:00
Dmitry Vyukov
96cc1ccc79 manager: measure execution speed starting from first VM connect
Currently execution speed is considerably skewed on start
because we take into account VM boot time.
2016-08-21 19:04:50 -07:00
Dmitry Vyukov
2db4e4554b manager: print keep alive to stdout
Print a message with total number of programs executed every 10 seconds.
Helps to understand if this thing is working or not.
2016-08-05 19:42:24 +02:00
Dmitry Vyukov
862594f1b6 manager: don't confuse users with zero coverage 2016-02-18 21:48:45 +01:00
Dmitry Vyukov
d439da5b7c manager: do GC after cover profile generation
Don't retain more memory than necessary.
2016-02-16 15:07:27 +01:00
Dmitry Vyukov
36b96db4da manager: import net/http/pprof
Also expose how much memory is spent on coverage information.
2016-01-19 12:29:59 +01:00
Dmitry Vyukov
8e7ca7c5ff remove master and naming overhaul
Remove master process entirely, it is not useful in its current form.
We first need to understand what we want from it, and them re-implement it.

Prefix all binaries with syz- to avoid name clashes.
2015-12-17 16:06:33 +01:00