aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2020-11-19 21:31:08 +0000
committerGravatar GitHub <[email protected]>2020-11-19 21:31:08 +0000
commitb3513dfbaef6e20d7d92f34285913f974bc81f32 (patch)
tree9c25a6b8416bbb4078f4e96bfa463f8fcd315d37
parentAdd privileged securityContext to deployment (diff)
Set maximum file size to 10Mb through rlimit_fsize
This will set the maximum size of a created file to be 10Mb, a fairly generous amount. The reason for this is that when a huge stdout is buffered it does not get affected by the memory protections of nsjail and is sent to the host container, which has potential to cause an OOM.
-rw-r--r--config/snekbox.cfg1
1 files changed, 1 insertions, 0 deletions
diff --git a/config/snekbox.cfg b/config/snekbox.cfg
index 27caf27..5b47459 100644
--- a/config/snekbox.cfg
+++ b/config/snekbox.cfg
@@ -18,6 +18,7 @@ envar: "NUMEXPR_NUM_THREADS=1"
keep_caps: false
rlimit_as: 700
+rlimit_fsize: 10
clone_newnet: true
clone_newuser: true