Linux Security

Linux quietly runs most of the internet — the majority of cloud servers, nearly every major cloud provider's infrastructure, and the vast majority of internet-of-things devices. That ubiquity is exactly what makes it such a high-value target: a single kernel bug can potentially reach millions of machines at once.


Why Linux Is a Prime Target

Notable Linux Zero-Days

CVE-2022-0847

Dirty Pipe

A kernel vulnerability that let local attackers overwrite data inside read-only files by exploiting a flaw in how Linux's pipe buffers handled page flags — allowing privilege escalation to root despite file permissions explicitly forbidding the write.

CVE-2021-4034

PwnKit

A flaw in Polkit's pkexec utility that had gone unnoticed for over a decade. Any local user could exploit it to gain root privileges in seconds, and because pkexec ships by default, it affected nearly every major Linux distribution at once.

CVE-2016-5195

Dirty COW

A race condition in the kernel's copy-on-write memory handling that let attackers win a timing window to gain write access to memory that should have been read-only, enabling privilege escalation. The bug had existed in the kernel for roughly nine years before it was found.

Beyond the Kernel: The Container Layer

Modern Linux infrastructure rarely runs bare — it runs in containers, orchestrated by tools like Docker and Kubernetes. That adds an entirely new layer of attack surface on top of the kernel itself:

Core Linux Hardening Principles

Least Privilege

Run services under dedicated, unprivileged users — never root — so a compromised process has limited reach.

Mandatory Access Control

Tools like SELinux and AppArmor confine exactly what a process can touch, even after it's exploited.

Minimal Attack Surface

Remove unused packages and services — code that isn't installed can't be exploited.

Patch Cadence

Automated updates and a fast patch cycle close the "n-day" window attackers rely on.

Monitoring & Auditing

Tools like auditd and behavior-based EDR can catch exploitation attempts even without a known signature.

Kernel Hardening

Features like ASLR, stack canaries, and seccomp filters make exploitation significantly harder even when a bug exists.

Key Takeaway

Open source doesn't automatically mean more secure — but it does mean vulnerabilities are found, discussed, and patched in the open, by anyone who cares to look. The real security gain comes from fast patching, layered defenses, and minimizing what's exposed in the first place — whether that's at the kernel level or the container sitting on top of it.