aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
...
* pkg/report: use cover protect on NetBSD alsoR3x2019-06-131-2/+2
|
* executor: improve usb coverage attributionAndrey Konovalov2019-06-121-9/+18
| | | | | Always call write_extra_output() only if the current program or call can produce extra coverage (== is a syz_usb* syzcall).
* sys/linux: run make extract and generateAndrey Konovalov2019-06-121-5/+5
| | | | | Forgot to do it after the last changes in hiddev descriptions. Fuse is also updated.
* sys/openbsd: prevent using vio0 as a virtual multicast interfaceAnton Lindqvist2019-06-081-1/+1
| | | | | | | | | | | One of the root causes to reported "lost connection to test machine" is when the egress network interface is being used as a multicast interface: setsockopt$inet6_MRT6_ADD_MIF(r0, 0x29, 0x66, &(0x7f0000000180)={0x2}, 0xc) Prevent such syscalls from being generated by limiting the range of allowed interface indices.
* sys/linux: use template based structure for USB descriptionsAndrey Konovalov2019-06-071-5/+5
| | | | | | | | To allow future extensions of USB descriptions to fuzz particular USB classes this patch changes the structure of USB descriptions to use templates. This will invalidate all existing USB corpus.
* sys/linux: add hidraw and hiddev descriptionsAndrey Konovalov2019-06-072-10/+165
|
* sys/linux: don't inherit fd_usb from fdAndrey Konovalov2019-06-061-5/+5
| | | | This is a special fd, we don't want various ioctls be called on it.
* sys/openbsd: add klog descriptionsAnton Lindqvist2019-06-052-1/+4
|
* sys/openbsd: add missing wsmouse ioctl descriptionsAnton Lindqvist2019-06-052-1/+6
|
* executor: add cover protection support to OpenBSD (#1215)Anton Lindqvist2019-06-051-0/+17
|
* executor: Protect the coverage bufferAndrew Turner2019-06-044-0/+41
| | | | | | | | | Add functions to protect and unprotect the coverage buffer. The buffer is protected from being written to while tracing. When the trace data is sorted we need to make it read/write, but can return it to read only after this has completed. Leave the first page as read/write as we need to clear the length field.
* executor: special-case zx_deadline_after return valueDmitry Vyukov2019-06-041-0/+1
| | | | | zx_deadline_after also returns time, not status. So don't use it as coverage.
* sys/linux: update descriptions of sendmsg/sendmmsgBins942019-06-032-31/+90
| | | | | Add sendmsg$inet, sendmmsg$inet for ip_cmsg_send. Add sendmsg$inet6, sendmmsg$inet6 for ip6_datagram_send_ctl
* sys/linux: add missing BPF constantsPaul Chaignon2019-05-311-5/+5
| | | | Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* pkg/csource: generate timeouts for USB syzcallsAndrey Konovalov2019-05-312-1/+3
| | | | This patch only covers per call timeouts, per prog one is not adjusted yet.
* sys/linux: add missing BPF constantsPaul Chaignon2019-05-291-5/+5
| | | | Signed-off-by: Paul Chaignon <paul.chaignon@orange.com>
* sys/freebsd: Add support for fuzzing FreeBSD/i386Andrew Turner2019-05-292-0/+513
| | | | Add support to fuzz 32 bit FreeBSD system calls.
* sys/fuchsia: Updating Fuchsia definitionsPascal Perez2019-05-212-2/+16
| | | | | | Simply make extract TARGETOS=fuchsia SOURCEDIR=<FUCHSIA_DIR>/fuchsia
* make changes to prevent failing buildR3x2019-05-211-2/+11
|
* executor: exit after first detected leak in C reprosDmitry Vyukov2019-05-211-6/+0
| | | | Otherwise C repros print infinite stream of the same leaks again and again.
* executor: implement support for leak checkingDmitry Vyukov2019-05-204-41/+223
| | | | | | | | | | | | | | | | | | | | | | | | | Leak checking support was half done and did not really work. This is heavy-lifting to make it work. 1. Move leak/fault setup into executor. pkg/host was a wrong place for them because we need then in C repros too. The pkg/host periodic callback functionality did not work too, we need it in executor so that we can reuse it in C repros too. Remove setup/callback functions in pkg/host entirely. 2. Do leak setup/checking in C repros. The way leak checking is invoked is slightly different from fuzzer, but much better then no support at all. At least the checking code is shared. 3. Add Leak option to pkg/csource and -leak flag to syz-prog2c. 4. Don't enalbe leak checking in fuzzer while we are triaging initial corpus. It's toooo slow. 5. Fix pkg/repro to do something more sane for leak bugs. Few other minor fixes here and there.
* sys/linux: improve binder descriptionsDmitry Vyukov2019-05-171-5/+5
| | | | | Refine some consts to increase changes of correct programs. Fix some types. Add comments and a test.
* sys/linux: improve binder descriptionsDmitry Vyukov2019-05-161-5/+5
| | | | | | Always pass 3 objects in a transaction. This allows to specify correct offsets for objects. Let's see if this improves coverage.
* sys/linux: use offsetof in ebtablesDmitry Vyukov2019-05-161-5/+5
| | | | Resolve 2 TODOs in ebtables using the new offsetof type.
* pkg/compiler: add offsetof typeDmitry Vyukov2019-05-162-1/+2
| | | | | | Similar to C offsetof gives offset of a field from the beginning of the parent struct. We have several TODOs in descriptions asking for this.
* pkg/compiler: work around 0-array-size errors due to missing constsDmitry Vyukov2019-05-152-2/+3
| | | | | | | A const can be used as array size. Then if the const is not present on all arches, compiler will produce an error about 0-sized-array. There is no easy way to work around this for a user. Use value of 1 for missing consts. It's just a bit safer.
* .golangci.yml: add codeanalysis build tagDmitry Vyukov2019-05-151-17/+17
| | | | | | | | | Using a build tag to exclude files for golangci-lint reduces memory consumption (it does not parse them). The naive attempt with skip-dirs did not work. So add codeanalysis build tag and use it in auto-generated files. Update #977
* sys/linux: improve binder descriptionsDmitry Vyukov2019-05-142-5/+15
| | | | Add few new ioctl's. Add some typedefs for clarity.
* sys/linux: improve key and net_sch descriptionsDmitry Vyukov2019-05-141-5/+5
| | | | Use the len paths to resolve pending TODOs.
* pkg/compiler: allow to refer to syscall arguments in len pathsDmitry Vyukov2019-05-141-1/+1
| | | | This allows to use len[syscall:arg] expressions.
* sys/akaros: rename syscall argumentDmitry Vyukov2019-05-141-1/+1
| | | | In preparation for making syscall a reserved name.
* sys/linux: improve btf descriptionsDmitry Vyukov2019-05-141-5/+5
| | | | | | | | Now that we have the len path expressions we can fix the TODO in btf descriptions to properly specify offsets of btf sections. Also add proper descriptions for btf type section and few other minor things around.
* prog: implement complex len target supportDmitry Vyukov2019-05-141-1/+1
| | | | | This actually implements support for complex len targets during program generation and mutation.
* pkg/compiler: generate complex len targetsDmitry Vyukov2019-05-142-17/+18
| | | | Change the generated format for len type to support multiple path elements.
* sys/linux: switch ppc64le to little-endianDmitry Vyukov2019-05-131-1/+1
| | | | | | | | | | | | | | | | | | make extract recently broke for powerpc on linux-next with: include/uapi/linux/byteorder/big_endian.h:6:2: error: #error "Unsupported endianness, check your toolchain" #error "Unsupported endianness, check your toolchain" Turns out we always built ppc64le headers as big-endian. First, kernel was configured as BE. Then, we used gcc to build an executable program for host and on x86 gcc does not define __LITTLE_ENDIAN__ so kernel thought that the toolchain is BE too. Configure kernel as LE and define __LITTLE_ENDIAN__. This actually changes values of some consts, but fortunately just few of them.
* sys/openbsd: add missing padding argumentsAnton Lindqvist2019-05-122-1/+3
| | | | | | | | | Due to missing padding arguments, stack garbage could end up being used as actual arguments. More reading for the curious[1]. While here, add missing descriptions for pread and pwrite. [1] https://flak.tedunangst.com/post/syzkaller-found-a-bug
* sys/linux: add few new bpf constsDmitry Vyukov2019-05-102-5/+10
|
* sys/linux: add definitions of fsopen, fspick, fsconfig, fsmount, move_mount ↵Dmitry Vyukov2019-05-102-5/+29
| | | | syscalls
* sys/linux: add new consts/flags/fields here and thereDmitry Vyukov2019-05-102-5/+25
| | | | Add a bunch of new small interfaces in 5.2: new consts, flags, fields, etc.
* sys/linux: add new fou attributesDmitry Vyukov2019-05-101-5/+5
|
* sys/linux: add description of open_tree syscallDmitry Vyukov2019-05-102-5/+7
|
* sys/linux: regenerate consts on the latest linux-next treeDmitry Vyukov2019-05-101-5/+5
| | | | Fuse version was bumped.
* sys/linux: fix alignment of cmsghdr_sockDmitry Vyukov2019-05-101-5/+5
| | | | All cmsg's must be intptr aligned within the array.
* sys/linux: update descriptions of sendmsg/sendmmsgKaipeng Zeng2019-05-102-5/+29
| | | | Fix the descriptions of cmsghdr. Add sendmsg$sock and sendmmsg$sock for __sock_cmsg_send.
* executor: fix 32-bit buildDmitry Vyukov2019-05-071-3/+3
| | | | | Syscall args can't be printed with %lx now. Cast them to uint64 for now since we have only 2 such places.
* executor: change syscall argument type to intptr_tmunjinoo2019-05-077-13/+13
| | | | | The type size of long depends on compiler. Therefore, changing to intptr_t makes it depends on architecture.
* executor: unbreak on OpenBSD at runtimeAnton Lindqvist2019-05-021-0/+4
| | | | | | | | Not using `elif GOOS_freebsd' since it could cause breakage on other *BSDs due to unused variables. Regression introduced in commit c7c3f772 (executor: improve setup for packet handling on *BSD).
* sys/openbsd: add vmm descriptions (#1152)Anton Lindqvist2019-05-012-1/+10
| | | | | | | Most probably limited to input validation for now. In the future, it could be extended to provide a bootable kernel during vm create (/bsd) and turn vmid into a proper resource. The OpenBSD VMs on GCE does support vmm(4).
* executor: improve setup for packet handling on *BSD (#1153)Michael Tüxen2019-05-011-1/+20
| | | | | | | | Improve the handling of packets by: * setting the local MAC address. * configuring the local IPv4 address with prefix /24. * adding an entry in the arp cache for the remote IPv4 address. * adding an entry in the IPv6 neighbour cache for the remote IPv6 address.
* sys/freebsd: add support for various network protocolsMichael Tuexen2019-05-011-1/+1
| | | | | Add support for Ethernet, IPv4, ICMP, IPv6, ICMP6, TCP, and UDP. This work is based on the corresponding Linux support.