Commit Graph

1755 Commits

Author SHA1 Message Date
Dmitry Vyukov
de212f1a05 dashboard/app: show manager addresses 2017-12-04 12:13:10 +01:00
Dmitry Vyukov
09582d5306 syz-manager: send public web addr to dashboard 2017-12-04 11:58:55 +01:00
Dmitry Vyukov
9118cb4ae2 syz-ci: rebuild syzkaller on restart
Forced syzkaller updates is the main reason for syz-ci restarts.
Reduce syzkaller freshness threshold from 6h to 1m.
Rebuilding syzkaller is relatively cheap anyway.
2017-12-04 11:31:31 +01:00
Dmitry Vyukov
84a6637d28 pkg/report: add fuzz test
Found 3 bugs already.
Update #457
2017-12-04 11:10:12 +01:00
Dmitry Vyukov
7a5e495bdf pkg/report: fix out-of-bounds access
Update #457
2017-12-04 11:04:01 +01:00
Dmitry Vyukov
99ea3eaf5b pkg/report: test that Report is never empty
If Parse detects a crash, it must provide something in the Report field.
If Report is empty, something is wrong with parsing.

Update #457
2017-12-04 10:59:53 +01:00
Dmitry Vyukov
c92879679c pkg/report: extinguish panics
We see panic during report parsing as in #457.
This does not really fix them, but should stop managers crashing.

