Airlock x86-64 · Rust · UEFI · USB boot

An operating system that starts every boot LOCKED.

Airlock is a small capability-based operating system for x86-64 PCs, written in Rust from the kernel up. It boots from a USB stick and is built to be useful on untrusted networks without quietly becoming part of them.

No Linux underneath: its own kernel, scheduler, network stack, USB stack, desktop and drivers.

§1Network lock

Two states. The default sends nothing.

While LOCKED, Airlock transmits nothing at all: no ARP, DHCP, ICMP replies, TCP, Wi-Fi probes or authentication frames. Incoming traffic can still be observed and parsed. Transmission is blocked in software and, on supported Ethernet hardware, by turning the transmitter off.

LOCKEDOPEN
Receive and inspect trafficyesyes
Transmit framesnoyes
DHCP / DNS / ping / outbound TCPnoyes
Join Wi-Finoyes
Listen for incoming connectionsnono

The test suite checks the property from captured wire traffic, not from the kernel's own counters.

§2Architecture

A small kernel, and authority you can name.

Every program runs in Ring 3 in its own address space and holds named capabilities with specific rights. A process can narrow what it holds but never widen it, and the administrative user gets no bypass. Policy and services keep moving out of the kernel.

Ring 0 · kernel

  • scheduling, memory, SMP
  • capability enforcement
  • the network transmit gate
  • trusted UI: lock indicator, permission dialogs, pointer
  • hardware mechanisms

Ring 3 · processes

  • ARP, IPv4, ICMP, UDP, TCP network service
  • DHCP, DNS and NTP services
  • file service and USB storage protocol
  • desktop, compositor and launcher
  • shell, commands and every application

W^X audited at boot, SMEP and SMAP where supported, one hardware thread per physical core by default, and bus-mastering devices without a driver are quiesced.

§3Integrity

Measured from firmware to every program.

Each link checks the next. Programs in /bin are read from the boot stick when first run and refused unless their SHA-256 matches the manifest. Images are reproducible when the build time is pinned.

  1. firmwaresignaturebootloader
  2. bootloaderBLAKE2bconfiguration
  3. configBLAKE2bkernel, /bin/manifest, /bin/filesvc
  4. configSHA-256/bin/manifest
  5. manifestSHA-256each program: bytes, role, grants
  6. kernelSHA-256its own code and constants

Tests break links in the chain on purpose and require the boot to stop or the program to be refused.

§4Features

One system, from the kernel up.

The kernel, drivers, network stack, desktop, page layout and TLS are Airlock's own code. Stylo, Boa and the compilers are ported to run on it. Airlock runs on two ThinkPads and in QEMU/OVMF, and it is self-hosting: rustc and Cargo build Rust programs on Airlock itself.

0 framessent while LOCKED, checked on the wire
TLS 1.3written here, with no library
Self-hostingrustc, Cargo and rustdoc on Airlock
Bun 1.4.4JavaScriptCore without JIT, in QEMU
Full feature list · main T490s verified on the reference laptop

Isolation10

  • Every program in Ring 3, each in its own address space
  • Capability-checked system calls; no ambient authority
  • The prime administrator bypasses nothing
  • Capabilities copied with fewer rights, never more
  • SMEP and SMAP where supported
  • W^X: no page both writable and executable, audited at boot
  • Kernel and user mappings separated, tested with deliberate faults
  • One hardware thread per core by default, SMT siblings parked
  • Bus-mastering devices without a driver quiesced
  • Programs from files ask the person at the machine first

Network lock6

  • Every boot starts LOCKED T490s
  • Software gate plus the Ethernet transmitter turned off
  • Unlocked only by a physical action, in kernel-drawn UI
  • Transmit gate refuses any frame not from this machine
  • Wi-Fi scans are passive, built and checked by the kernel
  • Verified from captured wire traffic

Kernel8

  • Preemptive SMP with threads that migrate between processors
  • Per-thread x87/SSE state across preemption
  • Local APIC, x2APIC and I/O APIC interrupt routing
  • Per-subsystem locks, no big kernel lock
  • Endpoint IPC carrying capabilities, with deadlines
  • Shared read-only buffers, reserved memory, wait on many
  • 96 threads on the machine, 32 per process
  • A hardware journal of live device events

