From 922e8e27343704155b81f50ddd3316ec04c9d299 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 9 Aug 2018 13:50:49 +0200 Subject: 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. --- executor/common_linux.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'executor/common_linux.h') 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); } } -- cgit mrf-deployment