From 804e5bd862bec2c4d0d84ad8291ab8d5db7715c3 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Wed, 8 May 2024 15:26:42 -0700 Subject: executor: setup binfmt_mist only if it has been mounted gVisor doesn't implement binfmt file system. Fixes: 229488b413d4 ("executor: consistently fail on feature setup") Signed-off-by: Andrei Vagin --- executor/common_linux.h | 1 + 1 file changed, 1 insertion(+) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index 6b5fcad71..cb554b364 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -4988,6 +4988,7 @@ static void setup_binfmt_misc() { if (mount(0, "/proc/sys/fs/binfmt_misc", "binfmt_misc", 0, 0)) { debug("mount(binfmt_misc) failed: %d\n", errno); + return; } if (!write_file("/proc/sys/fs/binfmt_misc/register", ":syz0:M:0:\x01::./file0:") || !write_file("/proc/sys/fs/binfmt_misc/register", ":syz1:M:1:\x02::./file0:POC")) -- cgit mrf-deployment