LinuxXI · Package ManagementSecurity updates
Security updates and CVE response
What you'll learn
- Configure automatic security updates with unattended-upgrades or dnf-automatic
- Distinguish security updates from feature updates
- Plan CVE response: identify, test, deploy, verify
- Audit the fleet for missed security updates
Prerequisites
Verified against Ubuntu 24.04 LTS · Debian 12 (Bookworm) · RHEL 9.x · Rocky Linux 9.x · AlmaLinux 9.x · Linux kernel 6.1 LTS / 6.6 LTS · systemd 255+ · OpenSSH 8.7p1 (RHEL 9) / 9.6p1 (Ubuntu 24.04) · nftables 1.0.x · chrony 4.x · Pacemaker 2.1.x · Corosync 3.1.x · 2026-08-09
Security updates arrive continuously; the discipline is to receive them quickly, test them, and deploy them in waves. A host that misses a year of security patches is a host that will be compromised.
Unattended upgrades (Debian-family)
$ cat /etc/apt/apt.conf.d/50unattended-upgrades | head -30Unattended-Upgrade::Origins-Pattern (config contents snipped)
Unattended-Upgrade Package-Blacklist is empty
Unattended-Upgrade::DevRelease false
Unattended-Upgrade::AutoFixInterruptedDpkg true
Unattended-Upgrade::MinimalSteps true
Unattended-Upgrade::InstallOnShutdown false
Unattended-Upgrade::Remove-Unused-Kernel-Packages true
Unattended-Upgrade::Remove-New-Unused-Dependencies true
Unattended-Upgrade::Remove-Unused-Dependencies false
Unattended-Upgrade::Automatic-Reboot false
Unattended-Upgrade::Automatic-Reboot-Time 02:00
Illustrative output
$ sudo unattended-upgrade --dry-run --debug...Illustrative output
dnf-automatic (RHEL-family)
$ cat /etc/dnf/automatic.conf | head -20[commands]
upgrade_type = security
apply_updates = yes
download_updates = yes
random_sleep = 300
[emitters]
emit_via = email
[email]
email_from = root@example.com
email_to = admin@example.com
...Illustrative output
$ sudo systemctl enable --now dnf-automatic.timer; sudo systemctl list-timers dnf-automatic*...Illustrative output
CVE response workflow
For a CVE that affects your fleet:
- Identify — read the CVE; confirm the host is affected (the package is installed and the vulnerable code path is reachable)
- Assess — CVSS score is a hint, not a verdict. A CVSS 9.0 in an unused code path may be deferred; a CVSS 6.0 in an exposed service is urgent
- Test — apply the patch to a clone host or a single canary host; run smoke tests; check for regressions
- Deploy — staged rollout: dev → canary → production wave 1 → production wave 2
- Verify — confirm the new package version is installed on every host; confirm the vulnerable code path is gone
- Document — what was affected, what the timeline was, what worked, what did not
Auditing the fleet for missed updates
$ ansible all -m shell -a 'apt list --upgradable 2>/dev/null | wc -l' 2>/dev/null...Illustrative output
Knowledge check
Knowledge check · 3 questions
Q1. What does `unattended-upgrade` install by default on a Debian-family host?
Q2. A high CVSS score always means an emergency patch.
Q3. Which of the following are correct security-update practices? Select all that apply.
Passing score: 75%. Answers are checked in this browser.