Commit Graph

3397 Commits

Author SHA1 Message Date
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
Dmitry Vyukov
f87fe5d949 sys/syz-extract: don't use warning flags
CrossCFlags now contains some warning-related flags like -Wall.
Some of these break kernel build, don't add any warning-related flags.
2019-01-24 16:49:38 +01:00
Dmitry Vyukov
de746e8232 sys/linux: update TODO comments
Change TODO comments that refer to missing description
language features to NEED comments as that it's easier to grep for them.
Remove some outdated comments. Fix 2 easy fixable TODOs.
2019-01-24 16:49:38 +01:00
Siddharth M
44e061b86c Added vcs support for netbsd 2019-01-24 16:41:05 +01:00
Dmitry Vyukov
fa3d6b0b21 Makefile: don't cross-compile executor if cross-compiler is missing
We started building netbsd executor on linux.
This fails on CI since cross-compiler is missing.
But we don't want to exclude netbsd from presubmit entirely.
So check if cross-compiler is missing and just produce a warning.
This should unbreak CI and humans will see the warning.
2019-01-24 11:28:55 +01:00
Siddharth M
f4e42cabb7 sys/targets: support netbsd cross compilation on linux
* Support cross compilation on linux

* typo fix

* fixed indentation

* Add a trailing '/' after SOURCEDIR
2019-01-24 11:27:36 +01:00
Anton Lindqvist
ce1ccf9723 dashboard/config: enable witness on OpenBSD
Lets give this another try now that larger kernels can boot.
2019-01-24 07:38:43 +01:00
Dmitry Vyukov
56558f635d
Update README.md 2019-01-23 12:07:04 +01:00
Julia Hansbrough
e3bc2f2b5a syz-ci: fix error log output
This eases debugging when running syz-ci locally.
2019-01-23 11:02:31 +01:00
Dmitry Vyukov
9a689e2d3d syz-ci: extend logging in uploadBuildError 2019-01-23 10:19:27 +01:00