From 6ba8a57087f2f46d0bb2b7a31b6151a61ba1f0ff Mon Sep 17 00:00:00 2001 From: Nils Date: Thu, 22 Jul 2021 14:49:30 +0200 Subject: [PATCH] Corrected brk() behavior --- child_launcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/child_launcher.cpp b/child_launcher.cpp index a4e92c8..093727c 100644 --- a/child_launcher.cpp +++ b/child_launcher.cpp @@ -48,7 +48,7 @@ void enable_limits(const Limits& limits) { }) { seccomp_rule_add(ctx, SCMP_ACT_ALLOW, sysc, 0); } - seccomp_rule_add(ctx, SCMP_ACT_KILL, SCMP_SYS(write), 0); + seccomp_rule_add(ctx, SCMP_ACT_ERRNO(ENOMEM), SCMP_SYS(brk), 0); if (seccomp_load(ctx) < 0) { throw std::runtime_error("Error setting up seccomp"); }