2968 Commits

Author SHA1 Message Date
Bader AlBassam
9aba67b521 Added kernel config options for debian stretch 2018-10-18 14:10:53 +01:00
Nicolas Lacasse
d257b2d2d8 Pass -debug flag to runsc.
As of commit 3f053259, gVisor sentry panics are no longer sent to the
stderr for "runsc run" by default, as that stderr belongs exclusively to
the application.

As a result, syzbot never sees the gVisor panic stack trace, and is only
reporting errors that occur when waiting for a dead sandbox.

Passing the "-debug" flag to runsc will make the sentry panics visible
to syzbot again.
2018-10-17 21:43:37 +02:00
LA
b2695b95a8 Update configuration.md
VM parameters are not defined in config.go, I've found them in qemu.go instead.
Fix for the documentation to make it easier to find all supported parameters for qemu.
2018-10-17 21:14:15 +02:00
Dmitry Vyukov
1ba7fd7e65 all: fix code formatting
Reformat, remove debug leftovers, fix comment style.
2018-10-16 13:57:24 +02:00
Dmitry Vyukov
8cd30605ce tools/create-gce-image.sh: create ext4 image without journalling
We don't need consistent image after reboot since we always reimage.
We know of some use cases that don't use journalling, but don't know
of any that use journalling.
2018-10-15 18:56:55 +02:00
Dmitry Vyukov
6ce17935cb sys/linux: prohibit FAN_OPEN_PERM and FAN_ACCESS_PERM
FAN_OPEN_PERM and FAN_ACCESS_PERM require the program to reply to open requests.
If that does not happen, the program will hang in an unkillable state forever.
See the following bug for details:
https://groups.google.com/d/msg/syzkaller-bugs/pD-vbqJu6U0/kGH30p3lBgAJ
2018-10-15 18:53:00 +02:00
Zach Riggle
caf1290068 Android: Add simple test harness for Sandbox 2018-10-12 16:39:26 +02:00
Zach Riggle
751b7baf94 Android: Fix sandbox implementation
My test harness for this code performed some steps that are not
performed when syz-executor is invoked directy.

Specifcally, we need to operate from a directory under /data/data,
and have the correct UID/GID set as the owner of the directory.

My test harness now correctly sets these, all sandbox operations
succeed, and loop() is invoked.
2018-10-12 16:39:26 +02:00
Anton Lindqvist
6e32776909 docs/openbsd: update found_bugs.md 2018-10-12 16:33:42 +02:00
Dmitry Vyukov
ba6ddb4336 pkg/report: improve OpenBSD output parsing
OpenBSD produces \n\r for new lines and split output at 79 column.
Handle both of these things.
2018-10-11 19:47:32 +02:00
Dmitry Vyukov
98d7e0a90c docs: say that OpenBSD bugs are now reported by syzbot too 2018-10-11 19:47:32 +02:00
Dmitry Vyukov
c3772ff106 pkg/email, pkg/vcs: test that OpenBSD-style commits are handled
OpenBSD does not use "first line is title" convention,
so test that this is parsed properly.
Also test that multi-line fix/dup commands are properly parsed.
2018-10-11 19:47:32 +02:00
Anton Lindqvist
0e1a45faf7 docs/openbsd: use qcow2 disk format in setup 2018-10-11 19:47:20 +02:00
Anton Lindqvist
4b94574dd4 vm/vmm: use derived disks for VMs
As a result, the boot time is significantly improved since there's no longer any
need to copy the complete disk.

This feature was recently committed to OpenBSD-current. Any existing base image
used must be recreated, this time using the qcow2 disk format.
2018-10-11 19:47:20 +02:00
Greg Steuck
42c78641f5 tools/create-openbsd*: Support post-version flip snapshots.
* Fixed pkg_add status checking
  * Switched to qcow2 test image
  * Minor GC
