SYD(1)
π 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, andnosymfollow. - 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
EACCESwhile 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 incrementinglog/verboseby one. more yapping, more info π-cβ Login shell compatibility. Causescommandto be executed under a shell with the user profile. The shell to execute is/bin/shby default. Use the environment variableSYD_SHELLto 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-fand-lare 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 variableSYD_QUICK_BOOTfor 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. Seepandora(1)which is a tool that uses Syd's trace mode to automatically generate sandbox profiles. π-mconfig β Configure sandbox during init, may be repeated.-pname β Use a sandbox profile during init, may be repeated.-Ppath β Run a configuration file during init, may be repeated.-aalias β Set alias of the command. Passed asargv[0]to the program. π-eβ Use-e var=valto putvar=valin the environment forcommand, may be repeated. Use-e varto removevarfrom the environment forcommand, may be repeated. Use-e var=to pass-through an unsafe environment variable, may be repeated. π±-ttimeout β Specify sandbox timeout in human readable format. Equivalent totimeoutoption, refer tosyd(2)for more information. β°-Emode β Export secure computing rules with the given format to standard output and exit. Mode must be one ofbpforpfc:bpf, aka Berkeley Packet Filter is a binary, machine readable format, whereaspfc, aka Pseudo Filter Code is a textual, human readable format. π€--apiβ Outputsyd(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β Outputsyd.elwhich is the Emacs Lisp implementation of Sydstat(2)interface. This file is also available via the magic path/dev/syd.el. π§--shβ Output a shell script which defines theesydhelper function. This file is also available via the magic path/dev/syd.sh. Works with POSIXsh,bashandzsh. You may useeval "$(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 theipccommand, see thesyd(2)manual page. theipccommand has precedence over this environment variable, periodt.SYD_LOGβ sets the log level toemerg,alert,crit,error,warn,notice,info, ordebug. pick your vibe β¨.SYD_LOG_BUF_LENβ sets thesyslog(2)ring buffer capacity. by default, the ring buffer is allocated on the stack with256ksize. setting this variable makes Syd allocate the ring buffer on the heap with the user-specified size. the value is parsed using theparse-sizecrate β refer to their documentation for info on formatting, iykyk.SYD_LOG_FDβ sets the log file descriptor, defaults tostderr(3). negative values are permitted as a shorthand to disable logging. positive values must be valid FDs or Syd will exit withEBADF("Bad file number"). no cap, thatβs the whole rule π.SYD_PDSβ sets the parent-death signal withPR_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 least1.SYD_NPROC_MAXβ sets the number of maximum syscall handler threads, defaults tousize::MAX. the number must be greater thanSYD_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 legacysocketcall(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 totrace/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-Eoption.SYD_SKIP_SCMPβ skipsseccomp(2)confinement of per-Syd threads. this is unsafe and should only be used for profiling. Syd honours theRUST_BACKTRACEenvironment 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 withoutCONFIG_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 theRESOLVE_NO_SYMLINKSresolve flag at theopen(2)boundary. equivalent totrace/force_no_symlinks:1.SYD_FORCE_NO_MAGICLINKSβ forces theRESOLVE_NO_MAGICLINKSresolve flag at theopen(2)boundary. equivalent totrace/force_no_magiclinks:1.SYD_FORCE_NO_XDEVβ forces theRESOLVE_NO_XDEVresolve flag at theopen(2)boundary. equivalent totrace/force_no_xdev:1.SYD_FORCE_CLOEXECβ forces close-on-exec for file descriptors. equivalent totrace/force_cloexec:1.SYD_FORCE_RAND_FDβ uses randomized file descriptors to harden against fd reuse. equivalent totrace/force_rand_fd:1. this environment variable is ignored ifkcmp(2)isnβt supported.SYD_FORCE_RO_OPENβ rejects creating and writingopen(2)calls. equivalent totrace/force_ro_open:1.SYD_FORCE_WX_OPENβ rejects creating and writingopen(2)calls for executables. equivalent totrace/force_wx_open:1.SYD_FORCE_LOCAL_NETβ forces local networking, and rewrites all addresses to loopback for bind/connect. equivalent totrace/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 ofproxy/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 ofproxy/ext/port.SYD_PROXY_UNIXβ sets the default value forproxy/ext/unix, which overridesproxy/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-executesyd(1)orsyd-oci(1), as Exherbo Linux does duringcave-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 forrlimit/as.SYD_RLIMIT_COREβ sets the default value forrlimit/core.SYD_RLIMIT_DATAβ sets the default value forrlimit/data.SYD_RLIMIT_FSIZEβ sets the default value forrlimit/fsize.SYD_RLIMIT_MEMLOCKβ sets the default value forrlimit/memlock.SYD_RLIMIT_NICEβ sets the default value forrlimit/nice.SYD_RLIMIT_NOFILEβ sets the default value forrlimit/nofile.SYD_RLIMIT_NPROCβ sets the default value forrlimit/nproc.SYD_RLIMIT_RTPRIOβ sets the default value forrlimit/rtprio.SYD_RLIMIT_RTTIMEβ sets the default value forrlimit/rttime.SYD_RLIMIT_SIGPENDINGβ sets the default value forrlimit/sigpending.SYD_RLIMIT_STACKβ sets the default value forrlimit/stack.SYD_TMOUTβ sets the default value fortimeout.SYD_NO_CROSS_MEMORY_ATTACHβ disables cross memory attach and usesproc_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 toproc_pid_mem(5)automatically ifprocess_vm_readv(2)orprocess_vm_writev(2)fails withENOSYS, which indicates kernel support is missing for these system calls. the variableSYD_NO_CROSS_MEMORY_ATTACHhas precedence over this variable.SYD_ASSUME_KERNELβ overridesuname(2)to get the host Linux kernel version used for feature detection. Syd reports the major and minor kernel version at theuname(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 thesandbox/lpathoption for the paludis profile, defaults to off.SYD_PALUDIS_NPATHβ overrides thesandbox/npathoption for the paludis profile, defaults to off.SYD_PALUDIS_LISTβ overrides thesandbox/listoption for the paludis profile, defaults to off.SYD_PALUDIS_WALKβ overrides thesandbox/walkoption for the paludis profile, defaults to off.SYD_PALUDIS_IOCTLβ overrides thesandbox/ioctloption for the paludis profile, defaults to off.SYD_PALUDIS_PASSFDβ overrides thesandbox/passfdoption for the paludis profile, defaults to off.SYD_USER_LPATHβ overrides thesandbox/lpathoption 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,segvguardetc.capβ the sandbox capabilityactβ the sandbox action, one of:allow,warn,deny,panic,stop,abort,killorexitpidβ the process IDpathβ the path argument of the syscalladdrβ the network address argument of the syscall, e.g.127.0.0.1!22unixβ the UNIX socket address argument of the syscallipvβ the IP version of the network address in theaddrfield (4or6)absβ true if the socket address in theunixfield is an abstract UNIX socketsysβ the name of the syscallarchβ the architecture of the syscallargsβ the arguments of the syscallcmdβ the process name, or the command line if the log output is a TTY or the log feature is enabledcwdβ the current working directory of the sandbox processuidβ the user IDtimeβ the timestamp in an ISO8601-compatible format, currentlyYYYYMMDDThhmmssZ- 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 messagestipβ 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 errors124β 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:
- syd homepage:
https://sydbox.exherbo.org/ - libsyd homepage:
https://libsyd.exherbo.org/ - pandora homepage:
https://lib.rs/pandora_box - paludis homepage:
http://paludis.exherbo.org/ - Landlock homepage:
https://landlock.io
π 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
- arch rolling: syd 3.59.0-1 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms