aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
...
* pkg/host: enable FeatureComparisons on OpenBSDAnton Lindqvist2019-01-211-12/+2
|
* executor: unbreak on OpenBSDAnton Lindqvist2019-01-192-1/+1
| | | | | | | Commit b5df78dc ("all: support extra coverage") broke the executor on OpenBSD: executor/executor.cc:61:11: error: unused variable 'kExtraCoverSize' [-Werror,-Wunused-const-variable] const int kExtraCoverSize = 256 << 10;
* kcov: some fixes for extra coverageAndrey Konovalov2019-01-171-1/+1
| | | | | | Use PC tracing mode when detecting KCOV_REMOTE_ENABLE support in the kernel. Also fix kcov_remote_handle_usb argument.
* executor: remove unused kvm_asm64_vm86Dmitry Vyukov2019-01-173-14/+0
| | | | | | | -Wunused-const-variable shows it. No idea now if it should be used or not, seems to be the same as kvm_asm32_paged_vm86. So let's just remove it.
* all: detect extra coverage supportAndrey Konovalov2019-01-162-9/+14
| | | | Based on whether the kernel supports KCOV_REMOTE_ENABLE ioctl.
* all: support extra coverageAndrey Konovalov2019-01-165-31/+106
| | | | | | | | | | | | | | | Right now syzkaller only supports coverage collected from the threads that execute syscalls. However some useful things happen in background threads, and it would be nice to collect coverage from those threads as well. This change adds extra coverage support to syzkaller. This coverage is not associated with a particular syscall, but rather with the whole program. Executor passes extra coverage over the same ipc mechanism to syz-fuzzer with syscall number set to -1. syz-fuzzer then passes this coverage to syz-manager with the call name "extra". This change requires the following kcov patch: https://github.com/xairy/linux/pull/2
* sys/freebsd: add SCTP syscallsmsvoelker2019-01-162-1/+177
| | | | | | | | * sys/freebsd: Add SCTP syscalls * sys/freebsd: SCTP syscalls updated * sys/freebsd: SCTP syscalls fixed
* sys/linux: add trusty supportDmitry Vyukov2019-01-142-5/+80
| | | | | | Add support for trusty tipc devices and several trusty app ports. Update #933
* sys/linux: Add syscalls to read from sockets for crypto operationsZubin Mithra2019-01-142-5/+10
| | | | | | sockaddr_alg with salg_type as "skcipher", "aead", "hash" and "rng" support for reading from these sockets. Add read descriptions to socket_alg.txt.
* executor: adapt switching to user nobody to be more portable on BSDsKamil Rytarowski2019-01-141-5/+10
| | | | | | | | | NetBSD uses different uid/gid than FreeBSD/OpenBSD for the user nobody. Instead of hardcoding the values, retrieve it from the password entry database. While there, switch to setuid(2) and setgid(2) calls as they are good enough and portable. setresgid(2) and setresuid(2) aren't available on NetBSD.
* executor: do not call setrlimit(2) for RLIMIT_AS for NetBSDKamil Rytarowski2019-01-141-2/+4
| | | Setting the limit caused abnormal failure during early init on NetBSD.
* executor: update KCOV support for FreeBSDMichael Tuexen2019-01-141-17/+4
| | | | | | KCOV support has been added to FreeBSD in r342962. Use the header file and update the code to latest changes introduced in the review process.
* executor: disable gen.go for NetBSDKamil Rytarowski2019-01-101-1/+1
| | | kvm is Linux specific.
* tools/syz-trace2syz/proggen/proggen_test.go: test ipv6 address conversionShankara Pailoor2019-01-101-5/+5
|
* sys/linux: add rand_addr option to ipv6_addr unionShankara Pailoor2019-01-101-5/+5
| | | | | | | rand_addr option is the first option for the ipv6_addr union and is just an array of 16 bytes. This option makes it easy for trace2syz to convert ipv6 address as strace decodes the ipv6 address as a hex string.
* executor: adapt os_init() to NetBSD with PaX MPROTECTKamil Rytarowski2019-01-091-0/+3
| | | | | | Initialize syz data segment with protection allowed by PaX MPROTECT. PROT_MPROTECT() registers future potential protection that is allowed to be enabled in future.
* sys/linux: prohibit SNAPSHOT_FREEZEDmitry Vyukov2019-01-061-5/+5
| | | | SNAPSHOT_FREEZE freezes all processes and leaves the machine dead.
* sys/linux: add /dev/ppp descriptionsDmitry Vyukov2019-01-042-5/+105
|
* sys/linux: detail ifla_vf_policy/ifla_port_policy/ifla_xdp_policyDmitry Vyukov2018-12-301-5/+5
|
* sys/linux: add can routesDmitry Vyukov2018-12-301-5/+5
|
* sys/linux: add AF_RXRPC descriptionsDmitry Vyukov2018-12-302-5/+55
|
* sys/linux: add /dev/mISDNtimerDmitry Vyukov2018-12-302-5/+20
|
* sys/linux: open more of /dev/ filesDmitry Vyukov2018-12-302-5/+25
| | | | | | | /dev/vfio/vfio /dev/btrfs-control /dev/ubi_ctrl /dev/cachefiles
* executor: fix linux includesDmitry Vyukov2018-12-291-9/+10
| | | | | | | | | | | Builds in one distro, but another says: In file included from <stdin>:39:0: /usr/powerpc64le-linux-gnu/include/linux/if.h:143:8: error: redefinition of ‘struct ifmap’ /usr/powerpc64le-linux-gnu/include/net/if.h:111:8: note: originally defined here Mess. Try to fix it. Not sure what's the right solution and it it even exists.
* sys/linux: add AF_ISDN descriptionsDmitry Vyukov2018-12-292-5/+155
|
* sys/linux: describe /dev/vhci interfaceDmitry Vyukov2018-12-292-5/+10
|
* sys/linux: misc assorted improvementsDmitry Vyukov2018-12-292-5/+10
| | | | | | Add new bpf consts/commands. Refine bluetooth descriptions. Remove removed crypto consts.
* executor: use netlink instead of ip command to setup net devicesDmitry Vyukov2018-12-291-151/+386
| | | | | | | | | | | | | | | ip command caused several problems: 1. It is installed in different locations or not installed at all in different distros. 2. It does not support latest kernel devices, e.g. setup of hsr currently fails because our ip does not understand its custom prose. 3. ip command is slow, unbearably slow in emulator (full setup takes tens of seconds). This change reduces setup from ~2s to ~400ms. 4. ip is not present in gvisor, but it will support netlink. Use netlink directly to solve all these problems.
* executor: log failure in write_fileDmitry Vyukov2018-12-291-41/+15
| | | | | | Almost all callers of write_file just log the failure. Log the failure in write_file directly to remove lots of "error handling" code.
* executor: Fix FreeBSD such all platforms use same number of entriesMichael Tuexen2018-12-291-1/+2
| | | | | | | FreeBSD sets the kcov buffer as number of bytes instead of number of entries. This also fixes the mmap() call, which was failing due to inconsistent sizes. The failing was hidden due to wrong error handling.
* executor: fix error handling of mmap()Michael Tuexen2018-12-291-6/+5
| | | | | mmap() returns MAP_FAILED, which is (void *)(-1), in case of an error. This is different from NULL.
* executor: add clarifying comment for FreeBSD.Michael Tuexen2018-12-291-0/+6
|
* executor: add a clarifying commentMichael Tuexen2018-12-291-0/+2
|
* executor: use function argument instead of global variable.Michael Tuexen2018-12-291-1/+1
|
* sys/linux: refine few types in NETLINK_ROUTEDmitry Vyukov2018-12-291-5/+5
|
* executor: improve kcov compatibility with upcoming supportMichael Tuexen2018-12-281-3/+8
| | | | | Get ioctl() definitions and usage in sync with the upcoming support reviewed in https://reviews.freebsd.org/D14599.
* executor: KIOENABLE accepts a mode argument on OpenBSDAnton Lindqvist2018-12-281-5/+3
|
* pkg/csource: use 0 for missing syscall argsDmitry Vyukov2018-12-273-13/+55
| | | | | | | | | | | | | | We don't specify trailing unused args for some syscalls (e.g. ioctl that does not use its arg). Executor always filled tailing unsed args with 0's but pkg/csource didn't. Some such syscalls actually check that the unsed arg is 0 and as the result failed with C repro. We could statically check and eliminate all such cases, but it turns out the warning fires in 1500+ cases: https://gist.githubusercontent.com/dvyukov/e59ba1d9a211ee32fa0ba94fab86a943/raw/a3ace5a63f7281f0298f51ea9842ead1e4713418/gistfile1.txt So instead fill such args with 0's in pkg/csource too.
* executor: include sys/kcov.h on OpenBSDAnton Lindqvist2018-12-271-3/+6
| | | | Since we no longer cross-compile, there's no need to repeat the defines.
* executor: fix max number of syscall argsDmitry Vyukov2018-12-261-1/+1
| | | | De-hardcode max number (wrong) of syscall args.
* executor: create more net devices on linuxDmitry Vyukov2018-12-263-27/+63
|
* executor: restrict ipc resource usageDmitry Vyukov2018-12-261-1/+25
| | | | | For context see: https://groups.google.com/d/msg/syzkaller-bugs/ZaBzAJbn6i8/Py9FVlAqDQAJ
* sys/linux: add network drop monitor supportDmitry Vyukov2018-12-242-5/+20
|
* sys/linux: add udmabuf descriptionsDmitry Vyukov2018-12-242-5/+20
|
* sys/linux: add basic AF_CAIF descriptionsDmitry Vyukov2018-12-242-5/+30
|
* sys/linux: add basic X25 descriptionsDmitry Vyukov2018-12-242-5/+120
|
* sys/linux: extend AX25/ROSE/NETROM descriptionsDmitry Vyukov2018-12-244-67/+233
|
* sys/linux: add CRYPTO_MSG_GETSTATDmitry Vyukov2018-12-221-5/+5
|
* sys/linux: add RTM_NEWNSID/RTM_GETNSIDDmitry Vyukov2018-12-221-5/+5
|
* sys/linux: add fs-verity ioctlsVictor Hsieh2018-12-182-5/+15
| | | | | | | | This adds 2 ioctls and an argument type: - FS_IOC_ENABLE_VERITY - FS_IOC_MEASURE_VERITY - struct fsverity_digest Note fs-verity on-disk structs are not yet added.