2018-10-11 19:44:34 +02:00
Scott Graham
5f818b4b9f executor: Fuchsia: Use zx_task_resume_from_exception()
zx_task_resume() is deprecated; switch to using
zx_task_resume_from_exception() instead.
2018-10-10 19:45:24 +02:00
Dmitry Vyukov
700f14a4ab
Update setup.md
Update Go instructions for newer toolchain.
GOPATH and GOROOT are now optional, and we also need to add GOPATH/bin to PATH.
2018-10-10 19:38:02 +02:00
Dmitry Vyukov
7241510157
Update contributing.md
fix formatting
2018-10-10 19:26:51 +02:00
Dmitry Vyukov
ba8cd6d708 pkg/report: ignore arch/.*/mm/physaddr.c as guilty file
This is called from kfree in the added test.
We already ignore everything related to kmalloc/free
and e.g. arch/.*/mm/fault.c, so it looks reasonable
to ignore this one too.
2018-10-10 17:32:28 +02:00
Dmitry Vyukov
a9495352a0 pkg/host: improve KMEMLEAK detection
EBUSY is returned when KMEMLEAK is in fact turned off,
not when scanning is already turned off.
That can't be recovered.
So instead check that we can write to the file in the check
function and give useful diagnostics.
2018-10-10 15:38:06 +02:00
Dmitry Vyukov
fefd83bf0b tools/syz-execprog: show host features
syz-execprog -output is handy way to check what features host.Check detects.
2018-10-10 15:36:57 +02:00
Dmitry Vyukov
adedaf77a1 executor: tune memcg container logic
The current memcg container seems to lead to lots of hangs/stalls.
Presumably the problem is with oom_score_adj and KASAN.
Executor process tree eats all memory and then the leaf process is killed
but the memory is not returned to memcg due to KASAN quarantine;
and the parent processes are protected from killing with oom_score_adj=-1000.
As the result the kernel locks up.

1. Don't use oom_score_adj=-1000. Instead bump leaf process score to 1000 (kill always).
2. Increase size of memcg to be larger than expected KASAN quarantine size.
2018-10-10 14:22:09 +02:00
Dmitry Vyukov
1b410967ce syz-manager: don't upload failed leak repro attempts to dashboard
We did not upload the crash itself, so dashboard does not know about them.
2018-10-10 14:04:36 +02:00
Dmitry Vyukov
23454ce6df dashboard/app: make build upload more robust
Currently it triggers datastore timeouts episodically.
Don't fail build upload if bug commit update fails.
Split the large query into two smaller queries.
2018-10-10 14:03:14 +02:00
Dmitry Vyukov
7eaec1b83e dashboard/app: fetch bugs in batches
We are seeing lots of datastore timeout errors during bug fetch.
It's a bad idea to fetch thousands of bugs in one query,
so fetch them in batches of 1000 bugs.
Hopefully will reduce rate of errors.
2018-10-10 13:40:22 +02:00
Julia Hansbrough
5b11ac2c91 Update fidlgen to keep current with upstream.
The Syzkaller IR upstream has been updated, so we can properly update
consts/fidl descriptions now.
2018-10-10 12:00:14 +02:00
Zach Riggle
f37861df63 targets: Use OS=linux when GOOS=android
This avoids the issue of "android" not having any registered configurations
or syscalls / ioctls / etc, when built with GOOS=android.

This occurs when building in Google3, since --config=android_arm64 selects
the Android toolchain.
2018-10-10 11:54:53 +02:00
Kees Cook
8b311eafa7 docs: Update package names for modern Ubuntu
The package names for perf and qemu are out of date. This updates them.
2018-10-03 06:05:00 +02:00
Julia Hansbrough
0f3e026191 Include generate_fidl as part of the extract step.
Anytime we're running `make extract/generate` with Fuchsia as a target, we
probably want to update FIDL descriptions too, so we don't fall behind
what upstream is up to.

This includes generate_fidl as part of the `make extract` workflow.

Also, corrects fidlgenPath to properly find the path for ARM targets (we
only have host_x64 right now).
2018-10-02 20:47:12 +02:00
Alexander Potapenko
a316a2afee kmsan: add kmsan_from_kasan_config.sh to generate KMSAN config 2018-10-02 15:41:28 +02:00
Paul Chaignon
e06f77131b docs: fix typo in reproduction documentation 2018-10-01 16:13:01 +02:00
Dmitry Vyukov
c90dde97ba
Update syzbot.md 2018-10-01 12:07:00 +02:00
Anton Lindqvist
530c6bc32b docs/openbsd: improve setup instructions
The majority of the changes are prodded by Klemens Nanni, another fellow OpenBSD
hacker.
2018-10-01 11:37:27 +02:00
Anton Lindqvist
bb3e4ee68c docs: mention OpenBSD 2018-10-01 11:37:27 +02:00
Greg Steuck
48a50c6b36 doc: Not -> Note 2018-10-01 09:58:57 +02:00
Julia Hansbrough
d7101e2c60 Fix executor build for Fuchsia on ARM, too.
Whups, pissed this in pull request #746.

