方法一:立即升级系统 (推荐)
因各大发行版升级步骤有所差异,故在此不做赘述。但要确认升级的 linux 内核已合并了 a664bf3d603d 提交。
注:linux 内核版本 ≥ 6.18.22,≥ 6.19.12,≥ 7.0 则已修复。
方法二:临时禁用 algif_aead 内核模块
禁用内核模块
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif-aead.conf
卸载已加载模块
rmmod algif_aead 2>/dev/null
确认漏洞是否缓解
python3 -c 'import socket; s=socket.socket(38,5,0); (s.bind(("aead", "authencesn(hmac(sha256),cbc(aes))")) or print("未缓解")) if s else None' 2>/dev/null || echo "已缓解"
注:针对静态编译进内核的系统(例如:RHEL/CentOS/Rocky Linux/AlmaLinux 8, 9, 10 三代产品),此缓解措施可能无法生效,建议更新官方内核补丁。
升级系统后如何恢复模块
删除拦截配置
sudo rm /etc/modprobe.d/disable-algif-aead.conf
重新加载模块
sudo modprobe algif_aead
验证模块是否启动
lsmod | grep algif_aead