3066 Commits

Author SHA1 Message Date
Dmitry Vyukov
646afdf841 dashboard/app: enlarge stats value column for manager
When numbers become large, they may not fit into 100px.
2018-11-23 14:44:58 +01:00
Dmitry Vyukov
8eb18c0bbc
docs/linux: update recommended configs
Mention few more tricky kernel configs that cause problems.
2018-11-23 13:44:03 +01:00
msvoelker
0ab8db6467 executor: FreeBSD: fixed endian.h path
The include statement for endian.h failed on FreeBSD. Changed include statement to syz/endian.h for FreeBSD.
2018-11-23 11:50:41 +01:00
Andrey Konovalov
2b0dc848a0 ipc: fix ProgInfo usage better
Fix a bad fix for ProgInfo usage.
2018-11-23 07:17:29 +01:00
Andrey Konovalov
87815d9d32 ipc: fix ProgInfo usage
We used to use len([]CallInfo) to check both, whether the slice is nil or
whether its length is zero. Since ProgInfo is not a slice, we need a
separate check for nil.
2018-11-22 19:30:04 +01:00
Dmitry Vyukov
97aa259615 dashboard/app: show managers per namespaces
End users are interested for managers only for a single namespace.
So show them per-namespace.
2018-11-22 15:07:17 +01:00
Dmitry Vyukov
79d9c3191f dashboard/app: use sort.Slice
Now that GAE provides a newer Go toolchain,
we can use sort.Slice goodness.
2018-11-22 14:43:43 +01:00
Dmitry Vyukov
13ab4beeef syz-manager: modernize web UI
1. Use dashboard style.
2. Allow sorting of tables.
3. Show old crashes in grey.
4. Use tables instead of text output for more pages.
5. Show corpus inputs on a separate page to allow copy-pasting.
6. Use standard JS sorting instead of custom bubble sort (much faster).
7. Fix off-by one in table sorting.

Fixes #694
2018-11-22 14:36:32 +01:00
Andrey Konovalov
582e1f0d1d ipc: add ProgInfo struct
This patch add a new struct ProgInfo that for now holds info about each
call in a program []CallInfo, but in the future will be expanded with remote
coverage info. Update all the callers to use the new interface as well.
2018-11-22 13:49:50 +01:00
Dmitry Vyukov
2ee778023a pkg/report: refine rcu stall detection
Add another anchor frame.
2018-11-22 08:22:30 +01:00
Dmitry Vyukov
ccd67a7611 pkg/report: detect Go service panics for fuchsia 2018-11-22 08:21:45 +01:00
Dmitry Vyukov
6839de7050 pkg/report: fix corrupted stack trace checking
We started detecting all kernel reboots as corrupted,
because we considered that after any "Allocated" line
a stack trace should follow.
Kernel boot output now contains:
ima: Allocated hash algorithm: sha256
and there is no stack trace after that.

1. Refine stack trace regexps (we actually want to look for
"Allocated by task PID:" lines).
2. Don't check stacks if report format says that it
does not contain stacks.
2018-11-22 07:40:50 +01:00
Dmitry Vyukov
76b59936da pkg/report: add "PANIC: double fault" report format
Amusing that's another kernel failure mode that we are discovering after 3 years.
One can't even reliably understand when kernel has crashed.
I wonder if syzkaller never hit these, or just never recognized and reported them. We will see.
Don't even want to think about arm kernel output parsing.
2018-11-22 07:10:16 +01:00
Dmitry Vyukov
9db828b506 dashboard/app: show kernel commit time
Show kernel commit time (author) in a hint for all kernel commit hashes.

Update #473
2018-11-21 11:45:00 +01:00
Dmitry Vyukov
2db497326b
docs: add syz-ci instructions for fuchsia 2018-11-21 11:05:57 +01:00
Dmitry Vyukov
9f6fc500f0 pkg/build: copy fuchsia ssh key
We've lost is somewhere along the way.
2018-11-21 08:16:32 +01:00
Greg Steuck
16ba540df4 Review 2018-11-21 07:27:04 +01:00
Greg Steuck
5cdd8fe0e0 syz-repro: minor UX improvements. 2018-11-21 07:27:04 +01:00
Dmitry Vyukov
2d8316b8fb syz-ci: default kernel branch to master 2018-11-21 07:17:13 +01:00
Marco Vanotti
05817b7b91 docs: Add fuchsia syscall update process.
This commits describes the steps required to update the syscall
descriptions in syzkaller.
2018-11-21 06:12:22 +01:00
Marco Vanotti
d260249e70 sys/fuchsia: update VMAR syscalls
* sys/fuchsia: update vmar syscalls.

