System architecture from a security perspective

This page describes the security architecture of Ubuntu as a general-purpose operating system: the platform that Ubuntu Server and Ubuntu Desktop share, with software delivered as deb packages and snaps. It identifies: the trust boundaries of an Ubuntu system; the mechanisms that protect each boundary; which of those mechanisms are active by default, and which you need to enable. The same architecture largely applies to other forms of Ubuntu that build on this platform, such as cloud images, Ubuntu on WSL, and Ubuntu container images, although some of them omit or delegate components, for example the boot chain.

Use this page to:

  • understand where untrusted input enters a system and what mediates it

  • decide which additional protections your deployment needs

  • support security assessments, such as the technical documentation required by the EU Cyber Resilience Act (CRA)

Purpose and scope

This page explains how Ubuntu achieves a secure-by-default configuration, protection against unauthorized access, a limited attack surface, and mitigation of exploits. If you build a product with digital elements or a solution with Ubuntu, or derive a flavor from it, this page describes the security architecture that you build on and inherit.

The architecture separates five zones:

  • Untrusted external entities, such as network peers and attached devices

  • External infrastructure services that Ubuntu relies on, such as the Ubuntu archive and the Snap Store

  • Userspace workloads, services and applications from deb packages and snaps

  • The Linux kernel, which enforces access control and isolation

  • Hardware, firmware, and the boot chain, which anchor trust in the system

The mechanisms described in this section protect the system regardless of where its software comes from: the kernel confines third-party services in the same way as packages from the Ubuntu archive, and snapd confines third-party snaps in the same way as any other snap. However, Canonical does not review, maintain, or provide security updates for third-party software, so the delivered configuration, content and behavior that such third-party software provides is outside the scope of this reference. Packages from third-party APT repositories also run their installation scripts as root, without any security boundary between them and the rest of the system. See Third party repository usage.

Canonical maintains a detailed threat model for the Ubuntu platform, which lists the assets of the system, the data flows between them, and the controls that mitigate threats to them. This page is a high-level view derived from that threat model. It groups those assets, data flows, and controls by trust boundary, so that you can see how they relate to one another.

This reference describes Ubuntu 26.04 LTS. Notes highlight where Ubuntu 24.04 LTS differs. Ubuntu Core uses a different, all-snap architecture and is not covered here. Components that only exist on Ubuntu Desktop, such as the display server and desktop portals, are mentioned only where they change a trust boundary.

Architecture views

The architecture is described in four views, from the outside of the system to the hardware. Each view has its own page with diagrams.

System context and external trust boundaries

Trust boundaries between an Ubuntu system, untrusted entities, and the external infrastructure services that Ubuntu relies on.

Layered defense-in-depth architecture

The four layers of security mechanisms in Ubuntu, from the network to the hardware, and which of them are enabled by default.

Network, userspace, and kernel boundaries

How Ubuntu mediates network input, privilege elevation, and system calls at the network, userspace, and kernel boundaries.

Kernel, hardware, boot, and storage boundary

How Ubuntu verifies the boot chain, protects data at rest, and controls devices, kernel modules, and firmware.

Security controls reference

The following table lists the security mechanisms in this reference by boundary, with their default state in Ubuntu 26.04 LTS. The default state is one of:

  • Enabled by default: active on a new installation

  • Opt-in: you need to choose and enable the mechanism

  • Platform-dependent: active by default if the hardware or firmware supports and enables it

Boundary

Mechanism

Purpose and function

Default state

Details

Network to userspace

Host firewall (Netfilter, nftables, ufw)

Blocks or limits network traffic to and from the system before it reaches a service.

Opt-in

Firewall, netfilter subsystem

Network to userspace

No open ports policy

Keeps a new installation free of listening network services, with few documented exceptions.

Enabled by default

No open ports

Network to userspace

TCP SYN cookies

Keeps TCP services reachable during SYN flood attacks.

Enabled by default

SYN cookies

Network to userspace

Encrypted and authenticated communications

Protects remote sessions and service traffic with SSH and TLS, using modern protocol versions and algorithms.

Enabled by default

OpenSSH server, Cryptography

Network to userspace

Service sandboxing (systemd)

Drops privileges and restricts filesystem, device, and kernel access for services whose unit file configure such restrictions.

Enabled by default

systemd.exec(5)

Outbound

Authenticated time synchronization (NTS)

Prevents attackers on the network from changing the system time.

Enabled by default

About time synchronization

Outbound

DNSSEC validation

Rejects forged DNS answers for signed domains.

Opt-in

DNS Security Extensions (DNSSEC), Installing DNS Security Extensions (DNSSEC)

Outbound

Entropy seeding (Pollinate)

On Ubuntu Server and cloud images, seeds the random number generator from Ubuntu’s entropy service on first boot. Removal from the default installation since 26.04.

Enabled by default prior to 26.04

Cloud PRNG seed, Pollinate analysis

Outbound

System telemetry (Ubuntu Desktop)

Shares non-identifying system information with Canonical only after you consent, and keeps a local copy of each report for inspection.

Opt-in

Product data collection notice, Ubuntu Insights

Privilege elevation

Authentication (PAM)

Verifies user identity for all login paths, with optional multi-factor authentication, smart cards, or network identity providers.

Enabled by default

Security, Smart card authentication, authd

