If you follow kernel development, you recently saw the flood gates open. The Linux kernel project started assigning CVEs to hundreds of bugs, many of them old, obscure, and low-impact. The result was a firehose of over 400 CVE notifications lighting up security feeds.
My first reaction wasn’t panic. It was a sigh. More noise.
For those of us running homelabs, this isn’t a signal to unplug everything. It’s a perfect, real-world test of our security posture. Can we filter the signal from the noise? Can we patch efficiently without constant manual intervention? Yes. This is exactly the kind of process a homelab is for. Let’s build a sane vulnerability management workflow.
The Problem is Triage, Not Ticking Clocks
First, let’s get one thing straight. You are not going to patch all 400+ CVEs tomorrow. You aren’t even going to track them all manually. The sheer volume makes that impossible. The kernel’s new CVE strategy means we get more transparency, but it also means we’re drowning in low-severity alerts.
The goal is not to have zero CVEs. The goal is to mitigate unacceptable risk.
In a homelab, risk is specific to your setup. Here’s how I break it down:
- Critical Risk: Internet-Facing Services. A vulnerability in the network stack (TCP/IP, netfilter) or in a service you expose directly (like a WireGuard VPN endpoint) is your top priority. These are remotely exploitable and need to be fixed now.
- High Risk: Container/VM Escape. On my Proxmox hosts, any bug in KVM, QEMU, or cgroups that allows a guest to affect the host is a big deal. I don’t run untrusted workloads, but it’s a critical security boundary.
- Medium Risk: Local Privilege Escalation (LPE). An attacker who already has low-privilege shell access can use an LPE to become root. In a typical single-user homelab, this risk is lower. If you give accounts to friends or run multi-tenant services, its priority goes way up.
- Low/Informational Risk: Everything Else. A bug in a Bluetooth driver I don’t use? A denial-of-service that requires physical access to a USB port? I’ll get the patch when it comes through my normal update cycle, but I’m not losing sleep over it.
Your priority list might look different. The point is to have one. Write it down. This is your bible for the next step.
Step 1: Assess with a Real Scanner
Stop running uname -r and trying to cross-reference it with a CVE list. That way lies madness. You need an automated tool that understands your distribution’s packaging and backports.
My tool of choice is Trivy, an open-source scanner from Aqua Security. It’s fast, simple, and has a comprehensive vulnerability database. It scans installed OS packages (like your kernel) and tells you exactly which CVEs affect them.
Install it on your main Linux boxes. Here’s a one-liner to get it done:
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
Now, run a scan focused only on high and critical vulnerabilities. We’re filtering out the noise from the start.
# Scan the running OS for high and critical severity vulnerabilities
# The '--exit-code 1' will cause the script to exit with an error code if vulns are found,
# which is useful for automation and scripting.
trivy os --severity HIGH,CRITICAL --exit-code 1 .
The output will give you a clean, actionable list. It shows the vulnerable package (e.g., linux-image-6.5.0-28-generic), the CVE ID, the severity, and the version that contains the fix (e.g., 6.5.0-28.29~22.04.1). This is your to-do list.
What surprised me the first time I ran this was how many “medium” CVEs existed. It’s tempting to chase them, but stick to your priority list. Highs and criticals first.
Step 2: Patch with Automated Tooling
You have your list. Now what? You could apt upgrade or dnf update manually, but who has time for that? This is a solved problem. We’re going to use the tools built into our distros.
For Debian/Ubuntu, it’s unattended-upgrades. For Fedora/RHEL, it’s dnf-automatic.
I’ll focus on unattended-upgrades since most of my lab runs on Debian or Ubuntu. The goal is to install only security updates automatically. We don’t want a feature update to a random package breaking something at 3 AM.
Install the package first: sudo apt install unattended-upgrades.
Then, edit the configuration at /etc/apt/apt.conf.d/50unattended-upgrades. You need to make sure the right repository is enabled. For Ubuntu, it looks like this. The key line is ${distro_id}:${distro_codename}-security;:
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't exist for standard LTR.
// "${distro_id}ESMApps:${distro_codename}-apps-security";
// "${distro_id}ESM:${distro_codename}-infra-security";
};
Enable the service with sudo dpkg-reconfigure -plow unattended-upgrades and select “Yes”.
Now, your system will pull down and install security patches every day. This handles about 80% of the work.
Step 3: The Reboot Problem
Your system has the new kernel package installed. But it’s not running. The old, vulnerable kernel is still in memory. You have to reboot.
Live patching tools like KernelCare or kpatch exist, but they’re complex and often commercial. For a homelab, a scheduled reboot is far simpler and more reliable.
My strategy is simple: a weekly cron job that reboots all my servers during a maintenance window. For me, that’s Sunday at 4 AM.
# Add this to root's crontab with 'sudo crontab -e'
# Reboot every Sunday at 4:00 AM
0 4 * * 0 /sbin/reboot
This is the part people often forget. Patching isn’t complete until the service (in this case, the kernel) is restarted. A weekly reboot ensures your automated patches actually become effective in a timely manner.
Step 4: Verify and Repeat
After your scheduled reboot, how do you know it worked?
- SSH back in and run
uname -r. The version should have changed to the one Trivy told you had the fix. - Run your Trivy scan again:
trivy os --severity HIGH,CRITICAL ..
The high-severity kernel CVEs should be gone. If they are, your system is working. If not, it’s time to check the logs (/var/log/unattended-upgrades/) and figure out what went wrong.
This loop—Assess, Patch, Reboot, Verify—is the core of vulnerability management. By automating each step, you can handle hundreds of CVEs without burning out. You’ve built a system that filters the noise and addresses real risk, which is a far more valuable skill than manually patching servers in a panic.
What’s Next
Now that you have a solid kernel patching strategy, you can improve other areas of your homelab’s security and operations.
- Set Up Unattended Upgrades: Dive deeper into the configuration for automatically patching your user-space applications with our Full Guide to Unattended-Upgrades on Debian.
- Harden Your Host: Kernel patching is just one piece. Learn about firewall rules, user access control, and more in our Linux Security Hardening Guide.
- Monitor Everything: How do you know if a patch failed or a server didn’t come back up after a reboot? Set up monitoring with Prometheus and Grafana for Your Homelab.
- Translate to the Cloud: The same principles of scanning and automated patching apply to the cloud. See how it works at scale with AWS Inspector for EC2 Vulnerability Scanning.
[discussion]
Comments are powered by Giscus — backed by GitHub Discussions. Sign in with GitHub to join the conversation.