Integrity5

  • Measured boot from firmware signature to each program
  • Every /bin program hash-checked when first run
  • Secure Boot signing tested, chain breaks must stop boot
  • Reproducible images when the build time is pinned
  • Firmware vendored; nothing downloaded at build or boot

Networking8

  • Own stack in a restartable Ring-3 service
  • Ethernet II, ARP, IPv4, ICMP, UDP, outbound TCP
  • DHCP, DNS and NTP, each a Ring-3 service of its own
  • DHCP or static IPv4 per interface
  • No listening sockets, by design
  • TLS 1.3 with Mozilla-derived roots built in
  • SSH: Curve25519, Ed25519, ChaCha20-Poly1305
  • HTTP client, ping, DNS lookups from the shell

Wi-Fi3

  • Intel Wireless-AC 9560: scan and join WPA2-PSK T490s
  • Join policy and key derivation in Ring 3, apart from the driver
  • Radio firmware parsing in one fuzzed module

Storage8

  • FAT12/16/32 read and write
  • AirlockFS state partition for /data and remembered networks
  • /tmp in memory, with logs that have secrets taken out
  • ext2/3/4 inside LUKS1/2 and LVM, read only T490s
  • NTFS and BitLocker by recovery password, read only
  • NVMe, AHCI SATA and USB mass storage
  • USB stick protocol in Ring 3; the boot stick never written
  • Linux and Windows volumes are only ever read

Desktop7

  • Restartable Ring-3 compositor; apps reconnect with their pixels
  • Apps draw their own windows; the desktop cannot read them
  • Movable, resizable windows, dock, Alt+Tab
  • Status bar: clock, battery, Wi-Fi, volume, brightness
  • Two-finger scrolling on Synaptics pads
  • Norwegian and US keyboard layouts
  • 500 rows of scrollback in every terminal

Browser7

  • Tabs, history, full screen; renderer in its own process
  • Servo's Stylo for style, Airlock's own layout
  • Flex, grid, tables, floats, positioning, scrolling boxes
  • Web fonts, harfrust shaping, CJK and symbol faces
  • PNG, progressive JPEG, GIF, WebP, SVG, srcset
  • JavaScript in Boa: DOM, ES modules, fetch, workers, frames
  • Nothing fetched or sent while LOCKED

Applications12

  • Terminal, Files, System monitor
  • System Settings, eleven pages
  • Hardware Browser: PCI, USB, ACPI namespace T490s
  • Sketch and Editor
  • Picture viewer: BMP, PNG, JPEG
  • Music player: WAV, MP3, on HD Audio and USB audio
  • Minesweeper, Solitaire, and DOOM

Shell5

  • Ring-3 shell; commands are /bin programs with their own grants
  • Pipelines: a | b
  • Shell scripts, $?, environment
  • History and Tab completion
  • hwinfo for devices, events and ACPI

Toolchains6

  • rustc, Cargo and rustdoc run natively T490s
  • Rust std for Airlock, and the native linker airlock-ld
  • Proc macros and build scripts run sandboxed
  • clang and lld 21, picolibc, libc++
  • Bun 1.4.4 runs JavaScript, built byte for byte reproducibly
  • Toolchain read from a verified volume, cached by hash

Hardware: UEFI through Limine · ACPI tables and an AML namespace checked against ACPICA · PCI · xHCI with hubs and hotplug · PS/2 and USB keyboards · Intel 8254x, 82574L and I219 Ethernet · Intel HD Audio · battery, AC, lid, power button and backlight · ThinkPad T490s and T460s

§5Testing

Tested past the boot screen.

Every change runs against QEMU guests in parallel: pixel-exact GUI checks, deliberate faults, fuzzed system calls and parsers, and the network lock watched on the wire. Nothing is called done until the full suite passes.

§6Status

Experimental, and says so.

Airlock is a hobby operating system under active development, not a security-audited production system. Its security properties are meant to come from explicit boundaries and tests, not from obscurity.