637 Commits

Author SHA1 Message Date
Dmitry Vyukov
244c5f60fd prog: spoof resources less frequently
Passing -1 as file descriptors and passing wrong types
proved to be not very intersting.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
bdc6d550b0 executor: use NONFAILING strcpy in syz_open_dev
The source is fuzzer provided memory, it can be non-addressable.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
c5f38186d2 csource: compile with -Werror
Check for compiler warnings during compilation.
Don't require -std=c99.
Fix existing compiler warnings.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
43d5c364a2 syz-manager: move include files to the bottom of coverage report
They are usually less interesting than source files.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
83a8f430c9 vm/qemu: add some kvm-related kernel cmd line flags
In particular it is useful to enable nested.
Enable a bunch of others as well.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
44eebebf58 add *.cfg and workdir* masks to .gitignore
I have lots of them for testing.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
40a8b2f8e1 vm/adb: increase battery check timeout
Battery info is provided by some OS services.
With KASAN/KCOV these services take long to startup.
This causes episodic timeouts during battery check.
Increase the timeout.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
327616bdb6 Add kernel-ish clang-format style suitable for emails. 2017-01-09 20:20:49 +01:00
Dmitry Vyukov
b6f204a7e4 syz-stress: add flag that controls generation of new programs 2017-01-09 20:20:49 +01:00
Dmitry Vyukov
1934b6b757 sys: replace syz_open_dev with openat
In lots of cases we don't need the special syz_open_dev call,
openat will do just fine. Standard syscalls are preferrable, so use them.
2017-01-09 20:20:49 +01:00
Dmitry Vyukov
d976f51d72 sys: detail kvm syscalls more 2017-01-09 20:20:48 +01:00
Dmitry Vyukov
e8ddc2ae56 sys: don't add clock_gettime always
Currently we always enable clock_gettime in config.
This is required since the call is needed for generation of timespec/timeval structs.
The negative side effect is that one gets clock_gettime even
if he wants to fuzz a small set of unrelated syscalls.

Don't enable clock_gettime by default.
Instead handle timeval/timespec as other resources.
2017-01-09 20:20:48 +01:00
Dmitry Vyukov
9ba75ee1d7 executor: increase coverage size from 16K to 64K PCs
On some KVM syscalls soverage reaches 36K+ PCs.
2017-01-09 20:20:48 +01:00
Dmitry Vyukov
94b38efc1d sys: allow to specify number of pages for vma type
Allows to write vma[4] or vma[5-10] to specify desired number of pages.
2017-01-09 20:20:48 +01:00
Dmitry Vyukov
b5aa8b4506 prog: test that Deserialize does not return nil prog
That happened when parser did not check scanning errors and
a program contains too long line.
2017-01-09 20:19:44 +01:00
Dmitry Vyukov
4ca49b389a csource: fix fork bomb 2017-01-09 20:19:44 +01:00
Dmitry Vyukov
746f74d254 csource: remove more predefined defines from generated source 2017-01-09 20:19:44 +01:00
Dmitry Vyukov
ec9744f3e5 syz-manager, syz-gce: output 20 log lines instead of 50 in web UI
50 lines take too much space, there is scroll bar if necessary.
2017-01-09 20:19:44 +01:00
Dmitry Vyukov
3f9152d9e2 vm/qemu: enable more kvm features in test kernel 2017-01-09 20:19:44 +01:00
Dmitry Vyukov
0913359f79 prog: increase line length limit when deserializing programs
bufio.Scanner has a default limit of 4K per line,
if a program contains longer line, it fails.
Extend the limit to 64K.
Also check scanning errors. Turns out even scanning of bytes.Buffer
can fail due to the line limit.
2017-01-09 20:19:44 +01:00
Andrey Konovalov
26f0782d08 Merge pull request #104 from xairy/bytesize-n
prog: add bytesizeN types
2017-01-09 16:43:29 +01:00
Andrey Konovalov
df98b6bde5 prog: add bytesizeN types 2016-12-20 18:12:07 +01:00
Dmitry Vyukov
80b6c954f8 manager: add ability to ignore bugs
Add new config parameter "ignores" which contains list of regexp expressions.
If one of the expressions is matched against oops line,
crash report is not saved and VM is not restarted.
2016-12-19 17:39:03 +01:00
Dmitry Vyukov
a074da17a4 vm/adb: support BeagleBone console
BeagleBone console requires some special tty-ism to work.
Fortunately, this code also works with Suzy-Q.
2016-12-19 15:56:10 +01:00
Dmitry Vyukov
53366f4571 gce: remove external IPs
No, external IPs do not help.
Seems to be some problem with kernel configs...
2016-12-16 18:50:45 +01:00
Dmitry Vyukov
fa3280e0b4 gce: temporary add external IPs to instances
There seems to be some issue with DHCP if instance does not have external IP.
Test if it will work with external IP.
2016-12-16 16:46:07 +01:00
Dmitry Vyukov
a59452c4b2 vm/gce: handle graceful preemption
In case of graceful preemption fuzzer should be terminated by SIGTERM.
Catch it and propagate to manager.
2016-12-16 16:11:18 +01:00
Dmitry Vyukov
f83633edbe tools/syz-symbolize: add report symbolizer utility 2016-12-16 15:53:30 +01:00
Dmitry Vyukov
c0edd52ce1 report: whitelist WARNING printed by sshd 2016-12-16 15:48:14 +01:00
Dmitry Vyukov
81efdbb29c sys: describe new pkey_* syscalls 2016-12-16 15:42:11 +01:00
Dmitry Vyukov
739d40c1b8 report: support new stack trace format without PC values 2016-12-16 15:40:53 +01:00
Dmitry Vyukov
5d23ba9171 executor: don't fail on ENOMEM 2016-12-16 15:36:29 +01:00
Dmitry Vyukov
d1b6b5b9b1 syz-extract: don't fail if no flags to extract 2016-12-13 21:07:59 +01:00
Dmitry Vyukov
fb3b63b70e Merge pull request #103 from tjjh89017/patch-repro
Fix make repro failed
2016-12-12 14:44:00 +01:00
Date Huang
d536a20ed5 Fix make report failed 2016-12-12 19:19:09 +08:00
Dmitry Vyukov
df27b4deaf Merge pull request #102 from ste/url-fix
Fix broken links for KASAN and KUBSAN
2016-12-09 21:38:21 +01:00
Stephen Hildrey
611fbd7885 Fix broken links for KASAN and KUBSAN 2016-12-09 20:32:10 +00:00
Dmitry Vyukov
9c94dffdc5 executor: handle exit failures
See the added comment for explanation.
2016-12-08 17:38:31 +01:00
Dmitry Vyukov
ebfa6e169e ipc: produce more detailed error messages
Always prepend executor PID to error messages,
so it is clear what program triggered a bug.
Extend coverage parsing error messages.
2016-12-08 17:28:48 +01:00
Dmitry Vyukov
73b7be0e9c manager: print how long VMs running before restarting
For a potential case VM unexpectedly exits too early.
2016-12-08 17:28:42 +01:00
Dmitry Vyukov
6f9e42e9ba report: support "spinlock recursion" oops 2016-12-07 16:43:48 +01:00
Dmitry Vyukov
72a439b447 executor: add struct to cap structs
Otherwise it does not compile as C.
Also regenerate csource/common.go (it misses the MAX_PIDS change).
2016-12-07 16:00:20 +01:00
Dmitry Vyukov
60fd47e308 tools/create-image.sh: install sudo into the image 2016-12-07 15:58:51 +01:00
Dmitry Vyukov
2b1456887b tools/create-image.sh: use net.core.bpf_jit_enable = 1
bpf_jit_enable = 2 causes printing of all programs to console.
Produces lots of output and is not very useful. Disable it.
2016-12-07 10:17:46 +01:00
Dmitry Vyukov
99b473cb4b executor: use different address for our network card
IP addresses like 192.168.0.1/192.168.1.1 are often used for routing between VM and the host.
Offset our IP addresses to start from 192.168.218.0 to reduce potential conflicts.
2016-12-06 20:09:17 +01:00
Dmitry Vyukov
ad8354e9bd manager: fix potential nil deref crash
res.res.CRepro crashes if res.res == nil.
Fix that.
2016-12-06 20:08:04 +01:00
Dmitry Vyukov
d105629ea2 vm/qemu: use panic=86400 instead of panic=-1
panic=-1 causes instant reboot, which is bad for crash logs.
panic=86400 makes it hang. Use panic=86400 as create-gce-image.sh does.
2016-12-06 20:06:45 +01:00
Dmitry Vyukov
66700b2c86 executor: change the way we wait for children
waitpid(pid) does not work if child invokes ptrace(PTRACE_TRACEME):
https://groups.google.com/forum/#!topic/syzkaller/SjWzOnNRRIU
Use waitpid(-1) instead.
2016-12-05 21:07:26 +01:00
Dmitry Vyukov
ce1cd11efc Merge pull request #101 from xairy/tun-fix
executor: don't try to open tun if it's not enabled
2016-12-02 19:50:27 +01:00
Andrey Konovalov
346fb4e5e9 executor: don't try to open tun if it's not enabled 2016-12-02 19:21:33 +01:00