Privilege elevation

Locked root account

Prevents direct logins as root, so that administrative actions are tied to a user account.

Enabled by default

User management

Privilege elevation

sudo-rs and polkit

Lets authorized users run administrative tasks with their own credentials, and lets privileged daemons authorize unprivileged callers.

Enabled by default

sudo-rs, polkit(8)

Userspace to kernel

File permissions and ACLs

Restricts access to files and devices based on owner, group, and access control lists.

Enabled by default

File handling, acl(5)

Userspace to kernel

Capabilities

Splits root privileges into separate units, so that a process holds only the privileges it needs.

Enabled by default

Filesystem capabilities, capabilities(7)

Userspace to kernel

seccomp-bpf

Limits the system calls that a process can make.

Enabled by default

Seccomp filtering

Userspace to kernel

AppArmor

Confines programs to the resources listed in their profile, even when they run as root, and restricts unprivileged user namespaces.

Enabled by default

Using AppArmor, AppArmor enforcement

Userspace to kernel

Yama ptrace scope

Prevents a process from inspecting or modifying the memory of processes other than its descendants.

Enabled by default

ptrace scope

Userspace to kernel

Namespaces and cgroups

Isolate processes from each other and limit their resource use.

Enabled by default

cgroups, namespaces(7)

Userspace to kernel

Snap confinement

Combines AppArmor, seccomp, device cgroups, and mount namespaces to isolate each strictly confined snap.

Enabled by default

Snap confinement

Userspace to kernel

Kernel memory hardening

Makes kernel exploits harder by hiding kernel addresses, randomizing the kernel location, and write-protecting kernel code and data.

Enabled by default

Kernel protections

Userspace to kernel

Process memory protections

Makes exploits of applications harder with hardened compiler flags and address space layout randomization (ASLR).

Enabled by default

Compiler flags, ASLR

Kernel to hardware

UEFI Secure Boot

Verifies the signatures of the boot loader and kernel before running them.

Platform-dependent

UEFI Secure Boot

Kernel to hardware

Kernel lockdown and module signatures

Prevents root from modifying the running kernel, and rejects unsigned kernel modules.

Platform-dependent

Kernel lockdown

Kernel to hardware

TPM measured boot

Records each boot stage in the TPM, so that secrets are only released to an unmodified system.

Platform-dependent

Trusted Platform Module

Kernel to hardware

Full disk encryption

Protects data at rest if a disk is lost or stolen.

Opt-in

Full disk encryption, TPM-based LUKS decryption with Clevis

Kernel to hardware

Kernel keyrings

Hold keys in kernel memory with per-key access control.

Enabled by default

keyrings(7), kernel key retention service

Kernel to hardware

IOMMU DMA protection

Restricts the memory that devices can access through DMA.

Platform-dependent

Devices, x86 IOMMU support

Kernel to hardware

USB device authorization (usbguard)

Blocks USB devices that are not on an allow list.

Opt-in

usbguard

Kernel to hardware

Memory encryption (AMD SEV, Intel TDX)

Encrypts the memory of virtual machines, to protect it from the host.

Platform-dependent

CPU features

Kernel to hardware

Firmware updates (fwupd)

Installs signed firmware updates from the LVFS.

Enabled by default

fwupdmgr(1)

Kernel to hardware

Physical access control

Restricts physical and console access to the system.

Opt-in

Console security

Whole system

Signed packages and images

Verifies the integrity of packages, snaps, and installation images, independently of the download source.

Enabled by default

Archive verification, image verification

Whole system

Security updates

Installs security updates automatically, and keeps the system on a supported release.

Enabled by default

Automatic updates, How to upgrade your Ubuntu release, security updates

Whole system

Monitoring and alerting

Collects metrics and logs, and alerts operators to unexpected behavior.

Opt-in

Observability, Set up your LMA stack, Landscape

Whole system

Auditing and compliance hardening

Records security-relevant events, and applies and audits hardening profiles such as CIS Benchmarks.

Opt-in

auditd(8), Ubuntu Security Guide

Diagram conventions

The diagrams in this reference use the following conventions. Each diagram shows a legend with the conventions that it uses. Every label that describes a non-default state also carries a text tag, so the meaning does not depend on color or line style alone.

Element

Appearance

Meaning

Trust zone

Box with a thick black border containing other elements

A region with a common trust level, for example Outside — untrusted

Untrusted actor

White box, dashed border

An entity outside the system that you cannot trust

External service

White box, solid border

Infrastructure outside the system that Ubuntu relies on

Component, layer, or upstream mechanism

Light gray box, solid border

A component or layer of the system, or a mechanism provided by the upstream Linux kernel or userspace

Ubuntu default

Dark grey box, white text

A mechanism that Ubuntu enables or configures by default

Opt-in

Light gray box, dashed border

A mechanism that you need to choose and enable

Platform-dependent

Black box, dashed border

A mechanism that Ubuntu uses by default when the hardware or firmware supports and enables it

Data flow

───▶ Solid orange arrow

Data that crosses a boundary, in the direction of the arrow

Untrusted or optional flow

╌╌▶ Dashed orange arrow

Untrusted input, or a flow that only exists when you enable an opt-in mechanism

Boxes in the diagrams link to their explanation when it is on the same page. Below a diagram, links point to the explanations of its other elements.

Further reading