Commit Graph

3406 Commits

Author SHA1 Message Date
Dmitry Vyukov
fa6c7b7080 sys/linux: prohibit opening /proc/self/exe
Fuzzer manages to open it and do bad things with it.
Prevent it from doing so.
2019-02-08 16:30:44 +01:00
Dmitry Vyukov
381ccbf2f8 pkg/ipc: generate better temp name for executor
Just appending the pid number can produce conflicting names
if the name itself ends with digits (standard temp file naming convention).
So append ".PID".
Also remove beginning from too long names instead of ending.
Temp files in tests has unique numbers at the end, we need to preserve them
to avoid file name conflicts.
2019-02-08 16:27:53 +01:00
Dmitry Vyukov
78a290863d pkg/runtest: run syz tests in non-repeat mode
Turns out it can affect some tests,
e.g. some things manifest only after executor restart
(executor binary marked as non-executable by the test).
2019-02-08 16:27:53 +01:00
Dmitry Vyukov
8c1621bede sys/linux: prohibit EXT4_IOC_RESIZE_FS
When we run with sandbox=none, test program can do EXT4_IOC_RESIZE_FS which
shrinks rootfs basically to 0. This breaks the machine as all tests then fail with:

failed to create temp dir: mkdir syzkaller-testdir077269498: no space left on device

This is the most common source of "lost connection" crashes overall and
they are not actually kernel bugs.

Prohibit EXT4_IOC_RESIZE_FS for now.
Alternatively we can mount tmpfs with sandbox=none.

Update #971
2019-02-08 09:29:15 +01:00
Dmitry Vyukov
aa4feb0329 sys/linux: extend key descriptions 2019-02-07 09:39:35 +01:00
Dmitry Vyukov
cd7a3c250f sys/linux: move {i,fa}notify into own files 2019-02-07 09:39:35 +01:00
Marco Vanotti
d25487bc2e sys/fuchsia: fix fidlgen issues
* sys/fuchsia: fix fidlgen issues.

This change modifies fidlgen removing fuchsia.mediacodec and renaming
zircon-ethernet to fuchsia-hardware-ethernet.

fuchsia.mediacodec has most of its functionality merged into
fuchsia.media and it's not included in the default amd64 builds.

zircon-ethernet has been renamed to fuchsia-hardware-ethernet
recently:

https://fuchsia-review.googlesource.com/c/zircon/+/237178

* docs/fuchsia: Add troubleshooting sections

This commit adds a troubleshooting section in the fuchsia syzkaller docs
that mentions how to solve fidlgen issues when fidl interfaces are
removed or renamed.

* sys/fuchsia: remove stale autogenerated files.

