aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
* executor: fixup previous commitDmitry Vyukov2017-11-221-223/+223
|
* executor: move arm syscall fixup to syz-extractDmitry Vyukov2017-11-222-1643/+1616
|
* executor: Modified executor_linux.cc to support ARM32 architectureAtul Prakash2017-11-221-2/+25
| | | | | | executor: changed kOutputDataAddr so that it works on 32-bit kernels executor: simplified ifdefs for arm in executor_linux.cc executor: removed empty lines that were accidentally added.
* sys/linux: remove get_kernel_syms, add quotactl syscallDmitry Vyukov2017-11-201-10/+12
| | | | | | get_kernel_syms does not seem to be present upstream. Describe an old quotactl syscall. Also fix umount/umount2 names in kallsyms.
* executor: proceed even if /dev/net/tun is not availableAndrey Konovalov2017-11-081-2/+12
| | | | | | | | | For some racy bugs syzkaller can generate a C reproducer with tun enabled, when it's not actuallly required to trigger the bug. Some kernel developers (that don't have CONFIG_TUN=y on their setups) complain about such C repros. When tun is not available, instead of exiting, print a message that tun initialization failed and proceed.
* sys/freebsd: add POLLINIGNEOFTobias Klauser2017-11-081-1/+1
|
* sys/linux: add definition for LOOP_SET_BLOCK_SIZEEric Biggers2017-11-071-10/+15
| | | | The v4.14 kernel will support a new loop ioctl, LOOP_SET_BLOCK_SIZE.
* sys/linux: fix wrong ioctl numbers in loop device definitionsEric Biggers2017-11-071-5/+5
| | | | | | | Fix a couple apparent copy-and-paste errors: - ioctl$LOOP_CHANGE_FD should use LOOP_CHANGE_FD - ioctl$LOOP_CTL_REMOVE should use LOOP_CTL_REMOVE
* sys/linux: add definition for keyctl_restrict_keyring()Eric Biggers2017-11-031-10/+15
| | | | | Add a definition for keyctl_restrict_keyring(), which was added in the v4.12 kernel.
* sys/linux: add definition for keyctl_dh_compute()Eric Biggers2017-11-031-10/+15
| | | | | | Add a definition for keyctl_dh_compute(), which was added in the v4.7 kernel, then in the v4.12 kernel extended to take in an optional 'keyctl_kdf_params' argument. (Requires CONFIG_KEY_DH_OPERATIONS=y.)
* sys/linux: use resource subtypes for "user" and "keyring" keysEric Biggers2017-11-031-10/+20
| | | | | | | | | | | Many functions in the keys API take in an ID parameter that is expected to refer to a keyring, not to any key. Therefore, define a resource subtype 'keyring' which can be created by add_key("keyring", ...) or by using one of the special keyring IDs. Also define a resource subtype 'user_key', since we'll be adding a definition for KEYCTL_DH_COMPUTE which takes in a struct containing "user" key IDs.
* sys/linux: define all the key typesEric Biggers2017-11-031-5/+5
| | | | | | | Add to key.txt all key types that currently might be present in the kernel. It was missing a few important ones such as "asymmetric", which has a significant attack surface since the payloads are run through an ASN.1 decoder.
* Changing the types of members of struct statUtkarsh Anand2017-10-301-1/+1
| | | | As defined in the header files.
* Added a few more syscall descriptions, constsUtkarsh Anand2017-10-301-2/+139
| | | | and other related files.
* Add two new syscalls `shmctl` and `msgctl`Utkarsh Anand2017-10-301-2/+10
|
* Fix the SYS_SEMCTL value issue for NetBSDUtkarsh Anand2017-10-301-11/+11
|
* sys/netbsd: fix mmap signatureDmitry Vyukov2017-10-251-1/+1
| | | | mmap syscall has 7 arguments (one unused padding)
* executor: small fixes for netbsdDmitry Vyukov2017-10-251-1/+5
| | | | | | | | | | RLIMIT_AS auses frequent random aborts on netbsd. Reason unknown. Disable it for now. Documentation says that __syscall should be used for syscalls with 64-bit arguments. On amd64 most syscalls have 64-bit arguments (incl mmap), so switch to it.
* executor: fix netbsd syscallsDmitry Vyukov2017-10-252-1/+9
| | | | | | executor_netbsd.cc was including syscalls_freebsd.h, which completely messed up syscall numbers and names. Include the right syscalls header.
* Lots of changes to sys/netbsd (#397)Utkarsh Anand2017-10-251-0/+54
| | | | | | | | | | | | | | | | * Lots of changes to sys/netbsd: - Removed a few syscalls that did not have proper constants defined. - Autogenerated *.const files. - Removed a few types like uid and gid, that were not available. - Ran make generate * Few changes for NetBSD support: - Added sys/netbsd/init.go - Added netbsd to sys/sys.go * Fix order in sys/sys.go * Update documentation for NetBSD
* executor: fix mkdtemp return value checkDmitry Vyukov2017-10-251-1/+1
| | | | mkdtemp return NULL on failure.
* all: basic building on netbsdDmitry Vyukov2017-10-233-173/+176
| | | | | This just makes make TARGETOS=netbsd succeed. We don't yet have prog target for netbsd.
* executor: prevent executor from messing with output regionDmitry Vyukov2017-10-236-19/+78
| | | | | | | | When comparisons are enabled fuzzer somehow manages to discover the output region and corrupt it. It seems to fetch the address from some memory operations (mmap/munmap). Don't leak the output region address.
* executor: fix build breakages due to doexitDmitry Vyukov2017-10-196-9/+46
| | | | | Some standard libraries contain "using ::exit;", which breaks with the current redefinition of exit.
* pkg/ipc: move fallback coverage into executorDmitry Vyukov2017-10-182-1/+15
| | | | | It seems to explode linux corpus. So make it freebsd-specific.
* executor: use forkserver for freebsdDmitry Vyukov2017-10-183-4/+136
| | | | | | | Use forkserver and shmem for freebsd. This greatly improves speed. Also introduce fallback coverage signal based on unique (syscall+errno) pairs.
* sys/linux: add MSG_ZEROCOPYWillem de Bruijn2017-10-171-5/+5
|
* sys/freebsd: more syscall descriptionsDmitry Vyukov2017-10-171-2/+254
| | | | | | | This is mostly copied form linux. We probably need better support for sharing descriptions between multiple OSes. But there are lots of differences, so this is not trivial.
* executor: improvements for akarosDmitry Vyukov2017-10-178-36/+38
| | | | | | | 1. remove workaround for pthread attrs (was fixed in akaros) 2. remove workaround for dup2 (was fixed in akaros) 3. check that we receive a program 4. implement timeout for test processes
* sys/fuchsia: more descriptionsDmitry Vyukov2017-10-163-25/+193
|
* sys/fuchsia: minor improvements to syscall descriptionsDmitry Vyukov2017-10-161-6/+6
|
* executor: fix fuchsia syz_mmapDmitry Vyukov2017-10-161-7/+9
|
* executor: repair fuchsia nonfailing modeDmitry Vyukov2017-10-162-25/+67
|
* executor: fix akaros nonfailing modeDmitry Vyukov2017-10-161-3/+9
|
* executor, pkg/ipc: unify ipc protocol between linux and other OSesDmitry Vyukov2017-10-1612-189/+196
| | | | | | | | | | | | | | | | | We currently use more complex and functional protocol on linux, and a simple ad-hoc protocol on other OSes. This leads to code duplication in both ipc and executor. Linux supports coverage, shared memory communication and fork server, which would also be useful for most other OSes. Unify communication protocol and parametrize it by (1) use of shmem or only pipes, (2) use of fork server. This reduces duplication in ipc and executor and will allow to support the useful features for other OSes easily. Finally, this fixes akaros support as it currently uses syz-stress running on host (linux) and executor running on akaros.
* executor: add akaros supportDmitry Vyukov2017-10-162-0/+359
| | | | Does not work yet, also needs ipc changes.
* sys/akaros: add akaros supportDmitry Vyukov2017-10-161-0/+47
|
* sys/linux: fix fcntl signatureDmitry Vyukov2017-10-161-5/+5
|
* executor: pass attr to pthread_mutex/cond_initDmitry Vyukov2017-10-161-2/+9
| | | | | | pthread_mutex/cond_init should accept NULL attr, but Akaros crashes with NULL attr: https://github.com/brho/akaros/issues/40
* executor: write debug output to stderrDmitry Vyukov2017-10-161-2/+2
| | | | | | We print all other output to stderr, write debug output to stderr as well. This does not matter for the main use case of running syz-execprog -debug, but can is helpful if we want to communicate with syz-executor via stdin/stdout.
* executor: add PC to kcov_comparison_tAlexander Potapenko2017-10-161-1/+4
| | | | | | | KCOV comparisons support is in the kernel mm tree already, and the patch contains an additional uint64_t to store PCs of functions calling __sanitizer_cov_trace_XXX(). Change kcov_comparison_t accordingly.
* sys/syz-extract: support freebsdDmitry Vyukov2017-10-121-3/+4
|
* executor: simple freebsd executorDmitry Vyukov2017-10-122-0/+200
|
* executor: include missing headerDmitry Vyukov2017-10-101-0/+1
| | | | writev requires <sys/uio.h>. Include it.
* executor: set own PATH when starting subprocessesDmitry Vyukov2017-10-101-3/+8
| | | | | | Executor process does not have any env, including PATH. On some distributions, system/shell adds a minimal PATH, on some it does not. Set own standard PATH to make it work across distributions.
* all: basic freebsd supportDmitry Vyukov2017-10-021-0/+12
| | | | For now we just make Go part build for freebsd.
* executor: support fragmentation in syz_emit_ethernetDmitry Vyukov2017-10-022-24/+84
| | | | | | A recent linux commit "tun: enable napi_gro_frags() for TUN/TAP driver" added support for fragmentation when emitting packets via tun. Support this feature in syz_emit_ethernet.
* sys/fuchsia: add more descriptionsDmitry Vyukov2017-10-021-4/+56
|
* sys/windows: add more descriptionsDmitry Vyukov2017-09-271-2/+2954
|
* executor: automatically infer base of root vmarDmitry Vyukov2017-09-271-6/+10
|