| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
| |
Debug output takes time, so 20ms is not enough for almost any syscall.
Give a syscall 500ms in debug before considering it blocked.
|
| |
|
|
|
| |
This commit moves checksum computation to executor. This will allow to embed
dynamically generated values (like TCP sequence numbers) into packets.
|
| |
|
|
|
|
|
|
|
|
| |
We've started seeing lots of vmalloc failures with the 200ms timeout.
Turns out vmalloc has a check for fatal signals pending,
so we were killing the process which caused vmalloc to fail.
If vmalloc can take 200+ms, then we need to dump the timeout
as it's not blocking that we want to catch.
Bump the timeout to 500ms.
|
| |
|
|
|
|
|
|
| |
If an external sandbox process wraps executor, the out pipe will be closed
before the sandbox process exits this will make ipc package kill the sandbox.
As the result sandbox process will exit with exit status 9 instead of the executor
exit status (notably kRetryStatus). Consequently, ipc will treat it as hard
failure rather than a temporal failure. So we duplicate the exit status on the pipe.
|
| |
|
|
| |
It fails with various errors (9, 14, 25), probably fuzzer messes with the fd.
|
| | |
|
| |
|
|
|
| |
Fuzzer invented another tricky way to corrupt the region.
Map it at a hard to guess address.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently syzkaller uses per-call basic block (BB) coverage.
This change implements edge (not-per-call) coverage.
Edge coverage is more detailed than BB coverage as it captures
not-taken branches, looping, etc. So it provides better feedback signal.
This coverage is now called "signal" throughout the code.
BB code coverage is also collected as it is required for visualisation.
Not doing per-call coverage reduces corpus ~6-7x (from ~35K to ~5K),
this has profound effect on fuzzing efficiency.
|
| |
|
|
|
|
|
|
|
| |
Using `adb shell syz-executor reboot` to reboot devices has stopped
working with the recent Android update, probably due to the intro
of seccomp. I have reverted the device reboot logic to use `adb
shell reboot` although it can be flaky at times so that we can
continue to fuzz on devices, until a more reliable solution can be
sought out.
|
| |
|
|
|
|
|
|
|
|
|
| |
Fuzzer has figured out how to corrupt input/output shmem regions
abusing the text memcpy in syz_kvm_setup_cpu. It guessed a negative
text_size value that causes the memcpy to overwrite shmem regions.
Protect better against such cases:
1. Make text_size unsigned (there is already a check that it is less than 1000).
2. Map input region as readable only, we don't write to it.
3. Add address sanity check to segv_handler, if we see that we are writing
into executable data, it's better to crash instantly.
|
| |
|
|
|
| |
Syscalls frequently block and this affects fuzzing speed.
20ms should be more than enough for a normal syscall to finish.
|
| |
|
|
|
|
| |
Now it's possible to use `int32:18` to denote a bitfield of size 18 as a struct field.
This fixes #72.
|
| |
|
|
|
|
| |
Add new pseudo syscall syz_kvm_setup_cpu that setups VCPU into
interesting states for execution. KVM is too difficult to setup otherwise.
Lots of improvements possible, but this is a starting point.
|
| |
|
|
| |
On some KVM syscalls soverage reaches 36K+ PCs.
|
| |
|
|
| |
See the added comment for explanation.
|
| |
|
|
|
|
| |
waitpid(pid) does not work if child invokes ptrace(PTRACE_TRACEME):
https://groups.google.com/forum/#!topic/syzkaller/SjWzOnNRRIU
Use waitpid(-1) instead.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Factor out repro logic from syz-repro tool,
so that it can be used in syz-manager.
Also, support sandboxes in code generated by
csoure. This is required to reproduce crashes
that require e.g. namespace sandbox.
|
| |
|
|
| |
Update #59
|
| | |
|
| |
|
|
|
|
|
| |
Ignore SIGSEGV/SIGBUS during copyin/copyout of arguments.
The memory may not be addressable. The ignoring allows to
pass partially-addressable input data to kernel.
It's unclear if it's a good idea or not yet.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The new namespace-based sanboxing is good,
but it's not always what one wants
(and also requires special kernel configs).
Change dropprivs config value to sandbox,
which can have different values (currently: none, setuid, namespace).
Setuid mode uses setuid(nobody) before fuzzing as before.
In future we can add more sandboxing modes or, say,
extend -sandbox=setuid to -sandbox=setuid:johndoe
to impersonolate into given user.
|
| |
|
|
|
| |
This is not fully working now: e.g. prog and sys packages assume
that pointer size is 8. But at least it compiles and works.
|
| |
|
|
|
|
|
| |
There is a number of known, low-frequency reasons for failures in remove_dir.
Make the failures non-fatal.
Fixes #45
|
| | |
|
| |
|
|
| |
This is a common source of false positives.
|
| |
|
|
| |
This lead to lots of false positives.
|
| | |
|
| |
|
|
|
|
| |
Namespace-based sandbox can take some time to setup.
In particular, lots of parallel executors block on net
namespace creation.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Now kcov exposes only uintptr-sized PCs.
|
| | |
|
| |
|
|
| |
http://reviews.llvm.org/rL257763
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
android)
|
| | |
|
| | |
|
| |
|
|
|
| |
Wait with spin loop instead.
See the comment for explanation.
|
| |
|
|
|
|
|
| |
WUNTRACED wait returns when child has stopped.
That's not what we want to wait for.
If it's stopped we need to timeout wait and kill
the stopped child.
|