Skip to content

About

A Linux kernel fork with Pressure, an LSM that uses authenticated sessions and provenance to enforce access policy, plus SFW socket firewalling and the press and sure tools that replaces SELinux and Netfilter

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Kernel, Pressurized

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.

What “pressurized” means

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 slots 0..63 for verified local POSIX shell redirections and ignoring benign subprocess FD-cleanup loops. Three forged FD or policy-bypass strikes deliver an uncatchable kernel SIGKILL.
  • Event-Driven AF_UNIX Capability-Broker Networking (sfw.ko): Direct AF_INET, AF_INET6, and AF_PACKET sockets are blocked in userspace. Applications communicate over kernel-brokered AF_UNIX stream/datagram pipes (/run/pressure/sfw/mux.sock) backed by an event-driven sfw_wq engine with native poll/epoll/read/write semantics, 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,384 rules + per-open-FD caching), automatic execve domain transitions, BOOT_SEALED headless server lockdown, SELinux-style modes (minimum, targeted, strict, mls with 64-bit Bell-LaPadula levels/compartments), security.pressure v2 SHA-256 file pinning, and a golden Boot Access Manifest.

Core Components

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.

Server, Desktop, and Developer Profiles

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 automatic sshd/nginx/php-fpm execve transitions and Java4Shell JNDI port blocks.
  • interpreters.pr — Base managed-runtime confinement for POSIX sh/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 (targeted mode) providing friction-free local builds, compilers, and JIT runtimes (AUTH_LOCAL) while hard-stopping REMOTE-tainted processes; production deployments lock down per-app rules generated with sure analyze-elf and sure scan-runtime.
  • desktop.pr — Interactive physical tty1 desktop profile (PRESSURE_PROFILE=desktop).

Build and try it

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-test

Validate 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.pr

Documentation and licensing

See 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.

About

A Linux kernel fork with Pressure, an LSM that uses authenticated sessions and provenance to enforce access policy, plus SFW socket firewalling and the press and sure tools that replaces SELinux and Netfilter

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages