Skip to content

Security / Least privilege

Security is the architecture, not an add-on.

Having an identity does not imply having access. Every program starts with almost nothing and each permission is granted explicitly, as a capability that can be checked, delegated or revoked.

Capability access example: AriInit grants handles to hello_app. The kernel and services enforce their rights. Reading hola.txt is allowed; network access is denied because the app has no net handle.

Access model for the manifest below. Each resource needs explicit permission.

Least privilege

An application asks; the broker decides

init reads the manifest and hands over only those handles, in a fixed order. Asking for spawner, pci, framebuffer or input (the raw keyboard) makes it refuse the launch. Without a manifest a program gets the console and nothing else. Each desktop application has a capability of its own (launch, terminal, home, settings), granted only to that signed package. A program reads the clipboard only when the owner pastes into it, and only the owner can take a copy of the screen, at most once every 2 s and with a notice on it.

hello_app.manifest
name       = hello_app
caps       = system, fs      # no net, no window, no block
memory     = 128K            # DMA buffer quota
read_files = hola.txt        # one shared file, read-only

Defence in depth

Nine layers, enforced by design

Minimal ring 0

Drivers, file systems and networking live outside the kernel, so a bug there does not run with full privileges.

Memory safety

Rust no_std throughout the trusted base; unsafe only where the hardware demands it, and every use justified.

W^X & NX

A page is writable or executable, never both. Data cannot be executed, and the kernel image is read-only where it should be.

Handles with rights

Kernel objects are reached through handles that carry a generation and a rights mask; revocation invalidates every copy.

IOMMU per driver

With Intel VT-d each driver gets its own DMA domain: a device can only write to the buffers mapped for it. A mapped buffer stays alive until it is unmapped, a dead driver’s device is stopped before its memory is freed, and the addresses a device reports are checked before the CPU uses them. On the HD 4000, the kernel writes the GPU’s page tables and runs its own checked copy of each batch, and the EUs’ registers are cleared between clients (ADR 0083, 0086).

Signed images

System images and application packages are signed with Ed25519 and checked with SHA-256 before they boot or install.

A/B with rollback

Updates go to the inactive slot. If the new system does not confirm itself, the loader returns to the previous one.

Resource quotas

DMA memory quotas per application and a limit on running programs: nobody brings the system down by asking for more.

Measured cryptography

RustCrypto and the dalek crates for SHA-2, AES-GCM, ChaCha20-Poly1305, Ed25519 and X25519, and rustls for TLS, after measuring them against ours; ECDSA and RSA verification, HMAC, HKDF and the kernel generator stay ours (ADR 0066, 0067). Certificate keys known to be compromised are refused anywhere in a chain.

Honest limits

What is not there yet

Secure Boot with AriCodeOS keys is planned: today AriBoot verifies the signature chain, not the firmware. Address space layout randomisation (ASLR) is planned for a later phase. On machines without a hardware random source, the loader carries a seed across boots, so the kernel generator is strongly seeded from the second boot, and diag says what seeded it.