In a previous zircon commit[0], the vmar related syscalls (like
`zx_vmar_map`, `zx_vmar_protect` and `zx_vmar_allocate`) changed the
order of their parameters, making putting the flags parameter as the
second parameter, and renaming it to "options".

This commit modifies vmars.txt so that it reflects the latest state of
the syscalls in zircon. I also modified the usage in
`executor/common_fuchsia.h`

I ran make extract, make generate and compiled syzkaller to test this
change.

[0]: https://fuchsia-review.googlesource.com/c/zircon/+/168060

* sys/fuchsia run make generate

This commit is just the result of running make generate after its
parent. This regenerates the definitions for the modified VMAR syscalls.
2018-11-21 05:56:43 +01:00
Greg Steuck
5bb36a9ef8 openbsd: include process information into crashes 2018-11-21 05:52:48 +01:00
Marco Vanotti
5d9a39247f sys/fuchsia: update fidl mappings.
This commit is just a run of make extract + make generate with an up to
date fuchsia tree. This commit only updates the fidl definitions, there
are some other syscalls that had changed and need to be manually updated
(that will come in a future commit).
2018-11-21 05:40:21 +01:00
Andrey Konovalov
5a0d6e039d prog: try to nullify pointers when minimizing
This patch changes minimization routines to try assigning a.Res to nil
for each pointer arg.
2018-11-21 05:30:44 +01:00
Anton Lindqvist
846317099c docs/openbsd: as of OpenBSD 6.4, the console speed defaults to 115200 2018-11-21 05:27:55 +01:00
Anton Lindqvist
fc8f6d862b docs/openbsd: disabling library ASLR can improve VM boot time 2018-11-21 05:27:55 +01:00
Marco Vanotti
37a6ea34f1 pkg/compiler: add error handler in CollectUnused
* pkg/compiler: Add error handler in `CollectUnused`.

This commit adds an error handler for the `CollectUnused` function. The
error handler just panics on any error, but is useful for debugging.

The error handler is used any time `comp` finds an error, and if it's
missing, it will panic due to a `nil` pointer dereference. At least now
we get a better understanding of the errors.

The only user of `CollectUnused` is `sys/fuchsia/fidlgen`, which is
failing now and will be fixed in a future commit.

The output message looks like this:
```
panic: could not collect unused nodes. fidl_net-stack.txt:110:15:
unknown type zx_chan_zircon_ethernet_Device_client
```

* pkg/compiler Better error handling in CollectUnused

This commit changes the default error handler for compiler to
`ast.LoggingHandler`, meaning that if `nil` is passed as an error
handler, `LoggingHandler` will be used instead.

`CollectUnused` now returns an error if any of the subfunctions produce errors.

`fidlgen` is the only caller of `CollectUnused`, and now checks for errors
as well.

* pkg/compiler Add tests for CollectUnused

This commit adds basic tests for the CollectUnused function. There's one
test that checks that it returns the right nodes, and another one that
makes sure that it returns errors when needed.

To make the test clearer, I had to add the error handler as an explicit
parameter in `CollectUnunsed`, instead of using the default one. This
avoid printing garbage in the logs. The `TestCollectUnusedError` function
uses a nopErrorHandler to avoid printing anything.

* pkg/compiler fix presubmit warnings
2018-11-21 02:37:06 +01:00
Marco Vanotti
cb04e409f8 sys/fuchsia: add zircon-ethernet to fidlgen libs
This commits adds "zircon-ethernet" to the list of fidl libraries that
fidlgen would look at. This is required because recently, a change in
fuchsia[0] added a new method to the netstack interface, that allows for
adding an EthernetInterface. One of the parameters is a
zircon.ethernet.Device, so we need to import that type for fidlgen to be
able to understand fidl_net-stack.txt.

I tested this by running:

```shell
$ make extract TARGETOS=fuchsia SOURCEDIR=${FUCHSIADIR}
$ make generate
```

