Commit Graph

3035 Commits

Author SHA1 Message Date
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
Dmitry Vyukov
9cfaaac9b8 .gometalinter.json: ignore sys/trusty 2018-11-10 10:38:36 -08:00
Dmitry Vyukov
f9815aaf4a
docs/research.md: add Charm 2018-11-09 10:22:26 -08:00
Dmitry Vyukov
8fd01d3a5b
Update found_bugs.md 2018-11-08 20:15:42 -08:00
Dmitry Vyukov
89a1588519 sys: disable trusty for now
It crashes pkg/csource tests because
it does not have syz_mmap syscall but tries to use it.
2018-11-08 20:14:05 -08:00
Dmitry Vyukov
0d872150de sys: initial trusty support
Trusty is a set of software components supporting
a Trusted Execution Environment (TEE) on mobile devices.

https://source.android.com/security/trusty

Add syscall descriptions and some boilerplate.
2018-11-07 17:52:06 -08:00
Dmitry Vyukov
e85d2a6170
Update found_bugs.md 2018-11-07 07:34:28 -08:00
Dmitry Vyukov
8bd6bd6365 prog: allow escaping paths but don't generate them
Filename generated escaping paths in the past.
The reason for the check during validation is to
wipe old program from corpuses. Now that they are
hopefully wiped everywhere, we can relax the check
to restrict only filename to not produce escaping paths,
but allow existing programs with escaping paths.
This is useful in particular if we generate syzkaller
programs from strace output.
2018-11-02 17:31:59 +01:00
Dmitry Vyukov
1f38e9aef7 executor: fix inclusion of kvm arch-specific code
We use GOOS now to figure out target arch
(which can be different from host arch).
2018-10-31 13:43:54 +01:00
Dmitry Vyukov
8978109043
Update found_bugs.md 2018-10-31 12:05:49 +01:00
Dmitry Vyukov
4ccf7bb438 sys/linux: limit init_module size argument
Kernel tries to vmalloc whatever we pass as size and it's not accounted against memcg.
As the result it can lead to massive OOM kills of everything running on the machine.
Strictly saying, the same applies to finit_module with a sparse file too,
but there is no simple way to handle that.
2018-10-30 17:42:18 +01:00
shankarapailoor
06a012d997 sys/linux: adding constants for trace2syz to sockets 2018-10-30 17:18:39 +01:00
shankarapailoor
72add0ff6f sys/linux: add perf, kvm, btrfs consts for trace2syz 2018-10-30 14:04:49 +01:00
Shankara Pailoor
8dbb755a2e sys/linux: add additional constants for trace2syz to bpf
Fixes #783
2018-10-30 11:31:42 +01:00
Dmitry Vyukov
12b38f22c1 sys/linux: fix up descriptions
1. Extract consts on the latest linux tree.
2. Don't manually define O_TMPFILE/O_ACCMODE/_LINUX_CAPABILITY_VERSION_N,
   they are defined in kernel headers.
3. Don't use CLOCK_SGI_CYCLE as clock id, it's not implemented.
2018-10-30 11:15:50 +01:00
shankarapailoor
362ef76397 sys/linux: add additional constants for trace2syz 2018-10-30 10:58:45 +01:00
Greg Steuck
2f1090dacd sys/openbsd: added minherit, extended/simplified mmap
* sys/openbsd: added minherit, extended/simplified mmap.

Added a script from anton_at_openbsd.org for regenerating syscalls.

Generated by ksh ./sys/openbsd/extract-openbsd.sh

* Undo whitespace change not passing on CI

* No need for magic script.
2018-10-29 18:59:16 +01:00
Dmitry Vyukov
fe65cc88ce sys/linux: fix SIOCGIFCONF const 2018-10-29 15:06:53 +01:00
Dmitry Vyukov
b36409b288 sys/linux: fix IP6T_SO_GET_INFO const
Fix copy-paste error.
2018-10-29 14:57:43 +01:00