aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource
diff options
context:
space:
mode:
authorkalder <61064868+kalder@users.noreply.github.com>2023-02-06 09:03:38 -0800
committerGitHub <noreply@github.com>2023-02-06 17:03:38 +0000
commit5bc3be51cc65ecf6d4532ac7c93b6d5d284d5a38 (patch)
tree31db1b267d471ac5a7308abd07fb72c256f521ec /pkg/csource
parent0a9c11b64c9f99ba6bf90f22430b6794577c7aeb (diff)
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.
Diffstat (limited to 'pkg/csource')
-rw-r--r--pkg/csource/generated.go4
1 files changed, 4 insertions, 0 deletions
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