[0]: https://fuchsia-review.googlesource.com/c/zircon/+/220580
2018-11-21 02:33:21 +01:00
Marco Vanotti
3a3d7f11b4 docs: require arm64 build for fuchsia
I am adding a note in the fuchsia docs to specify that the caller should also build fuchsia for arm64. This is because the make extract command will call generate_fidl for TARGETARCH amd64 and arm64. If you happen to have an old tree for arm64, your amd64 changes might be overwritten by the arm64 ones.
2018-11-21 02:31:13 +01:00
Anton Lindqvist
3dedf11685 docs/openbsd: update found_bugs.md 2018-11-20 17:52:36 +01:00
Dmitry Vyukov
9aca6b5240 pkg/vcs: also recognize Tested-by: git commit tags
For context see:
https://groups.google.com/d/msg/syzkaller-bugs/xiSF9GdiikU/uBoyYyf3AQAJ
2018-11-20 14:20:38 +01:00
Sergey Koulikov
1828ebc0fa Fixed a tiny typo 2018-11-20 09:57:43 +01:00
Greg Steuck
9bc2a903f0 openbsd: enable packet injection 2018-11-19 20:29:38 -08:00
Dmitry Vyukov
99721ceaab sys/linux: update test for changed arch_prctl descriptions 2018-11-19 20:26:19 -08:00
Dmitry Vyukov
95866c1a69
docs/syzbot.md: update qemu command line
Match more closely GCE VMs by using scsi drive.
Update command line arguments.
2018-11-18 08:39:01 -08:00
Anton Lindqvist
3659cea21d sys: conditionally add padding argument in MakePosixMmap()
Some targets (NetBSD and OpenBSD) have a mmap() padding argument between the
file descriptor and offset. Make sure to omit such argument in MakePosixMmap().
Otherwise, reproduce programs will crash at runtime since the expected mapping
at 0x20000000 is not established.
2018-11-17 15:50:18 -08:00
Dmitry Vyukov
e17edc6cc4 sys/linux: refine tcp_zerocopy_receive
Use the new vma64 now that we have it.
2018-11-17 15:46:38 -08:00
Dmitry Vyukov
15d00718f7 sys/linux: refine description for PR_SET_MM 2018-11-17 15:46:37 -08:00
Dmitry Vyukov
d8004ff2dc pkg/compiler: add vma64 type
8-byte vma is needed in several places in linux descriptions.
2018-11-17 15:46:37 -08:00
Dmitry Vyukov
993f4bbae0 sys/linux: modernize arch_prctl descriptions 2018-11-17 15:46:37 -08:00
Dmitry Vyukov
1d44216fcf sys/linux: modernize prctl descriptions
Use one syscall per command, refine arguments, etc.
2018-11-17 15:46:37 -08:00
Dmitry Vyukov
1df0de78f9 dashboard/config: add spec_store_bypass_disable=prctl
Opens more interesting kernel surface.
2018-11-17 15:46:36 -08:00
Dmitry Vyukov
69f24bcad6 sys/linux: move prctl to a separate file 2018-11-17 15:46:36 -08:00
Dmitry Vyukov
93ec27acb5 sys/linux: refine tcp repair descriptions 2018-11-17 15:46:36 -08:00
Greg Steuck
538a105600 executor: OpenBSD network package injection
Squash of:

* Doc typo

* Ported some tun related functions.

* Copy vnet.txt from linux to openbsd.

* Simplified syz_emit_ethernet and stubbed out vnet.txt.

* Undo clang-format header sorting: headers are order sensitive.

* Uniquify tap devices by pid.

* clang-format off for includes

* Happier clang-format.

* Partially revert "Uniquify tap devices by pid."

Just rely on procid magic instead of getting it from a flag.
2018-11-17 15:42:37 -08:00
Dmitry Vyukov
adf636a83b tools/syz-fmt: allow to reformat all OSes at once
We forgot trusty in Makefile.
Fix this once and for all by formatting all known targets.
2018-11-17 11:46:48 -08:00
Dmitry Vyukov
d1a8851085 sys/targest: introduce target.BuildOS
We can't cross-compile native binaries from just any OS to any other.
For most OSes we can do only native compilation.
Some can only be compiled from linux.
To date we avoided this problem completely (mostly assumed linux build OS).
Make this notion of what can build what explicit.
2018-11-17 11:42:22 -08:00
Dmitry Vyukov
7d395878aa sys/targets: fix build 2018-11-17 10:35:11 -08:00
Anton Lindqvist
1508cc9c44 pkg/csource: add support for creating reproducers on OpenBSD 2018-11-17 10:32:19 -08:00
Julia Hansbrough
b08ee62aec [fuchsia] SSH fix and build invocation fix.
SSH keys are now included at the fx clean-build config.

A proper escape sequence looked weird so use a string literal to pass
that config.

Fixed some typos I found while debugging.
2018-11-16 11:58:29 -08:00