Skip to content

Commit

Permalink
Add X32 to the seccomp filter
Browse files Browse the repository at this point in the history
Fixes #1432.
  • Loading branch information
edolstra committed Jul 4, 2017
1 parent 42c5774 commit a3dc1e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstore/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2317,6 +2317,10 @@ void setupSeccomp()
seccomp_arch_add(ctx, SCMP_ARCH_X86) != 0)
throw SysError("unable to add 32-bit seccomp architecture");

if (settings.thisSystem == "x86_64-linux" &&
seccomp_arch_add(ctx, SCMP_ARCH_X32) != 0)
throw SysError("unable to add X32 seccomp architecture");

/* Prevent builders from creating setuid/setgid binaries. */
for (int perm : { S_ISUID, S_ISGID }) {
if (seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(chmod), 1,
Expand Down

0 comments on commit a3dc1e6

Please sign in to comment.