1288 Commits

Author SHA1 Message Date
Dmitry Vyukov
2dfba870d0 docs: add landing page for automatically reported bugs 2017-08-17 13:08:38 +02:00
Dmitry Vyukov
f93be58429 sys: add some known xattr names
Move xattr syscalls to own file and better describe xattr names.
They usually have prefix+name structure and there are some
known values.
2017-08-16 13:42:04 +02:00
Dmitry Vyukov
6a0246bf72 prog: simplify code
Result of running gofmt -s.
2017-08-14 14:32:23 +02:00
Dmitry Vyukov
360f05289f sys: describe clone/execve calls
Update #211
Update #310
2017-08-12 17:45:00 +02:00
Dmitry Vyukov
0c986ae9b8 sys: describe chroot/getcwd/chdir/fchdir
Update #211
2017-08-12 17:45:00 +02:00
Dmitry Vyukov
a0330c0f5e tools/create-gce-image.sh: explicitly specify target for grub
On most distributions default grub target is i386-pc, which works.
However, on some default is x86_64-efi, which fails with:

grub-install: error: cannot find EFI directory.

Explicitly specify i386-pc target.
2017-08-11 20:04:33 +02:00
Dmitry Vyukov
7e931278fb .travis.yml: test with Go1.8 2017-08-11 19:05:35 +02:00
Dmitry Vyukov
c34b3819ce dashboard/app: various improvements/fixes for email reporting
Detect when we send first/non-first email for a bug.
Detect when we send moderation/non-moderation email for a bug.
Fix setting repro level in email reports.
Add end-to-end email reporting tests.
2017-08-11 18:33:31 +02:00
Dmitry Vyukov
125de3e4eb dashboard/app: fix build again 2017-08-10 19:34:38 +02:00
Dmitry Vyukov
ab0ced187d tools/syz-benchcmp: add execution speed
Exec total is affected by initial triage/minimize phase,
so two experiments can have the same execution speed
in the stable mode, but have constant diff due to the initial phase.
The one that is higher looks better, but that's not very important.
Provide execution speed characteristic that is not affected
by initial phase. It is not displayed by default.
2017-08-10 19:31:15 +02:00
Dmitry Vyukov
0327584e99 dashboard/app: tell managers when dashboard needs a repro
Managers can't decide when a repro is required.
First, there can be bugs with seq>0.
Second, a repro can be already obtained on another manager.
2017-08-10 19:29:42 +02:00
Dmitry Vyukov
89e74d8ccb dashboard/app: don't print resource for log records
The resource is not informative in this case.
2017-08-10 19:28:37 +02:00
Dmitry Vyukov
4bd26193d8 vendor/golang.org/x/net/context/: fix fmt with Go 1.8
See https://github.com/golang/go/issues/21337
2017-08-10 14:35:07 +02:00
Dmitry Vyukov
32e992a642 dashboard/app: show syzkaller commit for crashes 2017-08-10 13:23:42 +02:00
Dmitry Vyukov
6bf1e337a0 Update executing_syzkaller_programs.md 2017-08-09 16:29:35 +02:00
Dmitry Vyukov
7e288c0531 pkg/repro: minimize fault injection 2017-08-09 15:41:52 +02:00
Dmitry Vyukov
32e29dda2c pkg/repro: fix invalid options minimization
Repro can generate Sandbox="namespace"/UseTmpDir=false.
This combination is broken for two reasons:
 - on second and subsequent executions of the program,
   it fails to create syz-tmp dir
 - with Procs>1, it fails right away, because all procs
   try to create syz-tmp dir

Don't generate such combination.
2017-08-09 15:41:52 +02:00
Dmitry Vyukov
8b78527436 pkg/csource, pkg/repro: filter out invalid options combinations
We currently have 2 invalid options combinations:
 - collide without threads
 - procs>1 without repeat
They are invalid in the sense that result of csource.Write
is the same for them. Filter out these combinations.
This cuts csource testing time in half and reduces repro minimization time.
2017-08-09 15:41:52 +02:00
Dmitry Vyukov
98dd5f9922 sys: commit generated files 2017-08-09 15:41:51 +02:00
Dmitry Vyukov
0a26880b8d sys: fix typo in ETHTOOLGCHANNELS const and diagnose such cases 2017-08-09 11:42:54 +02:00
Dmitry Vyukov
a5c7c2c4bd sys: provide list of intersting MSRs for KVM 2017-08-09 11:35:29 +02:00
Dmitry Vyukov
0939075822 prog: reuse defaultArg
Reuse defaultArg in generateArg. There is code that does the same.
Also, don't generate pointer value for output arguments.
2017-08-09 10:38:38 +02:00
Dmitry Vyukov
9e56135d0d sys: fix recvmmsg signature
recvmmsg has timeout argument.
2017-08-09 10:29:46 +02:00
Dmitry Vyukov
c3ba5e72f5 prog: fix restoration of default arguments
Currently fails on:
 - pointers
 - VMAs
 - structs
 - fixed-size structs
2017-08-09 10:28:10 +02:00
Dmitry Vyukov
0adfdffa82 pkg/log: fix tests with -count>0 2017-08-09 10:24:34 +02:00
Alexander Potapenko
d8b0de2df3 prog: reduce the "uber-mmap" size
During minimization we create a single memory mapping that contains all
the smaller mmap() ranges, so that other mmap() calls can be dropped.
This "uber-mmap" used to start at 0x7f0000000000 regardless of where the
smaller mappings were located. Change its starting address to the
beginning of the first small mmap() range.
2017-08-08 17:57:01 +02:00
Dmitry Vyukov
1db36864e9 dashboard/app: fix build 2017-08-08 17:40:52 +02:00
Dmitry Vyukov
3aabbf13cf dashboard/app: output more info about crashes 2017-08-08 14:31:39 +02:00
Dmitry Vyukov
a3c5751de3 executor: sandbox with RLIMIT_MEMLOCK
Locking memory is a reasonably legitimate local DoS vector.
E.g. bpf maps allow allocation of large chunks of kernel memory
without RLIMIT_MEMLOCK, which leads to hangups.
Set RLIMIT_MEMLOCK=8MB in executor.
2017-08-08 13:24:46 +02:00
Dmitry Vyukov
a48e1ead61 vm/gce: work around GCE console bug
Sometimes connects to serial console spuriously fail with:
Permission denied (publickey)
2017-08-08 11:45:25 +02:00
Dmitry Vyukov
a28999b4c6 vendor: update all packages
google.golang.org/api/compute/v0.beta again changed public interfaces
which causes breakages in other build environments.
Update everything to HEAD.
2017-08-08 10:54:24 +02:00
Emmanuel Odeke
ec649f0f94 .travis.yml: use go1.9rc1 since aliases trip gofmt for vendored code
For https://github.com/golang/go/issues/21337.

Since the introduction of aliases is in Go1.9 but Go1.9 hasn't
yet been officially released, let's use go1.9rc1 which is supported
on Travis CI by their Go version getter gimme
https://github.com/travis-ci/gimme
instead of against go1.8.1. This solves the problem on which
our vendored code is updated using Go1.9* syntax but is running
against Go1.8* in Travis CI tests.
2017-08-08 10:36:11 +02:00
Dmitry Vyukov
77a9ec9ba5 syz-manager: don't ask for repros if reproducing is not enabled 2017-08-07 16:58:18 +02:00
Dmitry Vyukov
a8561e92f3 syz-manager: don't save/send to dashboard repros from hub 2017-08-07 16:40:18 +02:00
Dmitry Vyukov
1e3a94a731 syz-manager: send more info with repros
Leave at least some traces of the original crash
when sending repros to hub.
2017-08-07 15:37:21 +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
Dmitry Vyukov
c7434a4081 sys: improve ipv6 descriptions
1. Use proc type for fragment identifiers.
2. Remove dups from ipv6_types.
3. Fix ipv6_fragment_ext_header layout.
2017-08-07 10:58:51 +02:00
Dmitry Vyukov
d23bf3250e dashboard/app: fix report_failed_repro api call
We are seeing the following errors in this handler:
cross-group transaction need to be explicitly specified, see TransactionOptions.Builder.withXG
2017-08-04 19:19:43 +02:00
Andrey Konovalov
08a7078aab Update linux_kernel_reporting_bugs.md 2017-08-03 19:11:58 +02:00
Andrey Konovalov
35e1c3cdb5 Update linux_kernel_reporting_bugs.md 2017-08-03 14:36:28 +02:00
Dmitry Vyukov
5766dbe796 syz-dash, syz-gce: remove
This is now superseded by dashboard/app and syz-ci.
2017-08-02 19:50:48 +02:00
Alexander Potapenko
695046b738 Merge pull request #320 from ramosian-glider/submit-mmap
prog: don't mutate mmap() calls too often
2017-08-02 08:51:05 -07:00
Dmitry Vyukov
44347e8742 dashboard/app: purge at most 10 crashes at once
We see some episodic
"failed to delete old crash texts: Call error 11: Deadline exceeded (timeout)"
errors in logs.
Deleting at most 10 bugs should be enough since we do this check
after adding each new crash.
2017-08-02 16:37:42 +02:00
Alexander Potapenko
77825d061d prog: don't mutate mmap() calls too often
Due to https://github.com/google/syzkaller/issues/316 there're too many
mmap() calls in the programs, and syzkaller is spending quite a bit of
time mutating them. Most of the time changing mmap() calls won't give
us new coverage, so let's not do it too often.
2017-08-02 16:20:28 +02:00
Dmitry Vyukov
61d1beb284 dashboard/app: new dashboard app
The new app is based on our experience with syz-dash
and is meant to supersede it. This app aims at full
automation of bug lifecycle: reporting, tracking updates,
closing fixed bugs.
The main differences are:
 - this app has support for reporting bugs
   either by email or using an arbitrary external reporting system
 - this app tracks status of bugs
 - this app captures more info about kernel builds
2017-08-02 15:11:03 +02:00
Andrey Konovalov
9c30744297 Merge pull request #302 from xairy/fix-kvm
sys: fix KVM_RUN ioctl
2017-08-01 21:21:33 +02:00
Andrey Konovalov
29ceeb1daf sys: fix KVM_RUN ioctl
KVM_RUN ioctl must have arg set to 0, otherwise it returns EINVAL.

This can lead to syzkaller not able to generate a C repro.
Since arg value is undefined, it might have different values when
executing a program with syz-exeprog vs executing a compiled C repro.
2017-08-01 19:19:05 +02:00
Andrey Konovalov
1517bd9548 prog: generate missing syscall args when decoding
After a change in syscall description the number of syscall arguments
might change and some of the programs in corpus get invalidated.

This change makes syzkaller to generate missing arguments when decoding a
program as an attempt to fix and keep more programs from corpus.
2017-08-01 19:19:05 +02:00
Andrey Konovalov
890882a0cf Merge pull request #317 from xairy/up-fix-result-enc
prog: fix encoding for exec of result args
2017-08-01 18:55:46 +02:00
Andrey Konovalov
1172db0ccf prog: fix encoding for exec of result args
ResultArg might have const value.

Also add a test.
2017-08-01 18:38:20 +02:00