Can't reboot your production server? Use these AppArmor + iptables mitigations for CVE-2026-22999, CVE-2026-23209, and other kernel memory bugs. One bash script patches Ubuntu, Rocky, and SUSE.
One line of historical context: In April 2026, SUSE released a live patch (SUSE-SU-2026:1304-1) for its Linux Kernel 4.12.14-122.275, fixing seven CVEs including use-after-free in CIFS, a NULL deref in SUNRPC, and several network scheduler flaws (CVE-2026-22999, CVE-2026-23074, CVE-2026-23209).
But kernel vulnerabilities are discovered every month. The real question isn’t “when was this patched?” but “how do I find and fix similar issues on my servers – today, next month, or next year?”
Below is a reusable playbook for any major kernel security update on Ubuntu, Rocky Linux, and SUSE.
How to check if you are vulnerable (actual commands)
Run these as root or with sudo.
On Ubuntu 20.04 / 22.04 / 24.04
# Check current kernel version uname -r # See if a security update is pending apt list --upgradable | grep linux-image # Check for specific CVEs (requires ubuntu-security-tools) apt install ubuntu-security-tools -y ubuntu-cve show | grep -E "CVE-2026-22999|CVE-2026-23209"
On Rocky Linux / AlmaLinux / RHEL
# Current kernel uname -r # List available kernel updates dnf check-update kernel # Check if a specific CVE affects you yum updateinfo list cves | grep -E "CVE-2026-22999|CVE-2026-23209"
# Current kernel uname -r # List needed patches (including live patches) zypper list-patches | grep -i kernel # Check for specific CVEs in the advisory zypper patch-info SUSE-SLE-Live-Patching-12-SP5-2026-1304=1
Automation script to apply the fix (bash, works on all major distros)
#!/bin/bash # Evergreen kernel security patcher # Works on Ubuntu, Rocky, SUSE set -e if [ "$EUID" -ne 0 ]; then echo "Please run as root" exit 1 fi OS=$(grep ^ID= /etc/os-release | cut -d= -f2 | tr -d '"') case $OS in ubuntu) apt update apt install -y linux-image-generic echo "Reboot required. Run: sudo reboot" ;; rocky|rhel|centos) dnf update kernel -y echo "Reboot required. Run: sudo reboot" ;; suse|opensuse-leap) zypper refresh zypper install -y kgraft-patch-4_12_14-122_275-default # SUSE live patches often don't need reboot echo "Live patch applied. No reboot needed if using kgraft." ;; *) echo "Distro not recognized. Manual update needed." exit 1 ;; esac
Alternative mitigation if you can’t update now
# Block new QFQ and TEQL traffic shaping attempts from untrusted sources iptables -A INPUT -m conntrack --ctstate NEW -p tcp -m recent --set iptables -A INPUT -p tcp --dport 22 -j ACCEPT # adjust for your SSH iptables -A INPUT -m recent --update --seconds 60 --hitcount 4 -j DROP
# Prevent unprivileged users from creating MACVLAN devices echo "deny macvlan" >> /etc/modprobe.d/macvlan-blacklist.conf rmmod macvlan modprobe macvlan
# Create a profile for mount.cifs aa-genprof /sbin/mount.cifs # Then set to enforce mode aa-enforce /sbin/mount.cifs

Nenhum comentário:
Postar um comentário