diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-08-09 13:50:49 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-08-09 16:05:46 +0200 |
| commit | 922e8e27343704155b81f50ddd3316ec04c9d299 (patch) | |
| tree | ee5f2640775e336d923912c3249bac797dd33e05 /executor/common_linux.h | |
| parent | acf31536e9e570b2a5ee11a7818c96e4d177c808 (diff) | |
executor: mount binfmt_mist
We forgot to mount binfmt_misc. Mount it. Add a test.
Increase per-call timeout, otherwise last execve timesout.
Fix csource waiting for call completion at the end of program.
Diffstat (limited to 'executor/common_linux.h')
| -rw-r--r-- | executor/common_linux.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 49c33c108..9c1f5d776 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -1422,10 +1422,13 @@ static void setup_cgroups() // but for now we bundle this with cgroups. static void setup_binfmt_misc() { - if (!write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:syz0::./file0:")) { + if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) { + debug("mount(binfmt_misc) failed: %d\n", errno); + } + if (!write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:")) { debug("write(/proc/sys/fs/binfmt_misc/register, syz0) failed: %d\n", errno); } - if (!write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:yz1::./file0:POC")) { + if (!write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:\x02::./file0:POC")) { debug("write(/proc/sys/fs/binfmt_misc/register, syz1) failed: %d\n", errno); } } |
