Post #1876474
2026-05-01 02:18 UTC
here's the chunk of my script for patching red hat and derivatives
grep -E 'algif_aead\.ko$' /lib/modules/$(uname -r)/modules.builtin >/dev/null 2>&1
if [ $? -eq 0 ];then
if [ -f /etc/redhat-release ];then
grep 'initcall_blacklist=algif_aead_init' /proc/cmdline >/dev/null 2>&1
if [ $? -ne 0 ];then
sudo grubby --update-kernel=ALL --args="initcall_blacklist=algif_aead_init"
lsblk | grep -i 'efi' >/dev/null 2>&1
if [ $? -eq 0 ];then
sudo grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
else
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
fi
echo -e "Note: A reboot is necessary to apply mitigation\nPlease run: sudo reboot"
else
echo "Mitigation already appears to be in place"
fi
else
echo "Error: This script is meant for AlmaLinux, CentOS, Oracle Linux, or Red Hat"
# note: might work on Rocky Linux too
fi
fi
Replies (0)
No replies.