This episode assembles an end-to-end LXC security strategy: the fact of the CVE-2026-39402 fix in LXC 7.0, the obligation of routine patching, host-container isolation, and the threat model of unprivileged + AppArmor + seccomp + latest kernel as defense in depth.

The last three episodes (13-15) gave you the security tools: MAC, seccomp, capabilities, and idmap. In episode 16 we assemble them into a complete security strategy — including understanding the side most often forgotten: software vulnerabilities (CVEs) and the duty to update. Security isn't a feature installed once; it's a routine.
CVE-2026-39402 is a security vulnerability fixed in LXC 7.0 LTS. Vulnerabilities like this usually involve how LXC handles certain operations that can be abused to bypass isolation — privilege escalation or escaping the container.
The key point to understand: LXC is software, and software has bugs. Even though unprivileged containers are designed to be safe, implementation bugs can still open gaps. LXC maintainers close them through patch releases, and LTS 7.0 carries those fixes.
Defense in depth (unprivileged + AppArmor + seccomp + new kernel) makes exploits harder — but not impossible. Every unpatched CVE is a door the attacker knows about. The routine:
sudo apt update && sudo apt upgrade
sudo reboot # for a new kernelCheck the version after updating:
lxc --version
lxc-checkconfigImportant
Honor the LTS window: as long as LXC 7.0 LTS is supported until June 2031, security fixes will keep being released for it. Once your version passes end of support, upgrade to the next LTS — don't leave an unpatched version exposed in production.
LXC security depends on a clean separation between host and container. Things that erode this separation:
Every loosening must be a conscious decision with a documented reason, not a debugging shortcut.
Never give privileged root to users you don't trust.
This is the rule most often violated in homelabs. Running a privileged container "to make it easy" on a host serving several people is an invitation to disaster.
LXC depends on kernel features — and so does its security. Old kernels have CVEs that will never be patched for them. When choosing an LXC host, prioritize a distro with active kernel and security updates.
Tip
Think of it in layers: if seccomp fails, capabilities still restrict; if capabilities leak, AppArmor still holds; if AppArmor leaks, idmap makes container root powerless on the host. No single layer is perfect — it's their combination that's strong.
[ ] Latest kernel (LTS host) and lxc-checkconfig passing
[ ] Unprivileged container with 0-65536 idmap
[ ] AppArmor profile active (not unconfined)
[ ] Default or tested custom seccomp profile
[ ] lxc.cap.drop removing unused capabilities
[ ] lxc.cgroup2.devices.deny = a (allow only what's needed)
[ ] Networking: veth to bridge; no devices shared carelessly
[ ] LXC version within support window; scheduled routine updates
[ ] Snapshot before risky changes (episode 9)lxc --version, uname -r, run a container smoke test.Key takeaways:
In the next episode 17 we'll cover LXC 7.0 LTS & latest features — the support schedule until June 2031, cgroup2 and modern kernel maturity, security fixes, the position of 6.0 moving to slow maintenance, and the release history of 6.0, 5.0, and 4.0.