mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
sandbox: allow stack mmap with prot_none
This fixes a failure that was showing up on i386 Debian hosts with sandboxing enabled, now that cpuworker is enabled on clients. We already had allowances for creating threads and creating stacks in the sandbox, but prot_none (probably used for a stack guard) was not allowed so thread creation failed. Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
This commit is contained in:
parent
700814a3a1
commit
287c78c5a8
@ -442,6 +442,13 @@ sb_mmap2(scmp_filter_ctx ctx, sandbox_cfg_t *filter)
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = seccomp_rule_add_2(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap2),
|
||||
SCMP_CMP(2, SCMP_CMP_EQ, PROT_NONE),
|
||||
SCMP_CMP(3, SCMP_CMP_EQ, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK));
|
||||
if (rc) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = seccomp_rule_add_2(ctx, SCMP_ACT_ALLOW, SCMP_SYS(mmap2),
|
||||
SCMP_CMP(2, SCMP_CMP_EQ, PROT_READ|PROT_WRITE),
|
||||
SCMP_CMP(3, SCMP_CMP_EQ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE));
|
||||
|
Loading…
Reference in New Issue
Block a user