aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
...
* sys/linux: regenerate on latest kernelDmitry Vyukov2018-11-101-5/+5
|
* sys: initial trusty supportDmitry Vyukov2018-11-072-0/+49
| | | | | | | | | Trusty is a set of software components supporting a Trusted Execution Environment (TEE) on mobile devices. https://source.android.com/security/trusty Add syscall descriptions and some boilerplate.
* executor: fix inclusion of kvm arch-specific codeDmitry Vyukov2018-10-311-2/+2
| | | | | We use GOOS now to figure out target arch (which can be different from host arch).
* sys/linux: adding constants for trace2syz to socketsshankarapailoor2018-10-301-5/+5
|
* sys/linux: add perf, kvm, btrfs consts for trace2syzshankarapailoor2018-10-302-5/+10
|
* sys/linux: add additional constants for trace2syz to bpfShankara Pailoor2018-10-301-5/+5
| | | | Fixes #783
* sys/linux: fix up descriptionsDmitry Vyukov2018-10-301-5/+5
| | | | | | | 1. Extract consts on the latest linux tree. 2. Don't manually define O_TMPFILE/O_ACCMODE/_LINUX_CAPABILITY_VERSION_N, they are defined in kernel headers. 3. Don't use CLOCK_SGI_CYCLE as clock id, it's not implemented.
* sys/linux: add additional constants for trace2syzshankarapailoor2018-10-301-5/+5
|
* sys/openbsd: added minherit, extended/simplified mmapGreg Steuck2018-10-292-1/+2
| | | | | | | | | | | | * sys/openbsd: added minherit, extended/simplified mmap. Added a script from anton_at_openbsd.org for regenerating syscalls. Generated by ksh ./sys/openbsd/extract-openbsd.sh * Undo whitespace change not passing on CI * No need for magic script.
* sys/linux: fix SIOCGIFCONF constDmitry Vyukov2018-10-291-5/+5
|
* sys/linux: fix IP6T_SO_GET_INFO constDmitry Vyukov2018-10-291-5/+5
| | | | Fix copy-paste error.
* sys/linux: open /dev/media* filesDmitry Vyukov2018-10-282-10/+10
| | | | Also remove the second syscall for opening of /dev/fd*.
* sys/linux: slightly refine perf descriptionsDmitry Vyukov2018-10-282-5/+10
| | | | | CPU argument can be -1. It makes sense to mmap perf fd.
* sys/syz-extract: support missing arch headersDmitry Vyukov2018-10-282-5/+55
| | | | | | | | The latest Linux kernel misses some arch-specific headers on some archs: asm/a.out.h asm/prctl.h asm/mce.h Support that.
* sys/linux: floppy interface descriptionDenis Efremov2018-10-282-5/+85
| | | | | | | | | | For floppy fuzzing you need to enable: 1) CONFIG_BLK_DEV_FD in your kernel configuration 2) "cmdline": " -fda FLOPPY.img " in syzkaller configuration Signed-off-by: Denis Efremov <efremov@linux.com> Signed-off-by: Alexander Popov <alex.popov@linux.com>
* sys: check that target consts are definedDmitry Vyukov2018-10-191-2/+2
| | | | | | | | | | | | | | Currently when we get target consts with target.ConstMap["name"] during target initialization, we just get 0 for missing consts. This is error-prone as we can mis-type a const, or a const may be undefined only on some archs (as we have common unix code shared between several OSes). Check that all the consts are actually defined. The check detects several violations, to fix them: 1. move mremap to linux as it's only defined on linux 2. move S_IFMT to openbsd, as it's only defined and used on openbsd 3. define missing MAP_ANONYMOUS for freebsd and netbsd 4. fix extract for netbsd
* sys/linux: prohibit FAN_OPEN_PERM and FAN_ACCESS_PERMDmitry Vyukov2018-10-152-5/+6
| | | | | | | FAN_OPEN_PERM and FAN_ACCESS_PERM require the program to reply to open requests. If that does not happen, the program will hang in an unkillable state forever. See the following bug for details: https://groups.google.com/d/msg/syzkaller-bugs/pD-vbqJu6U0/kGH30p3lBgAJ
* Android: Fix sandbox implementationZach Riggle2018-10-122-3/+10
| | | | | | | | | | | My test harness for this code performed some steps that are not performed when syz-executor is invoked directy. Specifcally, we need to operate from a directory under /data/data, and have the correct UID/GID set as the owner of the directory. My test harness now correctly sets these, all sandbox operations succeed, and loop() is invoked.
* executor: Fuchsia: Use zx_task_resume_from_exception()Scott Graham2018-10-101-2/+2
| | | | | zx_task_resume() is deprecated; switch to using zx_task_resume_from_exception() instead.
* executor: tune memcg container logicDmitry Vyukov2018-10-101-15/+14
| | | | | | | | | | | | The current memcg container seems to lead to lots of hangs/stalls. Presumably the problem is with oom_score_adj and KASAN. Executor process tree eats all memory and then the leaf process is killed but the memory is not returned to memcg due to KASAN quarantine; and the parent processes are protected from killing with oom_score_adj=-1000. As the result the kernel locks up. 1. Don't use oom_score_adj=-1000. Instead bump leaf process score to 1000 (kill always). 2. Increase size of memcg to be larger than expected KASAN quarantine size.
* Update fidlgen to keep current with upstream.Julia Hansbrough2018-10-102-10/+64
| | | | | The Syzkaller IR upstream has been updated, so we can properly update consts/fidl descriptions now.
* executor: fix build on newer linux distrosDmitry Vyukov2018-09-271-2/+34
| | | | | | | This sucks a lot, but ebtables.h is now broken too on Debian 4.17: ebtables.h: In function ‘ebt_entry_target* ebt_get_target(ebt_entry*)’: ebtables.h:197:19: error: invalid conversion from ‘void*’ to ‘ebt_entry_target*’
* sys/linux: add encrypted key instantiation payloadsDmitry Vyukov2018-09-261-5/+5
|
* sys/linux: add IMA mount optionsDmitry Vyukov2018-09-261-5/+5
|
* sys/linux: add ima/evm/capability xattrsDmitry Vyukov2018-09-252-5/+50
|
* sys/linux: add security mount optionsDmitry Vyukov2018-09-251-5/+5
|
* sys/linux: add erofs descriptionsDmitry Vyukov2018-09-252-5/+10
|
* executor: make the debug output useful for race condition debuggingAlexander Popov2018-09-243-30/+39
| | | | | | | | | | | | | | | Sometimes race conditions are reproduced by syz-execprog and are not reproduced by the programs generated with syz-prog2c. In such cases it's very helpful to know when exactly the fuzzing syscalls are executed. Unfortunately, adding timestamps to the output of the original 'debug' mode doesn't work. This mode provides very verbose output, which slows down executor and breaks the repro. So let's make the executor debug output less verbose and add the timestamps. Signed-off-by: Alexander Popov <alex.popov@linux.com>
* sys/linux: add lsm attrs and xattrsDmitry Vyukov2018-09-232-5/+105
| | | | Add descriptions for /proc/self/attr/* and known lsm file xattrs.
* sys/linux: fix RTA_EXPIRES in rtm_ipv6_policyTobias Klauser2018-09-201-5/+5
|
* executor: fix buildDmitry Vyukov2018-09-202-12/+13
| | | | | | | | Move debug_dump_data back to executor.cc. debug_dump_data in common_linux.h does not play well with pkg/csource debug stripping logic. It strips a large random piece of code since it thinks debug_dump_data definition is actually debug_dump_data call site.
* executor: fix buildDmitry Vyukov2018-09-201-3/+3
| | | | | | Fix build after "executor: remove unused var flag_sandbox_privs". Some variables/functions can't be static as they are unused on some OSes, which produces unused warnings.
* executor: move debug_dump_data() into common_linux.hAnton Lindqvist2018-09-202-13/+12
| | | | | Compiling the executor on OpenBSD currently fails: executor/executor.cc:1316:6: error: unused function 'debug_dump_data'
* sys/linux: add MFD_HUGETLBTobias Klauser2018-09-191-5/+5
|
* sys/linux: add MCL_ONFAULTTobias Klauser2018-09-191-5/+5
|
* executor: remove unused var flag_sandbox_privsDmitry Vyukov2018-09-171-32/+31
| | | | | Remove unused var flag_sandbox_privs (which was used for what?). Decleare all variables as static to detect such cases in future.
* executor: make sandboxes more modularDmitry Vyukov2018-09-177-30/+9
| | | | | | | | Currently we have a global fixed set of sandboxes, which makes it hard to add new OS-specific ones (all OSes need to updated to say that they don't support this sandbox). Let it each OS say what sandboxes it supports instead.
* RFC: android: Add support for untrusted_app sandboxing (#697)Zach Riggle2018-09-178-8/+155
| | | | | | | | | | | | | | | | | | | | | executor: add support for android_untrusted_app sandbox This adds a new sandbox type, 'android_untrusted_app', which restricts syz-executor to the privileges which are available to third-party applications, e.g. those installed from the Google Play store. In particular, this uses the UID space reserved for applications (instead of the 'setuid' sandbox, which uses the traditional 'nobody' user / 65534) as well as a set of groups which the Android-specific kernels are aware of, and finally ensures that the SELinux context is set appropriately. Dependencies on libselinux are avoided by manually implementing the few functions that are needed to change the context of the current process, and arbitrary files. The underlying mechanisms are relatively simple. Fixes google/syzkaller#643 Test: make presubmit Bug: http://b/112900774
* sys/fuchsia: add description for fuchsia.net, .net-stack, .ldsvc servicesDokyung Song2018-09-142-12/+100
|
* sys/linux: prohibit EXT4_IOC_SHUTDOWNDmitry Vyukov2018-09-132-10/+5
| | | | EXT4_IOC_SHUTDOWN EXT4_IOC_SHUTDOWN on root fs effectively brings the machine down in weird ways.
* sys/fuchsia: generate descriptions for garnet servicesDokyung Song2018-09-122-36/+116
|
* sys/linux: add btf descriptionsDmitry Vyukov2018-09-112-5/+25
| | | | | Add some new bpf descriptions, most notably btf. Not perfect, but something.
* sys/fuchsia: regerenate filesDmitry Vyukov2018-09-112-16/+2
| | | | Regerenate files after the previous commit.
* sys/fuchsia: prune unused structs in syscall description generated by fidlgenDokyung Song2018-09-112-2/+98
| | | | | | | | After generating syscall description for fidl files using fidlgen, prune all unused structs using the exact same mechanism used by the compiler's check for unused structs. This allows the FIDL compiler to support modular compilation; it does not need to have global knowledge of whether each struct is used or not.
* executor: reset oom_score_adj for test processDmitry Vyukov2018-09-111-0/+4
| | | | oom_score_adj is inherited, so we need to reset it to 0.
* executor: sandbox with memory/pid cgroupsDmitry Vyukov2018-09-101-10/+42
| | | | | | | Set limit of 32 pids and 200MB per test process. This should prevent things like fork bombs and frequent OOMs. Fixes #589
* sys/linux: extend xattr descriptionsDmitry Vyukov2018-09-022-5/+95
| | | | Update #533
* executor: OpenBSD does not allow write and exec mappings by defaultAnton Lindqvist2018-08-311-1/+8
| | | | | | | | | | Since the OpenBSD target does not make use of syz_execute_func yet, just drop PROT_EXEC for now. Supporting write and exec would require one to edit /etc/fstab during installation. Regression introduced in commit a4718693 ("sys/linux: add syz_execute_func").
* sys/linux: add syz_execute_funcDmitry Vyukov2018-08-307-22/+47
| | | | | | The function executes random code. Update #310
* sys/linux: add nbd descriptionsDmitry Vyukov2018-08-302-5/+90
| | | | Update #533