Skip to content

Commit

Permalink
privsep: allow __NR_mmap2 syscall
Browse files Browse the repository at this point in the history
The issue occured while compiled by musl toolchain:

    mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = ?
    +++ killed by SIGSYS +++

This patchs allows seccomp to make __NR_mmap2 syscall.

Signed-off-by: Oleg Lyovin <[email protected]>
  • Loading branch information
olegartys committed Oct 12, 2023
1 parent b976d55 commit b6dd7b5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/privsep-linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ static struct sock_filter ps_seccomp_filter[] = {
#ifdef __NR_mmap
SECCOMP_ALLOW(__NR_mmap),
#endif
#ifdef __NR_mmap2
SECCOMP_ALLOW(__NR_mmap2),
#endif
#ifdef __NR_munmap
SECCOMP_ALLOW(__NR_munmap),
#endif
Expand Down

0 comments on commit b6dd7b5

Please sign in to comment.