As before, location of sysroot includes changed, so Fuchsia
cross-compile flags need an update.
2018-10-01 09:57:57 +02:00
Dmitry Vyukov
41e4b32952 pkg/report: ignore printk as guilty file 2018-09-28 16:46:41 +02:00
Dmitry Vyukov
137d7c662e syz-manager: don't send memory leaks without repros to dashboard
KMEMLEAK has lots of false positives and bugs without repros
may be unactionable. It's not completely clear how to handle
such cases in automatic systematic testing.
But let's try this and see how it works.
2018-09-28 15:18:02 +02:00
Dmitry Vyukov
6939672737 dashboard/config: add KMEMLEAK config
Based on KASAN config, but with KASAN and most other debug
configs disabled and KMEMLEAK enabled.
2018-09-28 14:57:20 +02:00
Dmitry Vyukov
7296c0747f pkg/host: improve KMEMLEAK support
Rewind kmemleak fd before reading it second time,
otherwise we will read truncated reports.

Auto-learn what leak reports we've already seen
and ignore them in future. This is required because
there are some false positives and some fire too frequently.
So now we will hit each leak only once per manager run,
but we still will try to reproduce them.
2018-09-28 14:57:20 +02:00
Dmitry Vyukov
a6143bc982 pkg/report: improve KMEMLEAK report parsing
Skip few more common allocation functions.
2018-09-28 14:57:20 +02:00
Dmitry Vyukov
746df66f2c dashboard/config: disable CONFIG_DYNAMIC_DEBUG and CONFIG_BPFILTER
syzkaller manages to turn on dynamic debug messages somehow,
which then produces tons of output on console. Disable dynamic
debug on kasan.
Disable bpfilter on kmsan as we already did on kasan.
2018-09-28 14:57:20 +02:00
Julia Hansbrough
8bb1f0fce1 Fix executor build for Fuchsia.
Location of some sysroot includes changed; ergo, Fuchsia cross-compile
flags need an update.
2018-09-28 11:15:49 +02:00
Greg Steuck
0b624c8069 tools/create-openbsd-*: fully functional images from scratch
* tools/create-openbsd-gce-ci: use config from /syzkaller

* Use syzkaller copy of src instead of a separate one.

* Using /dev/null disk in vm.conf

* Use KVM, enable doas, no longer symlink.

* Use a dummmy.img

* Revert "Use a dummmy.img"

This reverts commit 656b24d5e4573dde5e95c6158852001c7241e65a.
2018-09-28 11:13:51 +02:00
Dmitry Vyukov
0c2fa87bc6 executor: fix build on newer linux distros
This sucks a lot, but ebtables.h is now broken too on Debian 4.17:

ebtables.h: In function ‘ebt_entry_target* ebt_get_target(ebt_entry*)’:
ebtables.h:197:19: error: invalid conversion from ‘void*’ to ‘ebt_entry_target*’
2018-09-27 15:34:52 +02:00
Dmitry Vyukov
98b28ead6c pkg/report: fix few fuzz bugs
Improve go-fuzz fuzzer function and fix few new bugs it finds:
1. Panic in linux parser (bad).
2. Akaros can report empty rep.Report.
3. Fuchsia can return empty rep.Report.
2018-09-27 12:50:25 +02:00
Dmitry Vyukov
58fca249ef sys/linux: add encrypted key instantiation payloads 2018-09-26 15:37:33 +02:00
Dmitry Vyukov
8899d58437 tools/create-gce-image.sh: mount securityfs and configfs 2018-09-26 14:06:11 +02:00
Dmitry Vyukov
881bc4f956 sys/linux: add IMA mount options 2018-09-26 13:50:35 +02:00
Dmitry Vyukov
db716d6653 pkg/report: fix guilty file extraction
Account for the case that some file names can appear _before_ crash report starts.
Start extracting guilty file starting from StartPos.
2018-09-26 12:02:43 +02:00