Skip to content

Supervisor fails on kernels without CONFIG_CROSS_MEMORY_ATTACH (process_vm_writev → ENOSYS reported as EFAULT) #367

Done

Description

@twerkmeister

I was looking to build a two level sandboxing scheme using docker sandboxes (sbx) and sandlock inside them to have separate processes with different privileges. However I ran into issues using sandlock inside the micro vm when not disabling the supervisor. Together with AI I drilled down the issue as follows:

sandlock 0.9.2, kernel 7.0.14 x86_64 (Docker Sandbox / sbx microVM), glibc 2.41 (Debian, Docker Hardened Image).

sandlock run -r /usr -r /lib -r /lib64 -r /etc -- /bin/true fails:
libc.so.6: cannot stat shared object: Error 14. With --no-supervisor it works.

strace of the supervisor:

process_vm_writev(4857, [{..., iov_len=144}], 1, [{iov_base=0x7ffcdc78a080, iov_len=144}], 1, 0) = -1 ENOSYS
ioctl(15, SECCOMP_IOCTL_NOTIF_SEND, {id=..., val=0, error=-EFAULT, flags=0}) = 0

Every intercepted fstat/newfstatat returns EFAULT to the child because the stat result can't be written back.

Suggestion: fall back to /proc//mem when process_vm_readv/process_vm_writev return ENOSYS, and/or detect this at startup with a clear error message.

Activity

  1. congwang-mk commented on Dec 2, 2026

    @congwang-mk
    Contributor

    Thanks for the report. Could you try #368 in your sbx setup and let us know if it fixes it?

  2. twerkmeister commented on Dec 2, 2026

    @twerkmeister
    Author

    Thanks @congwang-mk for the quick reply and fix, it works like a charm!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions