Commit Graph

1303 Commits

Author SHA1 Message Date
Zubin Mithra
c3631fc789 tools: add headerparser as a tool to assist in writing system call descriptions
The tool can be found inside tools/syz-headerparser. Details on how to use
headerparser can be found inside docs/headerparser_usage.md.
2017-08-25 17:23:52 +02:00
Dmitry Vyukov
3f1aca4826 executor: split a too long line 2017-08-24 10:59:27 +02:00
Dmitry Vyukov
f238fbd42d all: support i386 arch
Update #191
2017-08-19 19:17:27 +02:00
Dmitry Vyukov
6aad5879f7 sys: support arm arch
Not tested, but const extraction and build works.

Update #324
Update #191
2017-08-19 10:41:24 +02:00
Dmitry Vyukov
838e336594 sys, prog: switch values to to uint64
We currently use uintptr for all values.
This won't work for 32-bit archs.
Moreover in some cases we use uintptr but assume
that it is always 64-bits (e.g. in encodingexec).
Switch everything to uint64.

Update #324
2017-08-19 10:16:23 +02:00
Dmitry Vyukov
33b9e777cb syz-manager: remove unnecessary type conversion 2017-08-19 09:58:45 +02:00
Dmitry Vyukov
b19edae954 pkg/kernel: remove unused function 2017-08-18 20:03:52 +02:00
Dmitry Vyukov
13fd8fda08 vm/vmimpl: support linux/arm
Update #324
2017-08-18 19:24:26 +02:00
Dmitry Vyukov
4802b0fb74 sys/syz-sysgen: switch to new parser
For now we just generate the old structs from the new AST.
But this allows to delete the old parser entirely.
2017-08-18 18:47:39 +02:00
Dmitry Vyukov
19b893936b sys/syz-extract: switch to the new parser 2017-08-18 17:04:12 +02:00
Dmitry Vyukov
41bbf437e1 Makefile: enforce formatting of sys files in presubmit 2017-08-18 11:26:50 +02:00
Dmitry Vyukov
5b461e7ecd sys: reformat descriptions 2017-08-18 11:26:50 +02:00
Dmitry Vyukov
127a9c2b65 pkg/ast: new parser for sys descriptions
The old parser in sys/sysparser is too hacky, difficult to extend
and drops debug info too early, so that we can't produce proper error messages.

Add a new parser that is build like a proper language parser
and preserves full debug info for every token.
2017-08-18 11:26:50 +02:00
Dmitry Vyukov
5809a8e057 sys: fix a single case of field starting from a digit
In preparation for a stricter parser.
2017-08-18 11:26:50 +02:00
Dmitry Vyukov
172189e955 dashboard/app: heavylifting of email reporting
- save Message-ID and use In-Reply-To in subsequent messages
- remember additional CC entries added manually
- don't mail to maintainers if maintainers list is empty
- improve mail formatting and add a footer
- implement upstream/fix/dup/invalid commands over email
- add tests
2017-08-17 19:42:11 +02:00
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