Commit Graph

3853 Commits

Author SHA1 Message Date
Dmitry Vyukov
33a268bd3b
docs: clarify syzbot handling of rebased trees 2019-05-20 18:14:07 +02:00
Greg Steuck
b5641f32bf docs/openbsd: Record gcloud commands used for /syzkaller 2019-05-20 17:59:02 +02:00
Dmitry Vyukov
5a4461b07f pkg/instance: fix types in OverrideVMCount
vmConfig value is interface{}, not string.
So compare with nil and assign int.
2019-05-18 08:41:48 +02:00
Dmitry Vyukov
40046286a4 dashboard/config: disable CONFIG_RETPOLINE
It slows down execution without any benefit for testing.
Who needs security anyways?
2019-05-17 13:21:31 +02:00
Dmitry Vyukov
95dfd515a0 sys/linux: improve binder descriptions
Refine some consts to increase changes of correct programs.
Fix some types. Add comments and a test.
2019-05-17 11:56:54 +02:00
Andrew Donnellan
2755003a34 pkg/report: Label powerpc unreliable stack frames as questionable
Add a second "questionable" regex to match the powerpc "(unreliable)"
format.

Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
2019-05-17 07:15:52 +02:00
Andrew Donnellan
2233782fc1 pkg/report: Add powerpc's __switch_to to function skip list
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
2019-05-17 07:15:52 +02:00
Dmitry Vyukov
7fb690f39a sys/linux: improve binder descriptions
Always pass 3 objects in a transaction.
This allows to specify correct offsets for objects.
Let's see if this improves coverage.
2019-05-16 19:19:25 +02:00
Dmitry Vyukov
c4a2377034 dashboard/config: disable binder debug
Binder is too noisy with debug output.
Still noisy, but this at least removes part of constant output.
2019-05-16 18:56:49 +02:00
Dmitry Vyukov
b1165d81a4 sys/linux: use offsetof in ebtables
Resolve 2 TODOs in ebtables using the new offsetof type.
2019-05-16 18:26:31 +02:00
Dmitry Vyukov
76fc461b55 pkg/compiler: add offsetof type
Similar to C offsetof gives offset of a field
from the beginning of the parent struct.
We have several TODOs in descriptions asking for this.
2019-05-16 18:05:05 +02:00
Alexander Potapenko
f59a9cb554 Rebuild upstream-kmsan.config
Turns out I was using a stale KASAN config which didn't include TOMOYO
bits.
2019-05-16 11:10:34 +02:00
Greg Steuck
051c49fe0d
tools/create-openbsd: valid URIs must use a single slash (#1184)
Triggered by OpenBSD ftp upgrade which isn't looking kindly
at double slahses: https://marc.info/?t=155794126200001&r=1&w=2
2019-05-15 12:08:03 -07:00
Alexander Potapenko
27b25dbc1d util.sh: factor out util_add_extra_syzbot_configs 2019-05-15 16:23:44 +02:00
Alexander Potapenko
692754f1a7 Enable USB fuzzing in KMSAN configs.
This moves the USB-related parts of generate-config-usb.sh to util.sh
and reuses them in generate-config-kmsan-from-kasan.sh.

It also updates upstream-kmsan.config
2019-05-15 16:23:44 +02:00
Dmitry Vyukov
491919b14f pkg/compiler: work around 0-array-size errors due to missing consts
A const can be used as array size. Then if the const is not present
on all arches, compiler will produce an error about 0-sized-array.
There is no easy way to work around this for a user.
Use value of 1 for missing consts. It's just a bit safer.
2019-05-15 13:48:59 +02:00
Dmitry Vyukov
3345130d0f dashboard/config: fix up TOMOYO configs
See https://groups.google.com/d/msg/syzkaller/mODXmnauUZM/nIuyd2M0AAAJ for context.
2019-05-15 11:57:17 +02:00
Dmitry Vyukov
22c391e195 Makefile: switch to golangci-lint
Finally!

Fixes #977
Fixes #1108
2019-05-15 11:39:31 +02:00
Dmitry Vyukov
01d1494471 .golangci.yml: add codeanalysis build tag
Using a build tag to exclude files for golangci-lint
reduces memory consumption (it does not parse them).
The naive attempt with skip-dirs did not work.
So add codeanalysis build tag and use it in auto-generated files.

Update #977
2019-05-15 11:39:31 +02:00
Dmitry Vyukov
bd4e3ac77b prog: fix crash in assignSize on optional pointer 2019-05-14 20:58:33 +02:00
Dmitry Vyukov
2e6300854a sys/linux: improve binder descriptions
Add few new ioctl's. Add some typedefs for clarity.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
c1caccc833 sys/linux: improve key and net_sch descriptions
Use the len paths to resolve pending TODOs.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
2376f0f937 pkg/compiler: allow to refer to syscall arguments in len paths
This allows to use len[syscall:arg] expressions.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
9a4969814e pkg/compiler: refactor len target checking
Create named const for "parent" and move some code into a helper function.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
30e50d7959 sys/akaros: rename syscall argument
In preparation for making syscall a reserved name.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
cd3454ba97 sys/linux: improve btf descriptions
Now that we have the len path expressions we can fix the TODO
in btf descriptions to properly specify offsets of btf sections.

Also add proper descriptions for btf type section
and few other minor things around.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
93dcf0adc8 prog: implement complex len target support
This actually implements support for complex len targets
during program generation and mutation.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
16c881ad85 pkg/compiler: generate complex len targets
Change the generated format for len type to support multiple path elements.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
eea28fee30 pkg/compiler: support complex len targets
This change adds compiler support for complex path
expressions in len targets. E.g. it allows to refer
to a sibling field as len[parent_struct:field:another_field].
See the docs change for details.

This is just a compiler change.
The feature is not yet supported by the prog package.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
1886b2a481 pkg/ast: refactor COLON handling
This prepared for handling of bytesize[parent:foo:bar] expressions
by allowing multiple identifiers after colon.
No functional changes for now, just preparation for storing more
than one identifier after colon.
2019-05-14 19:28:01 +02:00
Dmitry Vyukov
354b388e08 sys/test: remove a leftover file 2019-05-14 19:28:01 +02:00
Andrey Konovalov
99688eaaba dashboard: remove COMPILE_TEST from USB config
It forces DEBUG_INFO to be disabled.
2019-05-14 14:36:57 +02:00
Andrey Konovalov
9251289f14
Update README.md 2019-05-14 14:31:21 +02:00
Anton Lindqvist
ada3c44cd1 sys/openbsd: prevent changing mutability flags on files (#1174)
This is especially problematic for file descriptors referring to tty/pty
devices since it can cause the SSH connection to the VM to die.

The ambition here is reduce the number of "lost connection/no output" failures
at the cost of limiting the coverage of chflags(2).
2019-05-13 18:14:26 -07:00
Mark Johnston
658d756383 vm/bhyve: ensure the VM is destroyed after closing 2019-05-13 20:23:56 -04:00
Andrey Konovalov
7c305b440c dashboard: add scripts for generating USB kernel configs
This is done via a custom Kconfiglib based script, that allows to merge
in all USB configs from a provided one into the current. The script finds
and enabled all USB configs and their dependencies.
2019-05-13 17:10:34 +02:00
Dmitry Vyukov
69423a1d41 pkg/email: allow commands in subject
Several users attempted this and there does not seem
to be any reason to not allow this.
So parse out command from subject as well.
2019-05-13 14:15:14 +02:00
Dmitry Vyukov
92d5fb8ed3 tools/syz-bisect: add usage docs 2019-05-13 13:04:01 +02:00
Dmitry Vyukov
000f08bb18 sys/linux: switch ppc64le to little-endian
make extract recently broke for powerpc on linux-next with:

include/uapi/linux/byteorder/big_endian.h:6:2: error: #error "Unsupported endianness, check your toolchain"
 #error "Unsupported endianness, check your toolchain"

Turns out we always built ppc64le headers as big-endian.
First, kernel was configured as BE.
Then, we used gcc to build an executable program for host
and on x86 gcc does not define __LITTLE_ENDIAN__ so kernel
thought that the toolchain is BE too.

Configure kernel as LE and define __LITTLE_ENDIAN__.

This actually changes values of some consts,
but fortunately just few of them.
2019-05-13 10:26:57 +02:00
Dmitry Vyukov
aa8482aa8a dashboard/config: enable CONFIG_SECURITY_TOMOYO_INSECURE_BUILTIN_SETTING
This allows to enable and test TOMOYO without an external policy (which we don't have).
2019-05-13 09:31:11 +02:00
Greg Steuck
ddba9a616e
pkg/instance: break the line to appease linter (#1173)
* pkg/instance: break the line to appease linter

* fix up format
2019-05-12 23:38:17 -07:00
Anton Lindqvist
16ab1e89e3 docs/openbsd: update found_bugs.md (#1172) 2019-05-12 12:32:12 -07:00
Anton Lindqvist
5f302c04a2 sys/openbsd: add missing padding arguments
Due to missing padding arguments, stack garbage could end up being used as
actual arguments. More reading for the curious[1].

While here, add missing descriptions for pread and pwrite.

[1] https://flak.tedunangst.com/post/syzkaller-found-a-bug
2019-05-12 14:03:04 +02:00
Dmitry Vyukov
45065351dd syz-ci: fix variable shadowing
gometalinter says:
syz-ci/jobs.go:516:⚠️ declaration of "rep" shadows declaration at syz-ci/jobs.go:505 (vetshadow)
2019-05-12 11:42:33 +02:00
Dmitry Vyukov
39449875b6 syz-ci: don't assume kernel config is called .config
.config is linux-ism. We have a convention that kernel config
is copied to kernel.config file. Use it.
2019-05-12 11:38:18 +02:00
Anton Lindqvist
c017728b48 sys/openbsd: avoid raw root disk node creation (#1171)
Writing to the raw root disk could lead to all kinds of corruptions[1].

[1] https://flak.tedunangst.com/post/syzkaller-found-a-bug
2019-05-11 13:10:47 -07:00
Mark Johnston
0637a7f088 Add a bhyve VM backend (#1150)
* vm: add bhyve support

bhyve is FreeBSD's native hypervisor.  Because it is missing snapshot
support and user networking, some additional configuration on the host
is required.  However, unlike QEMU on FreeBSD, bhyve can make use of
hardware virtualization features and is thus faster.

* docs/freebsd: document bhyve support
2019-05-11 19:38:53 +02:00
Dmitry Vyukov
46caad9460 sys/linux: add few new bpf consts 2019-05-10 15:39:27 +02:00
Dmitry Vyukov
16c44697b5 sys/linux: add definitions of fsopen, fspick, fsconfig, fsmount, move_mount syscalls 2019-05-10 15:21:16 +02:00
Dmitry Vyukov
cfeec85937 sys/linux: add new consts/flags/fields here and there
Add a bunch of new small interfaces in 5.2: new consts, flags, fields, etc.
2019-05-10 14:31:20 +02:00