3303 Commits

Author SHA1 Message Date
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
Anton Lindqvist
f5e275d1d9 vm/vmm: make sure to always end ddb commands with a newline
Missed one in my previous commit.
2018-11-15 14:28:30 -08:00
Dmitry Vyukov
58fb30b383 dashboard/config: enable more drm configs
There are 2 important virtual drm drivers:

CONFIG_DRM_VKMS
CONFIG_DRM_VGEM

VGEM was already enabled, enable VKMS.
Also enable few other configs that look like
we can potentially reach them.
2018-11-15 14:20:49 -08:00
Julia Hansbrough
3a41052e6a [fuchsia] Fix typo in Fuchsia build.
Hey--so I *don't* know a particularly efficient way to test syz-ci right
now.

There's no good config I can find for just running it locally, and I
couldn't find any good unit tests for this function in particular, and
running it manually on a ci server isn't super-appealing since I'd have
to clobber the configuration there to point to my repo instead of the
canonical repo, pull from there, etc.

Do you have any good ideas for testing this before it rolls out?  In
particular I want the invocation to look exactly like:

./scripts/fx set x64 --packages garnet/packages/products/sshd --args 'extra_authorized_keys_file="//.ssh/authorized_keys"'

I thought I'd escaped it properly last time, but, since I couldn't test
it, clearly I goofed.  I *think* this does the right thing but I'd love
a sanity check.  Thanks!
2018-11-15 09:31:46 -08:00
Julia Hansbrough
5f5f6d14e8 [fuchsia] Fix Fuchsia build.
* Needed to clean out the build on the main host. We switched to a
"petal" layout which required a complete rebuild.

* Update SSH interface.  SSH keys have to be set at buildtime via
--args.

* Update fvm.blk location.
2018-11-12 19:07:01 -08:00
Shankara Pailoor
4fc13fd6ae 1) making bpf_insn varlen, 2) changing bpf_generic to match the struct definition in linux to make trace2syz generation simpler 2018-11-12 12:41:37 -08:00
Anton Lindqvist
d55a06c0bf pkg/report: do not interpret reorder_kernel lines as a crash on OpenBSD
Sometimes the reorder_kernel error message is truncated causing the current
ignore pattern to fail. Instead, simply reject all lines containing
`reorder_kernel' in order to reduce noisy crash reports.
2018-11-12 12:34:06 -08:00
Dmitry Vyukov
e8722ddd83 syz-manager: fix syscall prio page
It currently crashes as we never populate mgr.prios now.
Calculate prios on the fly instead.

Fixes #797
2018-11-12 12:27:34 -08:00
Anton Lindqvist
74dbb80644 vm/vmm: disable pagination and show panic in Diagnose()
The ddb(4) debugger defaults to showing 24 lines at a time, the next chunk of
lines will be displayed only after receiving keyboard input. Setting maxlines to
0 disables pagination completely.
2018-11-12 12:03:13 -08:00
Anton Lindqvist
7b5f86212c docs/openbsd: bash is no longer needed 2018-11-11 08:38:30 -08:00
Dmitry Vyukov
f3c4e61859 sys/linux: add vimc/vivid/vim2m/vicodec/swradio/radio/vbi/cec devices
Create planar and non-planar vivid devices.
Create each for each test process.
Add swradio/radio/vbi/cec media devices.
2018-11-10 10:38:39 -08:00
Dmitry Vyukov
eee19d60c2 dashboard/config: update configs to latest kernel 2018-11-10 10:38:38 -08:00
Dmitry Vyukov
34c048c0d8 sys/linux: add /dev/dlm* devices 2018-11-10 10:38:38 -08:00
Dmitry Vyukov
4d2f7ff6a5 sys/linux: regenerate on latest kernel 2018-11-10 10:38:37 -08:00