3717 Commits

Author SHA1 Message Date
Dmitry Vyukov
4398bd5e97 pkg/build: detect "Permission denied" as build error
This happens when compiler has bad permissions.
2019-04-09 18:38:04 +02:00
Andrey Konovalov
4e3011def6 dashboard: add USB cmdline and config 2019-04-09 18:37:45 +02:00
Dmitry Vyukov
91d50a67cc dashboard/app: add new favicon
Add syzbot favicon and log.
Authored by Tetsuo Handa.
2019-04-09 11:15:16 +02:00
Andrey Konovalov
5c51045d28 all: add optional close_fds feature to reproducers
Instead of always closing open fds (number 3 to 30) after each program,
add an options called EnableCloseFds. It can be passed to syz-execprog,
syz-prog2c and syz-stress via the -enable and -disable flags. Set the
default value to true. Also minimize C repros over it, except for when
repeat is enabled.
2019-04-09 10:53:11 +02:00
Andrey Konovalov
e619f52452 csource: use /*FOO*/ instead of [[FOO]]
The latter differently confuses different versions of clang-format.
2019-04-09 10:53:11 +02:00
Dmitry Vyukov
995065ff41 syz-ci: enable bisection debugging
Temporary enable bisection debugging because there are some unexplainable things happen.
2019-04-08 18:48:45 +02:00
Dmitry Vyukov
0dfb045226 tools/syz-benchcmp: update name of coverage stat 2019-04-08 15:10:07 +02:00
Dmitry Vyukov
798a29ec91 pkg/html: regenerate 2019-04-08 15:08:24 +02:00
Dmitry Vyukov
3ef496b7ba dashboard/app: split dashboard per-namespace
We now have too many namespaces and bugs.
Main page takes infinity to load.
Also almost nobody is interested in more than 1 namespace.
So split main page per-namespaces.
2019-04-08 14:32:32 +02:00
Yu Hao
c34fde03ec Fixed a tiny typo (#1114) 2019-04-05 16:46:14 -07:00
Anton Lindqvist
2fbd3aa904 dashboard/config: enable POOL_DEBUG on OpenBSD (#1113)
POOL_DEBUG is disabled during release, but we want it unconditionally
enabled.
2019-04-05 16:44:34 -07:00
Dmitry Vyukov
fa763482c3 dashboard/app: add admin page
Add /admin page and move logs, jobs, manager onto it.
The main page is too overloaded and takes too long to load.
We need to start splitting it. This is a first step.
2019-04-05 17:56:42 +02:00
Andrey Konovalov
ecbfbf0bcf pkg/host: move kallsyms parsing test to host_linux_test.go 2019-04-05 14:24:58 +02:00
Cody Holliday
40f2363e80 pkg/host: enable kallsyms parsing on arm
pkg/host/host_linux.go: Add "arm" to kallsyms support test.
pkg/host/host_test.go: TestKallsymsParse(): Add entry to test arm kallsyms parsing support.
2019-04-05 11:15:48 +02:00
Anton Lindqvist
5701183bd3 sys/openbsd: add pci descriptions 2019-04-05 10:22:46 +02:00
Dmitry Vyukov
3635d6e678 pkg/report: refine hung task processing for v4.15 2019-04-05 08:52:19 +02:00
Dmitry Vyukov
ba27bbab87 pkg/report: add a test for .PID removal 2019-04-05 08:47:46 +02:00
Dmitry Vyukov
c3d7012379 pkg/report: remove .PID from syz-executor
pkg/ipc changed format of binaries, but pkg/report wasn't updated.
Update pkg/report for the new format.
2019-04-05 08:45:44 +02:00
Dmitry Vyukov
dae7a62f02 pkg/build: extract first build error instead of last
The first error is usually more informative and significant.
Extract first error instead of last.
2019-04-05 08:40:36 +02:00
Cody Holliday
e5d1b3ac44 sys/targets: fix arm target compiler prefix
sys/targets/targets.go: Change 'arm-linux-gnueabihf-' to 'arm-linux-gnueabi-' in the arm target since target ISA is armv6 and armhf is armv7+.
2019-04-04 14:57:50 +02:00
Andrey Konovalov
1ee782d53c host: add kallsyms parsing tests
Start with a few simple tests that can be extended when needed.
2019-04-04 14:56:48 +02:00
Marco Vanotti
6a475fffec executor: move syz_execute_func after os imports. (#1107)
This commit moves the definition of the `syz_execute_func` after the
block of code that imports all the OS specific common headers.

This is required because after commit
dfd3394d42ddd333c68cf355273b312da8c65a51 `syz_execute_func` started
using the `NONFAILING` macro, which is defined in those header files for
each OS.

I also ran `make generate`.

TEST=I only tested that the executor works for Fuchsia with:

```shell
$ make executor TARGETOS=fuchsia TARGETARCH=amd64 SOURCEDIR=~/fuchsia
```
2019-04-03 16:46:38 -07:00
Marco Vanotti
8658c25622 executor: don't fallthrough in switches in fuchsia (#1103)
This commit modifies the common_fuchsia.h file changing the behavior of
the `syz_future_time function`. Before, the function used to have a switch
case that would fallthrough, making it always set the delta_ms to 10000.
The fix is to add a `break;` statement after each switch case.
2019-04-03 15:48:43 -07:00
Marco Vanotti
ce4e53939e Makefile: change go binary path for fuchsia. (#1102)
Recently[0][1], fuchsia moved some of the tools out of `//scripts`, into the
`//tools` directory. The go script was moved into
`//tools/devshell/contrib/go`.

This commit modifies the Makefile so that it references to the new go
binary.

[0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/267708/
[1]: https://fuchsia-review.googlesource.com/c/fuchsia/+/267908/
2019-04-03 15:44:56 -07:00
Marco Vanotti
26cbbd042a pkg/ipc: use /data/ for storage in fuchsia. (#1101)
We cannot create folders in other directories anymore, for now, we only
have access to create directories in /data/. This change is temporary as
we move to a component-based world.
2019-04-03 15:44:27 -07:00
Marco Vanotti
4949990eea sys/fuchsia: Remove object_*_cookie syscalls. (#1099)
Those syscalls were removed from Zircon in a recent CL[0].

This commit runs make extract && make generate to update syscalls and
fidl interfaces.

[0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/249349
2019-04-03 15:30:56 -07:00
Anton Lindqvist
d6fc4177b7 docs/openbsd: update found_bugs.md (#1106) 2019-04-03 14:57:14 -07:00
Dmitry Vyukov
dfd3394d42 executor: try to prevent machine outbreak
The fuzzer gained control over host machines again with something like:

syz_execute_func(&(0x7f00000000c0)="c4827d5a6e0d5e57c3c3b7d95a91914e424a2664f0ff065b460f343030062e67660f50e900004681e400000100440fe531feabc4aba39d6c450754ddea420fae9972b571112d02")

Let's see if perturbing syz_execute_func a bit and wiping registers
will stop the outbreak.
2019-04-02 13:43:46 +02:00
Dmitry Vyukov
3f57b235da syz-fuzzer: fix logging of number of enabled syscalls 2019-04-02 13:43:18 +02:00
Dmitry Vyukov
a9ca43d41c pkg/report: add another linux test 2019-04-01 14:49:28 +02:00
Dmitry Vyukov
ca14bc89c0 pkg/build: increase gvosir build timeout
The 1 hour timeout is quite high. But we've seen false positives with 20 mins
on the first build after bazel/deps update. Also other gvisor instances running
on the same machine contribute to longer build times.
2019-04-01 14:23:09 +02:00
Dmitry Vyukov
9e381a42d3 pkg/gce: poll for operation completion less frequently
We are hitting quotas for operation completion polling.
Not surprising since we create/delete instances all the time.
Slightly decrease rate of polling.
2019-04-01 14:16:54 +02:00
Dmitry Vyukov
162bd26be4 pkg/compiler: make buffer alias to ptr[array[int8]]
Ptr type has special handling of direction (pointers are always input).
But buffer type missed this special case all the time.
Make buffer less special by aliasing to the ptr[array[int8]] type.
As the result buffer type can't have optional trailing "opt" attribute
because we don't have such support for templates yet.
Change such cases to use ptr type directly.

Fixes #1097
2019-04-01 12:46:10 +02:00
Anton Lindqvist
3e1cf9ad8a executor: connect tun and bpf devices on OpenBSD 2019-04-01 12:39:02 +02:00
Anton Lindqvist
4ba360c5fb sys/openbsd: add common ioctl() commands 2019-04-01 12:39:02 +02:00
Dmitry Vyukov
44fe9159be prog/test: rename prog/fuzz to prog/test
gometalinter complained about fuzz.FuzzFoo names,
but go-fuzz now requires all fuzz functions to start with Fuzz.
So move the package to prog/test.
2019-04-01 12:20:19 +02:00
Heyuan
36b433b718 Update setup.md
svn commit 231296 matches commit d29e939c63b71 ("Add fuzzing coverage support") in the gcc git. The change is part of gcc 6.1.0.
Replace the svn commit number with a gcc version which everyone can easily compare.
Related links: 58f4df3c1b (diff-4552954e64a20391a1a3b5fd3e494bc3)
2019-04-01 11:20:51 +02:00
Anton Lindqvist
ccf2355a32 docs/openbsd: update found_bugs.md (#1096) 2019-03-31 15:05:13 -07:00
Anton Lindqvist
0c624d4d49 docs/openbsd: update found_bugs.md (#1095) 2019-03-30 12:45:02 -07:00
Dmitry Vyukov
c35ee0ea6d prog, pkg/compiler: fix warnings
gometalinter says:

pkg/compiler/consts.go:192:⚠️ internal error: no range for "n" (vetshadow)
pkg/compiler/consts.go:197:⚠️ internal error: no range for "n" (vetshadow)
prog/encoding.go:862:⚠️ declaration of "v" shadows declaration at prog/encoding.go:852 (vetshadow)

This somehow happens only with Go1.11 but not 1.12 so wasn't detected locally.
The prog warnings looks legit.
The pkg/compiler warning was amusingly introduced to please golangci-lint checker,
revert that fix for now.
2019-03-29 19:04:30 +01:00
Alexander Popov
babbf71b14 syz-repro: print detailed listings
Final reproducers are crafty. Sometimes they just stop working.
In that case the detailed listings of the programs executed by syz-repro
are very helpful. Let's print them at the loglevel 3.
2019-03-29 18:18:41 +01:00
Dmitry Vyukov
9028d21e52 syz-ci: put build error reason into report
We inline Report in bug reports, so put the build error reason there.
Should produce much handier reports.
2019-03-29 11:14:10 +01:00
Dmitry Vyukov
faba132374 pkg/build: shutdown bazel in case of errors too 2019-03-29 11:05:35 +01:00
Dmitry Vyukov
9633c5c8a1 pkg/build: extract bazel build errors
We currently manually call extractRootCause in few selected places
to denote kernel build errors that we want to report to developers.
The rest are considered infra errors that we don't report.
This does not work well. We are missing fuchsia and gvisor build errors.
Treat all external command exection failures as kernel build errors instead.
Let's see how this works in practice.
Also add bazel-specfic error patterns and tests.
2019-03-29 11:00:34 +01:00
Dmitry Vyukov
6b138f0f3c pkg/report: work around GCE console bugs 2019-03-29 09:40:31 +01:00
Dmitry Vyukov
698a192c6d dashboard/app: don't error on invalid emails
Malformed emails constantly appear from spammers.
But we have not seen errors parsing legit emails.
These errors are annoying. Warn and ignore them.
2019-03-29 08:56:02 +01:00
Dmitry Vyukov
c84501fe70 prog: fix a bunch of bugs in parsing
Add fuzzer for Deserialize and fix 5 or so bugs it found.

Fixes #1086
2019-03-29 08:56:02 +01:00
Anton Lindqvist
98c1bf1cfb sys/openbsd: add bpf descriptions 2019-03-29 08:51:39 +01:00
houjingyi
934bb8cade modify 2019-03-29 07:47:14 +01:00
Marco Vanotti
e825006ce0 pkg/build: Add ssh tools for fuchsia.
This commit adds the "//bundles:tools" packages to the fuchsia build
used for syzkaller. This includes ssh tools, which includes scp.

TEST=I have tested this on syz-ci. Fuchsia is now able to pass the image
test.
2019-03-29 07:41:51 +01:00