Update #457
2017-12-04 10:53:25 +01:00
Dmitry Vyukov
f5e771b200 dashboard/app: add drop namespace functionality
dropNamespace drops all entities related to a single namespace.
Use with care. There is no undo.
This functionality is intentionally not connected to any handler.
To use it, first make a backup of the datastore. Then, specify the target
namespace in the ns variable, connect the function to a handler, invoke it
and double check the output. Finally, set dryRun to false and invoke again.
2017-12-04 09:00:36 +01:00
Dmitry Vyukov
96ca35f4c7 dashboard/app: show info about duplicates and similar bugs
Show info about duplicates and similar bugs in other kernels
on the bug page.
2017-12-04 09:00:28 +01:00
Dmitry Vyukov
48359b9777 dashboard/app: improve needRepro
Don't reproduce corrupted reports.
Don't reproduce if canonical bug already has repro.
2017-12-01 17:27:08 +01:00
Dmitry Vyukov
948edf8055 dashboard/app: cosmetic changes to manager stats 2017-12-01 17:13:23 +01:00
Andrey Konovalov
e0375d3ee6 pkg/report: return raw log in Report.Output 2017-12-01 16:16:28 +01:00
Dmitry Vyukov
a6f9669d26 dashboard/app: fix misspelled field in template
Also change code to catch such bugs in tests in future.
The problem was that template.Execute already wrote something
into w before returning error, so though the function
returned an error we served 200 instead of 500.
2017-12-01 14:20:03 +01:00
Dmitry Vyukov
2fa91450df dashboard/app: add manager monitoring
Make it possible to monitor health and operation
of all managers from dashboard.
1. Notify dashboard about internal syz-ci errors
   (currently we don't know when/if they happen).
2. Send statistics from managers to dashboard.
2017-12-01 13:58:11 +01:00
Andrey Konovalov
5683420f11 pkg/report, pkg/repro: fix report parsing
pkg/repro expects pkg/report to return CrashStart index in the whole report,
not only in the kernel output.
2017-12-01 09:15:57 +01:00
Andrey Konovalov
16668351f6 pkg/report: improve task hung report headers 2017-11-30 22:35:35 +01:00
Dmitry Vyukov
5153aeaffd syz-ci: test images before using them
Boot and minimally test images before declaring them as good
and switching to using them.

If image build/boot/test fails, upload report about this to dashboard.
2017-11-30 14:50:50 +01:00
Andrey Konovalov
d5bd1f79fd pkg/report: improve trying to register non-static key header 2017-11-30 11:45:21 +01:00
Dmitry Vyukov
eddaedbb9c tools/syz-crush: fix for new multi-target world 2017-11-30 10:20:34 +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
Andrey Konovalov
46c864566a pkg/report: improve bad unlock balance corruption detection 2017-11-29 15:18:44 +01:00
Dmitry Vyukov
34f2c2332b pkg/report: add Output to Report
Whole raw output is indivisble part of Report,
currently we always pass Output separately along with Report.
Make Output a Report field.

Then, put whole Report into manager Crash and repro context and Result.
There is little point in passing Report as aa bunch of separate fields.
2017-11-29 14:36:51 +01:00
Andrey Konovalov
19d272a98f pkg/report: detect suspicious RCU usage report corruption 2017-11-29 14:26:38 +01:00
Andrey Konovalov
4263b2afbe pkg/report: add sl*b.c to guilty blacklist 2017-11-29 13:45:46 +01:00
Andrey Konovalov
c2a67000b6 pkg/repro: rerun repro when report is corrupted 2017-11-29 13:23:31 +01:00
Dmitry Vyukov
3a80fe350d prog: support bytesizeN for vma
I guess this is currently unused,
but ignoring bytesizeN for vma looks wrong.
If user asks for bytesizeN for vma, divide vma size by N.
2017-11-29 11:12:47 +01:00
Ed Maste
1a6a7478c2 docs: use 'c++' to build on FreeBSD
Building the executor via `gcc executor/executor_freebsd.cc ...`
requires that a GCC package first be installed on the FreeBSD VM image.
The FreeBSD base system comes with Clang already installed, so we can
build via `c++ executor/executor_freebsd.cc ...` and avoid having to
install additional packages.
2017-11-29 08:55:05 +01:00
Dmitry Vyukov
1808de66ce prog: repair arrays/buffers with incorrect size in Deserialize
For string[N] we successfully deserialize a string of any length.
Similarly for a fixed-size array[T, N] we successfully deserialize
an array of any size.
Such programs later crash in foreachSubargOffset because static size
Type.Size() does not match what we've calculated iterating over fields.
The crash happens only in SerializeForExec in syz-fuzzer,
which is especially bad.
Fix this from both sides:
1. Validate sizes of arrays/buffers in Validate.
2. Repair incorrect sizes in Deserialize.
2017-11-28 19:15:28 +01:00
Dmitry Vyukov
e338ada43c dashboard/app: fix purging of old crashes
We sorted by Report (which is a random int ID) instead of ReportLen.
Sort by ReportLen (order is opposite of what of queryCrashesForBug uses).
2017-11-28 17:52:24 +01:00
Andrey Konovalov
7bd85f2aea pkg/report: fix corrupted stack trace detection
Look for stack frames in the next 10 lines after 'Call Trace' instead of 3.
2017-11-28 15:54:13 +01:00
Dmitry Vyukov
ac93d7e1d8 pkg/compiler: add check that len does not refer to array with varlen elements
This [almost] always means a bug in descriptions.
Fix all bugs identified by the check.
2017-11-28 14:55:21 +01:00
Dmitry Vyukov
afba0b55e6 sys/linux: add binder descriptions 2017-11-27 15:09:30 +01:00
Dmitry Vyukov
deb5f6aea2 sys/linux: assorted improvements to descriptions 2017-11-27 09:09:06 +01:00
Dmitry Vyukov
103a5b3fa4 sys/linux: add files from net dir to list of /proc files 2017-11-27 09:09:05 +01:00
Dmitry Vyukov
502d78153c sys/linux: fix control len in msghdr's
Contol len is in bytes, not array elements.
2017-11-27 09:09:03 +01:00
Dmitry Vyukov
473d90487b sys/linux: improve hash generation for KEYCTL_DH_COMPUTE
KEYCTL_DH_COMPUTE used the old fixed list of algorithm names.
Use the new code for algorithm generation.
+ it needs only SHASH algs, but we passed in all alg names.
Pass only SHASH algs.
2017-11-27 09:09:01 +01:00
Dmitry Vyukov
d695195a6b sys/linux: resolve TODO re argument truncation 2017-11-27 09:09:00 +01:00
Dmitry Vyukov
8257de047b sys/linux: open files from /proc 2017-11-27 09:08:59 +01:00
Dmitry Vyukov
bbe60f6cb6 sys/linux: improve fuse descriptions 2017-11-27 09:08:57 +01:00
Dmitry Vyukov
01b82d46ee executor: use /proc/thread-self/fail-nth instead of /proc/self/task/%d/fail-nth
Makes code slightly simpler.
2017-11-27 09:08:56 +01:00
Dmitry Vyukov
4bd70f886b sys/linux: remove crypto algs starting with __
These can't be created from user-space.
2017-11-24 17:50:31 +01:00
Dmitry Vyukov
3bbb8c0b30 sys/linux: prefix non-autogenerated files with init_ 2017-11-24 14:57:38 +01:00
Dmitry Vyukov
ddf7b3e065 sys/linux: improve AF_ALG alg name generation
There is effectively infinite number of possible crypto
algorithm names due to templates. Plus there is tricky
relation between algorithms and algorithm type names.

This change adds custom mutator for sockaddr_alg struct
to improve variance in generated algorithms.
2017-11-24 13:56:20 +01:00
Dmitry Vyukov
d19770f1b9 syz-manager: fix up osutil.RunCmd call
Fixes #435
2017-11-24 13:41:28 +01:00
Dmitry Vyukov
eea051f798 vm/qemu: fix up osutil.RunCmd call 2017-11-24 13:41:08 +01:00
Andrey Konovalov
cb27b030b5
Update found_bugs_usb.md 2017-11-23 17:15:51 +01:00
Andrey Konovalov
5378ce720e
Update found_bugs_usb.md 2017-11-23 17:07:17 +01:00
Andrey Konovalov
6834199b8c pkg/report: various corrupted report detection improvements 2017-11-23 16:17:40 +01:00
Dmitry Vyukov
7061d1973b sys/syz-extract: fix mmap on arm
__NR_mmap is missing on arm entirely,
so we disable mmap during generate.
Patch mmap to mmap2 right in syz-extract,
so that mmap is never missing.
2017-11-23 08:51:04 +01:00
Dmitry Vyukov
31af2ce022 vm/gce: fix boot output capture
Turns out GetSerialPortOutput API does not work if instance has
serial port connections enabled (which we always have).
Get output from serial port relay service instead.
2017-11-22 17:56:48 +01:00