Linux Kernel, Pressurized is a Linux 7.3.5 source tree with Pressure, a Linux Security Module (LSM) and zero-Netfilter capability-broker networking stack (sfw.ko) that authorize operations using cryptographic identity, sticky network provenance, session context, SHA-256 binary/script integrity, and optional 64-bit Multi-Level Security (MLS). Its central goal is stopping remote code execution (RCE)—such as buffer overflows, Log4Shell/Java4Shell JNDI injection, or PHP/Python/Node deserialization—from dropping into a shell, hijacking another process, or pivoting across the network.
A policy distinguishes an authenticated local session (AUTH_LOCAL) from a network-tainted process (REMOTE), a daemon from a human user, and a kernel-verified controlling terminal from a terminal name supplied by userspace:
- Encrypted Non-Monotonic Descriptors & Interpreter Compatibility: Confined tasks receive 31-bit SipHash Feistel public descriptors (
0x40000000 | cipher30) backed by random private slots (>= 64), while reserving fixed slots0..63for verified local POSIX shell redirections and ignoring benign subprocess FD-cleanup loops. Three forged FD or policy-bypass strikes deliver an uncatchable kernelSIGKILL. - Event-Driven
AF_UNIXCapability-Broker Networking (sfw.ko): DirectAF_INET,AF_INET6, andAF_PACKETsockets are blocked in userspace. Applications communicate over kernel-brokeredAF_UNIXstream/datagram pipes (/run/pressure/sfw/mux.sock) backed by an event-drivensfw_wqengine with nativepoll/epoll/read/writesemantics, subject-scoped socket rules, and dual-stack 5-chain stateful NAT44/NAT66. - Scale, Modes, Integrity & Headless Boot Sealing: Lockless O(1) RCU policy packs (
16,384rules + per-open-FD caching), automaticexecvedomain transitions,BOOT_SEALEDheadless server lockdown, SELinux-style modes (minimum,targeted,strict,mlswith 64-bit Bell-LaPadula levels/compartments),security.pressurev2 SHA-256 file pinning, and a golden Boot Access Manifest.
| Component | Role |
|---|---|
| Pressure LSM | The kernel LSM enforces O(1) RCU policy rules, encrypted FDs, execve transitions, SHA-256 integrity, boot manifests, minimum/targeted/strict/mls modes, and ptrace/module/JIT hard-stops via securityfs. |
sfw.ko |
The socket capability broker & firewall replaces Netfilter with an event-driven AF_UNIX broker (sfwd), subject-scoped IPv4/IPv6 socket authorization, stateful conntrack/conntrack6, and 5-chain NAT44/NAT66 (preserving Pariwall and QuadTap). |
sure |
The policy compiler, audit & generator CLI validates and transactionally loads .pr policies, inspects audit events, and generates binary/runtime policies via analyze-elf, scan-runtime (PHP, Java, Python, JS/TS, Ruby, Perl, Lua, .NET, Shell), import-fc, and boot-dump. |
press & authd |
Pressure authd, PAM, and press manage AES-256-GCM account vaults, random non-sequential UIDs paired with secret kernel kpriv_uids, PAM sessions, and monotonic process confinement. |
Pressure separates server and desktop builds (PRESSURE_PROFILE=server by default; PRESSURE_PROFILE=desktop / CONFIG_SECURITY_PRESSURE_DESKTOP=y when interactive tty1 desktop helpers are needed) and ships four ready-to-validate policies in userspace/policies/:
server.pr— Headless dual-stack server profile with automaticsshd/nginx/php-fpmexecvetransitions and Java4Shell JNDI port blocks.interpreters.pr— Base managed-runtime confinement for POSIXsh/bash/zsh, PHP & PHP-FPM (OPcache JIT), Java/JVM, Python 3, Node/Deno/Bun, Ruby, Perl, Lua/LuaJIT, and .NET.developer.pr— Local machine developer profile (targetedmode) providing friction-free local builds, compilers, and JIT runtimes (AUTH_LOCAL) while hard-stoppingREMOTE-tainted processes; production deployments lock down per-app rules generated withsure analyze-elfandsure scan-runtime.desktop.pr— Interactive physicaltty1desktop profile (PRESSURE_PROFILE=desktop).
Use an x86-64 Linux build host with a kernel toolchain, PAM and OpenSSL development headers, QEMU, and BusyBox as detailed in the build guide.
# Build server profile (default) or pass PRESSURE_PROFILE=desktop
make -f dev/Makefile config
make -f dev/Makefile kernel
make -C modules/sfw
make -C userspace PRESSURE_PROFILE=server
cp modules/sfw/sfw.ko dev/shared/
make -f dev/Makefile initramfs
./dev/run-qemu.sh --pressure-testValidate shipped policies or synthesize per-application production rules directly on the host:
./dev/shared/sure check dev/shared/policies/server.pr
./dev/shared/sure check dev/shared/policies/developer.pr
./dev/shared/sure analyze-elf /usr/sbin/nginx --pin-sha256 --out nginx.pr
./dev/shared/sure scan-runtime /var/www/html --pin-sha256 --out webapp.prSee the Pressure technical documentation for complete kernel, LSM, sfw.ko, authd, .pr language, generator, and build specifications.
The Linux kernel and the integrated Pressure LSM are licensed under GPL-2.0-only. The kernel’s COPYING notice references the GPLv2 license text and the Linux syscall exception. See the SPDX identifiers in individual source files for their applicable terms.