Pending security updates
HighL04Linux serversCheck for fixed packages you have not installed yet and install them.
What is the risk
Published bugs land in automated attack tools within days. The gap between a fix coming out and you installing it is the riskiest time.
Install updates quickly for packages that face the network, such as OpenSSH, OpenSSL, nginx and the kernel.
How to check
Debian / Ubuntu
sudo apt update
apt list --upgradable 2>/dev/null
apt list --upgradable 2>/dev/null | grep -- -securityThe last line shows only packages from the security repository.
RHEL / Rocky / Alma
sudo dnf check-update
sudo dnf updateinfo list --securityHow to fix
Debian / Ubuntu
sudo apt update && sudo apt upgrade
sudo needrestart -r lThe second line lists services still using old libraries (install it with sudo apt install needrestart if missing).
RHEL / Rocky / Alma
sudo dnf upgrade --security
sudo dnf needs-restarting -sDebian / Ubuntu
sudo apt install unattended-upgrades
sudo dpkg-reconfigure -plow unattended-upgradesInstalls security updates automatically every day.
RHEL / Rocky / Alma
sudo dnf install dnf-automatic
sudo sed -i 's/^upgrade_type.*/upgrade_type = security/; s/^apply_updates.*/apply_updates = yes/' /etc/dnf/automatic.conf
sudo systemctl enable --now dnf-automatic.timerFor RHEL, Rocky and Alma 8 and 9.
How to prevent it
- After updating, check whether services or the server need a restart (L05).
- Take a snapshot or backup of important servers first.
- Releases past end of support get no more updates. Move to a supported release.
Check again after fixing
Debian / Ubuntu
apt list --upgradable 2>/dev/null | grep -- -securityNo output means you are up to date.
RHEL / Rocky / Alma
sudo dnf updateinfo list --securityRun the downloaded check again and make sure this item passes.
Related CVEs
CVE-2024-6387