* sys/fucsia run make extract && make generate.
2019-02-06 13:33:35 +01:00
Dmitry Vyukov
d672172cce Create CODE_OF_CONDUCT.md 2019-02-04 12:05:04 +01:00
Anton Lindqvist
c198d5ddeb sys/openbsd: add missing wscons descriptions (#976) 2019-02-01 22:01:09 -08:00
Dmitry Vyukov
564f9a4f57 pkg/report: add simple version of netbsd crash parser
Just something to start with. Plus some test cases.
2019-02-01 19:52:56 +01:00
Dmitry Vyukov
e34c330b57 executor: add missing include
thread_start now uses errno, so include <errno.h>
2019-02-01 19:43:52 +01:00
Dmitry Vyukov
a0f00cc5a0 docs: move netbsd.md into own dir
The latest trend is to create a dir per OS as we now have too many of them.
Create a dir netbsd and move the existing doc into it.
2019-02-01 19:43:52 +01:00
Dmitry Vyukov
ffec3d1894 dashboard/config: add lsm= cmdline arg for stacked modules
It won't take effect right now as security= has precedence over lsm=.
But it won't harm too and later we will only need to remove security=.
Also it will work with this custom patch for syzbot:
https://groups.google.com/d/msg/syzkaller/BSgVCTSShRQ/E6lFuiDpFwAJ

Update #973
2019-02-01 19:43:52 +01:00
Anton Lindqvist
6e68dcb922 docs/openbsd: update found_bugs.md 2019-02-01 18:41:17 +01:00
Dmitry Vyukov
edd1cc11e1
Update found_bugs.md 2019-02-01 18:25:39 +01:00
Andrey Konovalov
ceb907750f prog: fix checksum dependencies
Make pseudo checksums depend (via csumUses) on the arg it requires for
calculation. Otherwise we fail to assign addrs to those args during encoding
for execution. Also add a test.
2019-02-01 16:52:54 +01:00
Andrey Konovalov
9f528bbcc8 sys/linux: rename dev descriptions files
Prefix file names of descriptions of /dev/* files with dev_.
And give some of them more appropriate names.
2019-02-01 14:40:17 +01:00
Dmitry Vyukov
aa53be276d dashboard/config: prepare for stacked security modules
In linux-next security modules can be stacked.
TOMOYO is compatible with other modules and SAFESETID
module is added. But this is not yet in mainline.

Enable TOMOYO and SAFESETID.
There is no way to enable stacked modules in linux-next
while preserving the current behavior in mainline.
Once these changes reach mainline, we will need to replace
security cmdline arguments with lsm as follows:

lsm=yama,safesetid,integrity,selinux,tomoyo
lsm=yama,safesetid,integrity,smack,tomoyo
lsm=yama,safesetid,integrity,tomoyo,apparmor
2019-02-01 11:00:59 +01:00
Dmitry Vyukov
b97b12358e syz-manager: restore disabled syscall logging
We reset disabled syscalls before checking them.
As the result no diagnostics printed. Reset them after checking.
2019-02-01 10:02:24 +01:00
Dmitry Vyukov
0c07abcfea
docs/trusty: add instructions on running syzkaller
Update #933
2019-02-01 09:26:55 +01:00
Dmitry Vyukov
0e8ea0a357 executor, pkg/ipc: simplify retry handling
Remove kRetryStatus, it's effectively the same as exiting with 0.
Remove ipc.ExecutorFailure, nobody uses it.
Simplify few other minor things around exit status handling.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
25e10a0434 executor: remove ability to detect kernel bugs
This ability was never used but we maintain a bunch of code for it.
syzkaller also recently learned to spoof this error code
with some ptrace magic (probably intercepted control flow again
and exploited executor binary).
Drop all of it.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
724adc5445 sys/test/test: add tests for test exiting in the middle of execution 2019-01-31 11:35:53 +01:00
Dmitry Vyukov
31fc335d7c sys/linux/test: fix constraints in ipc test 2019-01-31 11:35:53 +01:00
Dmitry Vyukov
937e1ba861 executor: fix do_sandbox_none on akaros and test
do_sandbox_none must not exit, it needs to return.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
6fb60a4813 executor: handle pthread_create errors better
See the added comment for explanation.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
7e81a53230 pkg/csource: write tracing output to stderr
stdout is not flushed on abnormal exit.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
1068e21172 pkg/compiler: don't warn about the same len twice
Also add tests for warnings while we are here.
2019-01-31 11:35:53 +01:00
Dmitry Vyukov
8e579f27d6 prog: fix escaping of C strings
C's \xHH hex constants in strings accept any number of hex digits
(not just 2 or 4). So later non-hex escaped chars glue to the \x construct.
Use \OOO instead as it accepts at most 3 octal digits.
2019-01-31 11:35:53 +01:00
Andrey Konovalov
aa432daf55 sys: use -march=armv6 instead of -march=armv6t2
The latter doesn't work on Raspberry Pi Zero.
2019-01-28 16:49:49 +01:00
Andrey Konovalov
bd37886172 executor: fix remote coverage area size
It should be in number of words not in bytes.
2019-01-28 16:49:31 +01:00
Anton Lindqvist
629c2a2773 pkg/report: improved witness handling
Possible now since the output is consistently prefixed[1].

[1] https://marc.info/?l=openbsd-cvs&m=154850328128727&w=2
2019-01-28 09:47:41 +01:00
Anton Lindqvist
1602ad5232 docs/openbsd: update found_bugs.md 2019-01-28 09:38:37 +01:00
Anton Lindqvist
c73f090a5c sys/openbsd: add wscons descriptions, limited to wsdisplay for now 2019-01-26 09:31:18 +01:00
Anton Lindqvist
fc1f188563 sys/openbsd: add openat$tty 2019-01-26 09:31:18 +01:00
Anton Lindqvist
3d7ad96eb0 sys/openbsd: add openat${null,zero} 2019-01-26 09:31:18 +01:00
Anton Lindqvist
66ff894ef5 openbsd: more witness handling
* pkg/report: symbolize witness trace on OpenBSD

* vm/vmimpl: show witness locks on panic

* vm/vmimpl: show memory stats on panic

* fixup! pkg/report: symbolize witness trace on OpenBSD
2019-01-26 09:09:31 +01:00
Siddharth M
ebf7a37c5b pkg/build: add basic support for NetBSD
* Add pkg/build support for NetBSD

* Fix length of characters
2019-01-25 18:16:51 +01:00
Dmitry Vyukov
a3d9f7e34d sys/linux: fix up mptcp descriptions
1. Generate .const files for all arches.
2. Don't extract mptcp consts on android.
3. Remove mptcp includes from vnet.txt.
4. Enable CONFIG_MPTCP in syz-extract (mptcp is not like all other kernel headers).
2019-01-25 16:10:00 +01:00
8litz
6fde58c61b sys/linux: add Multipath TCP description
https://tools.ietf.org/html/rfc6824
2019-01-25 15:42:43 +01:00
Dmitry Vyukov
b5d78bce08 vm/vmimpl: fix vet warning about unkeyed struct 2019-01-25 07:29:31 +01:00
Dmitry Vyukov
a778e1a289
Update found_bugs.md 2019-01-25 07:24:57 +01:00
Anton Lindqvist
bfab9cd88b pkg/report: recognize witness on OpenBSD 2019-01-24 20:21:17 +01:00
Dmitry Vyukov
fea4b504d8 vm/vmimpl: produce better error in WaitForSSH
Currently we squash VerboseError which leads to too lengthy build error titles.
Handle verbose error more carefully.
2019-01-24 18:56:19 +01:00
Dmitry Vyukov
725ffbccf9 syz-fuzzer: log proc for executor-detected bug
It's not clear from the log what program caused the executor-detected bug.
Log proc number so that it can be matched with logged program.
Also exit immediately otherwise we crash later because info is nil.
2019-01-24 17:03:05 +01:00
Dmitry Vyukov
7be43858a2 sys/linux: add trusty hwrng service
Update #933
2019-01-24 16:49:40 +01:00
Dmitry Vyukov
f586e158c4 sys/linux: add trusty hwkey service
Update #933
2019-01-24 16:49:39 +01:00
Dmitry Vyukov
5db97d84e9 sys/linux: describe trusty storage service interface
Update #933
2019-01-24 16:49:39 +01:00
Dmitry Vyukov
91c9476c39 sys/linux: fix a TODO
We can actually express such size with:
define X25_SUBSCRIP_DEVICE_SIZE	200 - sizeof(long)
2019-01-24 16:49:39 +01:00
Dmitry Vyukov
b874f62f15 sys/linux: regenerate const files
(on linux-next)
2019-01-24 16:49:38 +01:00