Skip to content

Remove SYS_futex, SYS_write, SYS_close, and SYS_mmap from list of default allowed syscalls for seccomp on Linux #183

Description

@danbugs

Currently, we allow SYS_futex, SYS_write, SYS_close, and SYS_mmap (

(libc::SYS_futex, vec![]),
) by default beause they are needed by some writer functions we have. Writer functions are not registered like normal host functions. Instead, they are passed in as a parameter to UninitializedSandbox::new (
host_print_writer: Option<&dyn HostFunction1<String, i32>>,
) and, so, allowing extra syscalls to it is a bit cumbersome. We should consider refactoring UninitializedSandbox::new to leverage a builder pattern.

Activity

  1. added
    lifecycle/confirmedBug is verified or proposal seems reasonable
    area/securityInvolves security-related changes or fixes
    on Jan 29, 2025
  2. added this to the Backlog milestone on Mar 4, 2025
  3. modified the milestones: Backlog, Upcoming on Mar 12, 2025
  4. jprendes commented on Jul 2, 2025

    @jprendes
    Contributor

    I think we can go ahead with removing the syscalls from the default.
    Now the print writer is registered like any other function.
    It does have a dedicated registration function to simplify some things (signature checking, using the correct name, and adding the extra syscalls we add for printing), but that one also comes with the extra syscalls flavor.

  5. syntactically commented on Jul 2, 2025

    @syntactically
    Member

    Is removing mmap() entirely from the hypervisor thread safe? I would imagine there are some scenarios where the allocator will mmap(MAP_ANONYMOUS) to get a chunk of heap memory. I would also think we should be quite careful about removing futexes, as those are used all over the place.

  6. dblnz commented on Oct 23, 2025

    @dblnz
    Contributor

    @danbugs I think this no longer applies since we have merged #970 , is that right?

  7. danbugs commented on Nov 4, 2025

    @danbugs
    ContributorAuthor

    @dblnz ~ you're right! Closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/securityInvolves security-related changes or fixeslifecycle/confirmedBug is verified or proposal seems reasonable

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions