Software sandboxing: The basics (2025)
Software sandboxing, a concept that remains largely unexplored, is a method to limit a process's privileges without requiring administrative control over the machine. This ensures that processes operate with the least amount of authority necessary (principle of least privilege). In the mid-2000s, experts like Julien Tinnes and Chris Evans defined sandboxing as the ability to restrict a process's privileges programmatically, without administrative authority, and through discretionary privilege dropping.
Different operating systems provide varying interfaces for software developers and system administrators. Traditional UNIX file system permissions are typically employed to isolate services, but they fall short when it comes to modeling security policies required by other virtual worlds. These limitations extend to third-party programs such as web browser plugins, which need to run without full access to a user's filesystem.
Traditional UNIX interfaces, like setuidgid, struggle to provide the necessary functionality for programmatic privilege dropping. Instead, specialized interfaces are available in modern operating systems, such as FreeBSD's Capsicum and Linux's Seccomp. When these interfaces were not readily available, programmers resorted to creating sandboxes using mechanisms only accessible to the superuser, such as helper suid binaries that configure a chroot jail.
However, these methods are not universally applicable and can negate security measures by effectively raising privileges to full administrative authority.
Linux namespaces, popularized by the Docker boom, offer a way to isolate services. However, within a nested user namespace, the process runs with superuser privileges, exposing kernel code paths to all users. This approach has led to security vulnerabilities in the past and poses ongoing risks. Moreover, newer sandboxing interfaces like Landlock were designed to prevent the exponential increase of the kernel attack surface, making them a more secure alternative to Linux namespaces for software sandboxing in the long term.
Written by urgent.news from Lobsters's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.