aboutsummaryrefslogtreecommitdiffstats
path: root/executor
Commit message (Collapse)AuthorAgeFilesLines
* sys/linux: add AF_NETLINK/NETLINK_NETFILTER descriptionsDmitry Vyukov2018-01-091-10/+20
|
* sys/linux: add AF_NETLINK/NETLINK_GENERIC descriptionsDmitry Vyukov2018-01-091-10/+20
|
* sys/linux: duplicate open/accept specializations with openat/accept4Dmitry Vyukov2018-01-091-10/+30
| | | | | | | | open is not present on arm64, only openat. accept is not present on 386, only accept4. Duplicate all open/accept specializations with corresponding openat/accept4 specializations to enable testing on 386/arm64.
* sys/linux: add AF_NETLINK/NETLINK_CRYPTO descriptionsDmitry Vyukov2018-01-091-10/+20
|
* sys/linux: add ion and ashmem devices supportDmitry Vyukov2018-01-091-22/+68
| | | | | Note: ion supercedes the old android interface, which is moved to sys/android.
* sys/linux: resolve few TODOsDmitry Vyukov2018-01-081-5/+5
|
* pkg/compiler: make signalno a type aliasDmitry Vyukov2018-01-081-5/+5
| | | | | | | We don't need compiler support for such things anymore, now we simply can do: type signalno int32[0:65]
* prog: support opt for proc typesDmitry Vyukov2018-01-062-9/+13
|
* prog: add test for len mutationDmitry Vyukov2018-01-061-4/+6
| | | | Test we actually can get an unnatural len value.
* pkg/compiler: add bitsize typeDmitry Vyukov2018-01-065-13/+17
| | | | This is need for few crypto/xfrm descriptions.
* sys/linux: netlink xfrm supportDmitry Vyukov2017-12-311-10/+20
|
* sys/linux: add multicast and ipv4 mapped ipv6 addressesDmitry Vyukov2017-12-291-10/+15
|
* sys/linux: describe ipv6 tlv optionsDmitry Vyukov2017-12-291-5/+5
|
* sys/linux: improve bpf descriptionsDmitry Vyukov2017-12-291-5/+5
|
* sys/linux: improve perf descriptionsDmitry Vyukov2017-12-291-10/+15
|
* sys/linux: assorted improvementsDmitry Vyukov2017-12-291-10/+115
| | | | Mostly extensions of API in 4.15.
* sys/linux: fix some copy-paste errorsDmitry Vyukov2017-12-281-30/+11
|
* sys/linux: fix splice signatureDmitry Vyukov2017-12-271-6/+7
| | | | ...was wrong all that time
* executor: introduce uint64/32/16/8 typesDmitry Vyukov2017-12-2718-359/+364
| | | | | | | | | | | | | | | The "define uint64_t unsigned long long" were too good to work. With a different toolchain I am getting: cstdint:69:11: error: expected unqualified-id using ::uint64_t; ^ executor/common.h:34:18: note: expanded from macro 'uint64_t' Do it the proper way: introduce uint64/32/16/8 types and use them. pkg/csource then does s/uint64/uint64_t/ to not clutter code with additional typedefs.
* executor: fix another format bugDmitry Vyukov2017-12-271-1/+1
| | | | Detected only by clang.
* executor: fix reply status on loop killsDmitry Vyukov2017-12-271-1/+2
| | | | | | | We use exitf on loop failures, anbd exitf is retry-able. However, we use different status when replying to ipc, and that different status is what ipc actually uses. Use kRetryStatus status in case on unexpected loop failures.
* executor: check format stringsDmitry Vyukov2017-12-275-34/+36
| | | | | | | | | | | | | | | | | | | I see a crash which says: #0: too much cover 0 (errno 0) while the code is: uint64_t n = ...; if (n >= kCoverSize) fail("#%d: too much cover %u", th->id, n); It seems that the high part of n is set, but we don't see it. Add printf format attribute to fail and friends and fix all similar cases. Caught a bunch of similar cases and a missing argument in: exitf("opendir(%s) failed due to NOFILE, exiting");
* pkg/csource: mimic the way syscalls are scheduled in executorDmitry Vyukov2017-12-222-1/+64
| | | | | | | | Currently csource uses completely different, simpler way of scheduling syscalls onto threads (thread per call with random sleeps). Mimic the way calls are scheduled in executor. Fixes #312
* executor: remove dead codeDmitry Vyukov2017-12-221-2/+0
| | | | doexit already contains an infinite loop.
* pkg/csource: fix handling of proc typesDmitry Vyukov2017-12-222-17/+40
| | | | | | | | | | Generated program always uses pid=0 even when there are multiple processes. Make each process use own pid. Unfortunately required to do quite significant changes to prog, because the current format only supported fixed pid. Fixes #490
* prog: use dense indexes for copyout instructionsDmitry Vyukov2017-12-171-18/+24
| | | | Fixes #174
* executor: remove unneeded NONFAILINGDmitry Vyukov2017-12-171-1/+1
| | | | copyin is already NONFAILING.
* pkg/ipc: make threaded/collide per-program optionsDmitry Vyukov2017-12-171-10/+10
| | | | | | | Currently threaded/collide are global environment flags. It can be useful to turn off collider during some executions (minimization, triage, etc). Make them per-program options.
* prog: don't serialize output data argsDmitry Vyukov2017-12-171-6/+8
| | | | | | | | Fixes #188 We now will write just ""/1000 to denote a 1000-byte output buffer. Also we now don't store 1000-byte buffer in memory just to denote size. Old format is still parsed.
* prog: introduce more readable format for data argsDmitry Vyukov2017-12-171-4/+6
| | | | | | | | | | | | | | | | | | | | | Fixes #460 File names, crypto algorithm names, etc in programs are completely unreadable: bind$alg(r0, &(0x7f0000408000)={0x26, "6861736800000000000000000000", 0x0, 0x0, "6d6435000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000000000000 00000000000"}, 0x58) Introduce another format for printable strings. New args are denoted by '' ("" for old args). New format is enabled for printable chars, \x00 and \t, \r, \n. Example: `serialize(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`, vs: `serialize(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`,
* prog: fix TestMutateTableDmitry Vyukov2017-12-171-4/+18
| | | | | | Now works fast enough even for short mode. Fixes #208
* sys: move test syscalls to a separate targetDmitry Vyukov2017-12-173-353/+167
| | | | | | We have them in linux solely for historical reasons. Fixes #462
* executor: fix macros in common.hAndrey Konovalov2017-12-141-3/+4
|
* sys/linux: describe PF_KEYDmitry Vyukov2017-12-111-10/+25
|
* prog: fix hints of data argsDmitry Vyukov2017-12-081-10/+15
| | | | | | | | | | | | Hints for data args don't work. We do all the work, but at the final stage we patch arg in the _old_ program, not in the _new_ one. So programs passed to the callback are all the same and don't contain any mutations. Tests did not catch this because they work right before that point (don't test the actual interface function MutateWithHints). Fix that and add a test that catches this.
* sys/linux: add a simple description for selinuxDmitry Vyukov2017-12-081-10/+95
|
* executor: fix buildDmitry Vyukov2017-12-062-6/+6
| | | | | | exitf function was not defined with some combinations of options in csource. Fix defines and switch exitf back to fail, fail already checks ENOMEM/EAGAIN, so there is no reason to use exitf in this particular case.
* executor: unshare PID namespace even for sandbox=noneDmitry Vyukov2017-12-051-5/+26
| | | | | | | | Unshare as much as we can for all sandboxing modes. This fixes "kernel panic: Attempted to kill init!" crashes under sandbox=none. And should just generally improve reproducibility, e.g. if we unshare SYSVSEM fuzzer won't collide with any existing semaphores.
* executor: treat fail-nth errors as non-fatalDmitry Vyukov2017-12-051-4/+7
| | | | | We see occasional ENOENT/EACCES errors returned. It seems that fuzzer somehow gets its hands to it.
* prog: support bytesizeN for vmaDmitry Vyukov2017-11-291-5/+5
| | | | | | I guess this is currently unused, but ignoring bytesizeN for vma looks wrong. If user asks for bytesizeN for vma, divide vma size by N.
* prog: repair arrays/buffers with incorrect size in DeserializeDmitry Vyukov2017-11-281-10/+20
| | | | | | | | | | | | | For string[N] we successfully deserialize a string of any length. Similarly for a fixed-size array[T, N] we successfully deserialize an array of any size. Such programs later crash in foreachSubargOffset because static size Type.Size() does not match what we've calculated iterating over fields. The crash happens only in SerializeForExec in syz-fuzzer, which is especially bad. Fix this from both sides: 1. Validate sizes of arrays/buffers in Validate. 2. Repair incorrect sizes in Deserialize.
* pkg/compiler: add check that len does not refer to array with varlen elementsDmitry Vyukov2017-11-283-7/+7
| | | | | This [almost] always means a bug in descriptions. Fix all bugs identified by the check.
* sys/linux: add binder descriptionsDmitry Vyukov2017-11-271-15/+45
|
* sys/linux: assorted improvements to descriptionsDmitry Vyukov2017-11-271-10/+45
|
* sys/linux: add files from net dir to list of /proc filesDmitry Vyukov2017-11-271-5/+5
|
* sys/linux: fix control len in msghdr'sDmitry Vyukov2017-11-271-5/+5
| | | | Contol len is in bytes, not array elements.
* sys/linux: improve hash generation for KEYCTL_DH_COMPUTEDmitry Vyukov2017-11-271-5/+5
| | | | | | | KEYCTL_DH_COMPUTE used the old fixed list of algorithm names. Use the new code for algorithm generation. + it needs only SHASH algs, but we passed in all alg names. Pass only SHASH algs.
* sys/linux: open files from /procDmitry Vyukov2017-11-272-341/+373
|
* sys/linux: improve fuse descriptionsDmitry Vyukov2017-11-271-65/+15
|
* executor: use /proc/thread-self/fail-nth instead of /proc/self/task/%d/fail-nthDmitry Vyukov2017-11-271-7/+6
| | | | Makes code slightly simpler.