Skip to main content
RunBook Academy

← All checklists in Linux

As neededpatching

Checklist: Post-patching validation

17 items ·14 critical ·3 warn ·0 info

Run this checklist after every patch wave, before the next wave starts. The readiness gates you closed before the change live in linux-checklist-pre-patching; this one proves the change actually landed.

Pending reboot and the running kernel

Two separate checks. The first asks whether anything installed requested a reboot. The second asks whether the reboot happened and took effect.

Read-only / Saferunning vs newest installed kernel
$ uname -r; ls -1 /boot/vmlinuz-* | sed 's|.*vmlinuz-||' | sort -V | tail -1
6.8.0-45-generic
6.8.0-52-generic

Processes still mapping replaced libraries

A library upgrade replaces the file on disk. Processes that already mapped the old inode keep using it until they restart. needrestart (installed by default on Ubuntu) and needs-restarting -s (RHEL, from dnf-utils) list exactly which services are affected.

Read-only / Safeneedrestart -b
$ sudo needrestart -b
NEEDRESTART-VER: 3.11
NEEDRESTART-KCUR: 6.8.0-45-generic
NEEDRESTART-KEXP: 6.8.0-52-generic
NEEDRESTART-KSTA: 3
NEEDRESTART-SVC: nginx.service
NEEDRESTART-SVC: postgresql@16-main.service

Unmerged configuration files

An upgrade that cannot safely merge a configuration file leaves the new version beside the old one. The service keeps running the old configuration, and the security fix that lived in the new default is not applied.

There are two directions of failure, and the suffix tells you which one you have. Sweep for all of them, on both families:

Read-only / Safeunmerged conffiles
$ find /etc \( -name '*.dpkg-dist' -o -name '*.dpkg-new' -o -name '*.dpkg-old' -o -name '*.ucf-dist' -o -name '*.rpmnew' -o -name '*.rpmsave' \) -print 2>/dev/null
/etc/ssh/sshd_config.dpkg-dist
/etc/audit/auditd.conf.rpmsave

Read the suffix before you decide what to do:

  • .dpkg-dist, .dpkg-new, .rpmnew, .ucf-dist: your file is live, the vendor version is parked. The vendor change was not adopted.
  • .dpkg-old, .rpmsave: the vendor file is live, your version is parked. Your local change was reverted.

Neither state raises an alert on its own, and a scanner that reads package versions calls the host patched in both cases. The sweep is the only thing that catches them, which is why the checklist item is critical rather than advisory. linux-package-management-overview covers the dpkg conffile policy flags that produce each outcome.

Sign-off

  • Operator: _________________ Date: ___________
  • Reviewer: ________________ Date: ___________

Critical14 items

  1. dpkg -l openssl libssl3 | awk "/^ii/{print \$2, \$3}"   # RHEL: rpm -q openssl
  2. test ! -f /var/run/reboot-required && echo clean || echo REBOOT REQUIRED   # RHEL: needs-restarting -r
  3. uname -r; ls -1 /boot/vmlinuz-* | sed "s|.*vmlinuz-||" | sort -V | tail -1   # the two must match
  4. sudo needrestart -b   # RHEL: sudo needs-restarting -s
  5. systemctl list-units --state=failed --no-legend --no-pager | wc -l   # must be 0
  6. systemctl is-active nginx postgresql sshd
  7. find /etc \( -name '*.dpkg-dist' -o -name '*.dpkg-new' -o -name '*.dpkg-old' -o -name '*.ucf-dist' -o -name '*.rpmnew' -o -name '*.rpmsave' \) -print 2>/dev/null
  8. curl -sS -o /dev/null -w "%{http_code} %{time_total}\n" https://host/health
  9. journalctl --since "1 hour ago" -p err --no-pager
  10. findmnt --verify --verbose; systemctl --no-pager list-units --type=mount --state=failed

Warning3 items