From 1885e8c62bc95d48708cccd4be7ff7f8fcb7a5e3 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sun, 12 Sep 2021 15:41:38 -0400 Subject: [PATCH] executors: disallow access to /proc /proc/self is difficult/impossible to properly support under Landlock, but runtimes should not be relying on its presence anyway, as it is not POSIX. --- dmoj/executors/mixins.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/dmoj/executors/mixins.py b/dmoj/executors/mixins.py index 76acbd213..82a29f4db 100644 --- a/dmoj/executors/mixins.py +++ b/dmoj/executors/mixins.py @@ -53,22 +53,6 @@ if sys.platform.startswith('freebsd'): BASE_FILESYSTEM += [ExactFile('/etc/libmap.conf'), ExactFile('/var/run/ld-elf.so.hints')] else: - # Linux and kFreeBSD mounts linux-style procfs. - BASE_FILESYSTEM += [ - ExactDir('/proc'), - ExactDir('/proc/self'), - ExactFile('/proc/self/maps'), - ExactFile('/proc/self/exe'), - ExactFile('/proc/self/auxv'), - ExactFile('/proc/meminfo'), - ExactFile('/proc/stat'), - ExactFile('/proc/cpuinfo'), - ExactFile('/proc/filesystems'), - ExactDir('/proc/xen'), - ExactFile('/proc/uptime'), - ExactFile('/proc/sys/vm/overcommit_memory'), - ] - # Linux-style ld. BASE_FILESYSTEM += [ExactFile('/etc/ld.so.nohwcap'), ExactFile('/etc/ld.so.preload'), ExactFile('/etc/ld.so.cache')]