Skip to content

CLI doesn't allow opt-out of syscall filter #152

Description

@bittervec

Background

Today I couldn't get sandlocked bun to work, where either bun repl or bun test silently exits with code 1. I figure it may have something to do the syscall filtering enforced by sandblock after ruling out possible interfering of filesystem rules.

Problem

The CLI help page reports two relevant options on this, --extra-deny-syscall and --extra-allow-syscall. Despite similar naming, notice that --extra-allow-syscall only accepts syscall group instead of specific syscalls, which is fairly confusing.

      --extra-deny-syscall <NAME>
          Extra syscall names to deny (in addition to Sandlock's default blocklist)
      --extra-allow-syscall <NAME>
          Extra syscall group names to allow (e.g. sysv_ipc)

After consulting the source code, there seems to be only two groups defined so far, default and sysv_ipc. And sysv_ipc is the only one we are able to disable with the option.

Questions

  1. I notice that the default syscall blocklist is quite comprehensive. Must the default blocklist be enforced to protect the security model sandlock is based off? For example, would sandbox escape become possible if I check some syscalls off from the default blocklist?
  2. If the opt-out is not an option due to the first point, does it limit the use cases of sandlock even for some common development tasks (say bun in my example)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions