SYD(1)

πŸ“¦
version 3.59.0 Β· 3 versions
, in arch rolling

πŸ’… SYD β€” the rock solid application kernel

okay bestie, so you're reading syd, section 1 of the General Commands Manual, and honestly? This one's a whole vibe. Buckle up πŸŽ€

✨ NAME ✨

syd β€” Rock solid application kernel. That's it, that's the name, and it ate. πŸ‘‘

✨ SYNOPSIS ✨

syd [-acefhlmpqtxEPV] [--] {command [arg...]}

syd --api

syd --check

syd --el

syd --sh

🌸 DESCRIPTION 🌸

Okay so picture this: Syd is a utility that uses the seccomp(2) system call to sandbox processes on Linux systems version 5.19 or later. It gives you per-syscall control over a process's filesystem and network access, and the best part? no root privileges required. none. zero. nope. πŸ’…

Syd is designed for ease of use across a wide array of architectures, including x86, x86_64, x32, armv7, aarch64, loongarch64, mips, mips64, mips64el, ppc, ppc64, ppc64le, riscv64, and s390x β€” literally embodying the principle of providing simple, flexible, and reliable access control to Linux users. slay across the whole architecture spectrum fr fr 🌈


The core functionality of Syd revolves around restricting a process's resource access through several mechanisms β€” and each one is kind of iconic in its own way:

  • Bind Mounts 🧚 β€” utilized within a mount namespace to enforce restrictions at the Virtual File System (VFS) level, such as read-only, nodev, noexec, nosuid, and nosymfollow.
  • Landlock πŸ¦‹ β€” employs read-only and read-write path restrictions at the kernel level.
  • seccomp-bpf πŸ”₯ β€” applies Secure Computing user filters for kernel-space sandboxing.
  • seccomp-notify ⭐ β€” enables sandboxing in kernel space with user space fallback for dereferencing pointer arguments in system calls, including pathnames and network addresses. Access checks use UNIX shell-style patterns and CIDR notation, defaulting to denying system calls with EACCES while attempting to emulate successful calls to mitigate Time-of-Check to Time-of-Use (TOCTOU) attack vectors. (yes that's a lot of words but it's important, iykyk 😭)

🫢 Prerequisites, aka the vibe check

Prerequisites for Syd include a Linux kernel supporting the pidfd_getfd(2) and pidfd_send_signal(2) system calls, the SECCOMP_USER_NOTIF_FLAG_CONTINUE operation in the Secure Computing facility, and preferably the CONFIG_CROSS_MEMORY_ATTACH kernel option. For syscall emulation, Syd uses the seccomp operation SECCOMP_IOCTL_NOTIF_ADDFD. Syd also sets the SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV flag to correctly handle interrupts during tracing. πŸ’€

While Linux version 5.19 or later is required, for Landlock support Syd requires a kernel configured with the option CONFIG_LSM_LANDLOCK supporting Landlock ABI version 3, with syd-lock(1) available as a helper program to verify kernel support. Linux kernel options CONFIG_KCMP and CONFIG_UNIX_DIAG are recommended. πŸ“‹


By default, Syd restricts the resource space accessible to sandboxed processes as tightly as possible. The SECURITY section of the syd(7) manual page lists all hardening measures and the trace/allow_unsafe_* options to relax specific restrictions when needed. so like, if you need to loosen the reins, that's where you look πŸ‘€

✨ OPTIONS ✨

The following options are understood, bestie:

  • -h, --help β€” Show usage and exit. short and sweet πŸŽ€
  • -V, --version β€” Show version and exit. say hi to the version number ✨
  • -C, --check β€” Print sandboxing support information about the current system and exit. a lil report card for your kernel πŸ“‹
  • -v, --verbose β€” Increase verbosity, equivalent to incrementing log/verbose by one. more yapping, more info πŸ”
  • -c β€” Login shell compatibility. Causes command to be executed under a shell with the user profile. The shell to execute is /bin/sh by default. Use the environment variable SYD_SHELL to override. 🐚
  • -f β€” Login shell compatibility. Causes Syd to parse the user profile on startup.
  • -l, --login β€” Login shell compatibility. Causes Syd to parse the user profile on startup. (yes -f and -l are twins, they're matching besties 🫢)
  • -q β€” Enable quick boot mode for faster startup times. This must be passed as the first option or it will be ignored. See the explanation of the environment variable SYD_QUICK_BOOT for the safety of this option. ⚑
  • -x β€” Enable trace aka "dry run" mode. In this mode Syd will allow system calls even if they raise access violations. This mode with extended logging can be used to build sandboxing profiles in an automated way. See pandora(1) which is a tool that uses Syd's trace mode to automatically generate sandbox profiles. πŸ‘€
  • -m config β€” Configure sandbox during init, may be repeated.
  • -p name β€” Use a sandbox profile during init, may be repeated.
  • -P path β€” Run a configuration file during init, may be repeated.
  • -a alias β€” Set alias of the command. Passed as argv[0] to the program. 🎭
  • -e β€” Use -e var=val to put var=val in the environment for command, may be repeated. Use -e var to remove var from the environment for command, may be repeated. Use -e var= to pass-through an unsafe environment variable, may be repeated. 🌱
  • -t timeout β€” Specify sandbox timeout in human readable format. Equivalent to timeout option, refer to syd(2) for more information. ⏰
  • -E mode β€” Export secure computing rules with the given format to standard output and exit. Mode must be one of bpf or pfc: bpf, aka Berkeley Packet Filter is a binary, machine readable format, whereas pfc, aka Pseudo Filter Code is a textual, human readable format. πŸ“€
  • --api β€” Output syd(2) API specification in JSON format. This specification is intended to ease generation of language bindings. This specification is also available via the magic path /dev/syd. ✨
  • --el β€” Output syd.el which is the Emacs Lisp implementation of Syd stat(2) interface. This file is also available via the magic path /dev/syd.el. 🧚
  • --sh β€” Output a shell script which defines the esyd helper function. This file is also available via the magic path /dev/syd.sh. Works with POSIX sh, bash and zsh. You may use eval "$(syd --sh)" in your shell init file. 🐚

🌈 INVOCATION 🌈

Syd executes a command with the specified arguments under a sandbox and exits with the same status. The sandbox may be constructed by command-line arguments and configuration files. The syd(2) API is available for dynamic configuration if the sandbox lock allows it. An IPC socket may be configured with the ipc command to configure Syd through a UNIX socket. Refer to the syd(2) manual page for more information. πŸ”Œ


🌸 ENVIRONMENT 🌸

okay so before Syd even starts judging syscalls, she’s scanning a whole little stack of env vars like a group chat she refuses to mute πŸ’…. these are the knobs, defaults, and warnings β€” every single one is here, no cap.

  • SYD_IPC β€” sets the UNIX socket address for runtime configuration. it’s equivalent to the ipc command, see the syd(2) manual page. the ipc command has precedence over this environment variable, periodt.
  • SYD_LOG β€” sets the log level to emerg, alert, crit, error, warn, notice, info, or debug. pick your vibe ✨.
  • SYD_LOG_BUF_LEN β€” sets the syslog(2) ring buffer capacity. by default, the ring buffer is allocated on the stack with 256k size. setting this variable makes Syd allocate the ring buffer on the heap with the user-specified size. the value is parsed using the parse-size crate β€” refer to their documentation for info on formatting, iykyk.
  • SYD_LOG_FD β€” sets the log file descriptor, defaults to stderr(3). negative values are permitted as a shorthand to disable logging. positive values must be valid FDs or Syd will exit with EBADF ("Bad file number"). no cap, that’s the whole rule πŸ’€.
  • SYD_PDS β€” sets the parent-death signal with PR_SET_PDEATHSIG(2const) using a signal name or number.
  • SYD_PID_FN β€” sets the pid filename, and makes Syd write its process ID to this file at startup. the file must not exist and is going to be created with user-only read permissions 🫢.
  • SYD_NPROC β€” sets the number of core syscall handler threads, defaults to the number of CPUs. the number must be at least 1.
  • SYD_NPROC_MAX β€” sets the number of maximum syscall handler threads, defaults to usize::MAX. the number must be greater than SYD_NPROC.
  • SYD_CHDIR β€” changes the current working directory to a safe directory at startup. this is implied if no optional arguments are given.
  • SYD_COMPAT_SOCKET β€” allows the legacy socketcall(2) multiplexer system call. this is only necessary for compatibility with libcs which don’t yet support the newer non-multiplexed system calls available as of Linux-4.3. equivalent to trace/allow_unsafe_socketcall:1.
  • SYD_SHELL β€” picks the shell to spawn when invoked as a login shell. it is not split into words. defaults to /usr/bin/bash --login --noprofile --norc --restricted.
  • SYD_DUMP_SCMP β€” exports secure computing rules with the given format, equivalent to the -E option.
  • SYD_SKIP_SCMP β€” skips seccomp(2) confinement of per-Syd threads. this is unsafe and should only be used for profiling. Syd honours the RUST_BACKTRACE environment variable when this is set. this is ignored unless Syd is built with the trusted Cargo feature.
  • SYD_SKIP_NAME β€” skips randomizing Syd thread names, which is useful for debugging. this is ignored unless Syd is built with the trusted Cargo feature.
  • SYD_FORCE_NO_UNIX_DIAG β€” force-disables UNIX socket diagnostics, to test fallback paths used on kernels configured without CONFIG_UNIX_DIAG. this is intended for testing and should not be used in production. this is ignored unless Syd is built with the trusted Cargo feature.
  • SYD_FORCE_NO_SYMLINKS β€” forces the RESOLVE_NO_SYMLINKS resolve flag at the open(2) boundary. equivalent to trace/force_no_symlinks:1.
  • SYD_FORCE_NO_MAGICLINKS β€” forces the RESOLVE_NO_MAGICLINKS resolve flag at the open(2) boundary. equivalent to trace/force_no_magiclinks:1.
  • SYD_FORCE_NO_XDEV β€” forces the RESOLVE_NO_XDEV resolve flag at the open(2) boundary. equivalent to trace/force_no_xdev:1.
  • SYD_FORCE_CLOEXEC β€” forces close-on-exec for file descriptors. equivalent to trace/force_cloexec:1.
  • SYD_FORCE_RAND_FD β€” uses randomized file descriptors to harden against fd reuse. equivalent to trace/force_rand_fd:1. this environment variable is ignored if kcmp(2) isn’t supported.
  • SYD_FORCE_RO_OPEN β€” rejects creating and writing open(2) calls. equivalent to trace/force_ro_open:1.
  • SYD_FORCE_WX_OPEN β€” rejects creating and writing open(2) calls for executables. equivalent to trace/force_wx_open:1.
  • SYD_FORCE_LOCAL_NET β€” forces local networking, and rewrites all addresses to loopback for bind/connect. equivalent to trace/force_local_net:1.
  • SYD_FORCE_TTY β€” forces TTY output, which is pretty-printed JSON.
  • SYD_QUIET_TTY β€” forces quiet TTY output, which is line-oriented JSON.
  • SYD_PROXY_HOST β€” overrides the default value of proxy/ext/host. if the value is a hostname and not an IP address, Syd resolves this hostname at startup and selects a response IP randomly.
  • SYD_PROXY_PORT β€” overrides the default value of proxy/ext/port.
  • SYD_PROXY_UNIX β€” sets the default value for proxy/ext/unix, which overrides proxy/ext/host.
  • SYD_QUICK_BOOT β€” enables quick boot mode, and this makes Syd startup noticeably faster. however, quick boot removes a layer of defense against some container breaks! use this if you frequently re-execute syd(1) or syd-oci(1), as Exherbo Linux does during cave-generate-metadata(1). this is ignored unless Syd is built with the trusted Cargo feature.
quick boot removes a layer of defense against some container breaks! like… bestie, read that twice before you turn it on 😭.
  • SYD_RLIMIT_AS β€” sets the default value for rlimit/as.
  • SYD_RLIMIT_CORE β€” sets the default value for rlimit/core.
  • SYD_RLIMIT_DATA β€” sets the default value for rlimit/data.
  • SYD_RLIMIT_FSIZE β€” sets the default value for rlimit/fsize.
  • SYD_RLIMIT_MEMLOCK β€” sets the default value for rlimit/memlock.
  • SYD_RLIMIT_NICE β€” sets the default value for rlimit/nice.
  • SYD_RLIMIT_NOFILE β€” sets the default value for rlimit/nofile.
  • SYD_RLIMIT_NPROC β€” sets the default value for rlimit/nproc.
  • SYD_RLIMIT_RTPRIO β€” sets the default value for rlimit/rtprio.
  • SYD_RLIMIT_RTTIME β€” sets the default value for rlimit/rttime.
  • SYD_RLIMIT_SIGPENDING β€” sets the default value for rlimit/sigpending.
  • SYD_RLIMIT_STACK β€” sets the default value for rlimit/stack.
  • SYD_TMOUT β€” sets the default value for timeout.
  • SYD_NO_CROSS_MEMORY_ATTACH β€” disables cross memory attach and uses proc_pid_mem(5) unconditionally.
  • SYD_PROC_PID_MEM_FALLBACK β€” by default, Syd uses cross memory attach unconditionally. setting this variable causes Syd to fall back to proc_pid_mem(5) automatically if process_vm_readv(2) or process_vm_writev(2) fails with ENOSYS, which indicates kernel support is missing for these system calls. the variable SYD_NO_CROSS_MEMORY_ATTACH has precedence over this variable.
  • SYD_ASSUME_KERNEL β€” overrides uname(2) to get the host Linux kernel version used for feature detection. Syd reports the major and minor kernel version at the uname(2) boundary within the sandbox. the micro version is randomized per-Syd run to prevent information leaks. this environment variable is ignored unless Syd is built with the "trusted" feature.
  • SYD_PALUDIS_LPATH β€” overrides the sandbox/lpath option for the paludis profile, defaults to off.
  • SYD_PALUDIS_NPATH β€” overrides the sandbox/npath option for the paludis profile, defaults to off.
  • SYD_PALUDIS_LIST β€” overrides the sandbox/list option for the paludis profile, defaults to off.
  • SYD_PALUDIS_WALK β€” overrides the sandbox/walk option for the paludis profile, defaults to off.
  • SYD_PALUDIS_IOCTL β€” overrides the sandbox/ioctl option for the paludis profile, defaults to off.
  • SYD_PALUDIS_PASSFD β€” overrides the sandbox/passfd option for the paludis profile, defaults to off.
  • SYD_USER_LPATH β€” overrides the sandbox/lpath option for the user profile, defaults to on.

πŸ’œ LOGGING πŸ’œ

okay so there are literally eight log levels, and they go in descending priority like this: emerg, alert, crit, error, warn, notice, info, and debug. you can set the log level with the SYD_LOG environment variable, bestie. πŸ“

logs go to stderr(3) unless you specify a file descriptor with the SYD_LOG_FD environment variable. and Syd logs in JSON lines β€” very structured, very demure, very cutesy. πŸŽ€

below is a list of the commonly used log keys with their descriptions, and yes we're going through all of them because every single one matters, no skips:

  • id β€” the sandbox ID, as 64 lowercase hexadecimal characters ✨
  • ctx β€” the context of the log entry, e.g. access, safesetid, segvguard etc.
  • cap β€” the sandbox capability
  • act β€” the sandbox action, one of: allow, warn, deny, panic, stop, abort, kill or exit
  • pid β€” the process ID
  • path β€” the path argument of the syscall
  • addr β€” the network address argument of the syscall, e.g. 127.0.0.1!22
  • unix β€” the UNIX socket address argument of the syscall
  • ipv β€” the IP version of the network address in the addr field (4 or 6)
  • abs β€” true if the socket address in the unix field is an abstract UNIX socket
  • sys β€” the name of the syscall
  • arch β€” the architecture of the syscall
  • args β€” the arguments of the syscall
  • cmd β€” the process name, or the command line if the log output is a TTY or the log feature is enabled
  • cwd β€” the current working directory of the sandbox process
  • uid β€” the user ID
  • time β€” the timestamp in an ISO8601-compatible format, currently YYYYMMDDThhmmssZ
    • heads up: the time format may change, but it will always remain ISO8601-compatible πŸ•°οΈ
    • and formatting errors fallback to printing the timestamp as an integer, so it's never just vibes and silence
  • err β€” error information πŸ’€
  • msg β€” informational messages
  • tip β€” educational messages on how to configure Syd (we love a helpful icon 🧚)

🌈 EXIT STATUS 🌈

Syd exits with the same exit code as the sandbox process. like, it's not doing its own thing, it's matching energy. πŸ’…

if the sandbox process exits with a signal, Syd exits with 128 plus the value of the signal.

in case there was an error in spawning or waiting for the sandbox process, Syd exits with errno(3) indicating the error condition.

and the special ones, memorize these:

  • 101 β€” Syd exits with this on panics 😭
  • 102 β€” Syd exits with this on fatal allocator errors
  • 124 β€” Syd exits with this if the sandbox timeout is exceeded ⏰

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, fr fr:

syd(2), syd(5), syd(7), syd-lock(1), syd-ls(1), syd-mdwe(1), syd-ring(1), sydtutorial(7)

and the homepages, because we support our faves:


πŸ‘‘ AUTHORS πŸ‘‘

maintained by Ali Polatel β€” icon behavior, honestly. 🫢

up-to-date sources can be found at https://gitlab.exherbo.org/sydbox/sydbox.git and on Radicle at rad:z38HCnbmcDegA2BMxuPaPRPMdp6wF.

bugs/patches can be submitted to https://gitlab.exherbo.org/groups/sydbox/-/issues.

and if you wanna chat about it: #sydbox on Libera Chat, or #sydbox:mailstation.de on Matrix. come say hi, we don't bite 🌸


okay that's the whole page bestie, you're officially Syd-literate, go forth and sandbox responsibly πŸ’–βœ¨

this edition of the page is dated 2026-09-01 and it's the SYD(1) manual β€” go off, manual page, slay πŸ’…

πŸ“¦ where this page comes from