From 5bc3be51cc65ecf6d4532ac7c93b6d5d284d5a38 Mon Sep 17 00:00:00 2001 From: kalder <61064868+kalder@users.noreply.github.com> Date: Mon, 6 Feb 2023 09:03:38 -0800 Subject: executor: fix initialize_tun() for Android (#3656) Android devices often fail during the initial check with the error: SYZFAIL: tun: ioctl(TUNSETIFF) failed We need the same namespacing here that is used for other sandboxing configurations. --- pkg/csource/generated.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'pkg/csource') diff --git a/pkg/csource/generated.go b/pkg/csource/generated.go index 3921d1b6e..32a65e53f 100644 --- a/pkg/csource/generated.go +++ b/pkg/csource/generated.go @@ -10324,6 +10324,10 @@ static int do_sandbox_android(uint64 sandbox_arg) #if SYZ_EXECUTOR || SYZ_NET_DEVICES initialize_netdevices_init(); #endif + if (unshare(CLONE_NEWNET)) { + debug("unshare(CLONE_NEWNET): %d\n", errno); + } + write_file("/proc/sys/net/ipv4/ping_group_range", "0 65535"); #if SYZ_EXECUTOR || SYZ_DEVLINK_PCI initialize_devlink_pci(); #endif -- cgit mrf-deployment