diff options
| author | Alexander Potapenko <glider@google.com> | 2024-07-03 10:29:35 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-07-03 10:41:14 +0000 |
| commit | 409d975c59d9dbae9424c533c1d0d903fd51564f (patch) | |
| tree | 9fbd0da4607b0c6bda0f25195a36226526a421ca /executor | |
| parent | 6f1d3312ccfbc19933ecfdf7e4e53f2a62f35057 (diff) | |
executor: linux: bump fs.mount-max to 100000
Android sets fs.mount-max to 100, making it impossible to create new chroots.
Relax the limit, setting it to a value used on desktops.
Tracking bug: https://github.com/google/syzkaller/issues/4972
Diffstat (limited to 'executor')
| -rw-r--r-- | executor/common_linux.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/executor/common_linux.h b/executor/common_linux.h index 2c230a619..da27f1075 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -3899,6 +3899,9 @@ static void initialize_cgroups() // See https://github.com/google/syzkaller/issues/4939 for more details. static void sandbox_common_mount_tmpfs(void) { + // Android systems set fs.mount-max to a very low value, causing ENOSPC when doing the mounts below + // (see https://github.com/google/syzkaller/issues/4972). 100K mounts should be enough for everyone. + write_file("/proc/sys/fs/mount-max", "100000"); if (mkdir("./syz-tmp", 0777)) fail("mkdir(syz-tmp) failed"); if (mount("", "./syz-tmp", "tmpfs", 0, NULL)) |
