Skip to content

CVE-2026-31431 Mitigation

Warning

We'll keep updating the document with the best approaches as we learn more.

We have learned that standard mitigations for CVE-2026-31431 are currently ineffective on certain Linux-based instances as distros have not fully shipped the fixes.

References and Further Reading

General Information & Exploit Details

Vendor Security Advisories


Vulnerability Testing

First run this to test if your system is currently vulnerable to the exploit:

import socket, sys
try:
    s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
    s.bind(('aead', 'authencesn(hmac(sha256),cbc(aes))'))
    print('VULNERABLE - continue with next steps')
    sys.exit(1)
except OSError as e:
    print('Not vulnerable:', e)
    sys.exit(0)

To directly run in the terminal use this command:

python3 -c "
import socket, sys
try:
    s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
    s.bind(('aead', 'authencesn(hmac(sha256),cbc(aes))'))
    print('VULNERABLE - continue with next steps')
    sys.exit(1)
except OSError as e:
    print('Not vulnerable:', e)
    sys.exit(0)
"

If the machine is vulnerable, continue with the next steps. All fixes might not work immediately. Proceed to the next fix if one fails.


Fixes for RHEL, CentOS and Rocky

Fix 1: GRUB Configuration Update

  1. Add a kernel parameter of initcall_blacklist=algif_aead_init to /etc/default/grub:

    sed -i "s|^\(GRUB_CMDLINE_LINUX=\".*\)\"\s*$|\1 initcall_blacklist=algif_aead_init\"|" /etc/default/grub
    

  2. Check the result:

    grep GRUB_CMDLINE_LINUX /etc/default/grub
    
    The line needs to end with the new parameter. Example output: GRUB_CMDLINE_LINUX="... initcall_blacklist=algif_aead_init" Fix manually if necessary.

  3. Update GRUB configuration:

    grub2-mkconfig -o /boot/grub2/grub.cfg
    

  4. Reboot the machine:

    reboot -h now
    

  5. Test with the Python script.


Fix 2: Grubby Tool

  1. If your system has grubby, try that to apply the blacklist:

    grubby --update-kernel=ALL --args="initcall_blacklist=algif_aead_init"
    

  2. Reboot the machine:

    reboot -h now
    

  3. Test with the Python script.


Fix 3: Modify Boot Loader Entries

If the above fixes do not work, you need to modify /boot/loader/entries/ by hand.

  1. Check if algif_aead_init blacklist made it to the boot loader entries file:

    grep algif_aead_init /boot/loader/entries/*
    
    The result should be empty if your machine is still vulnerable.

  2. Check your running kernel version:

    uname -r
    
    Example output: 5.14.0-611.49.1.el9_7.x86_64

  3. Find the corresponding .conf file from the /boot/loader/entries:

    ls /boot/loader/entries/ | grep $(uname -r)
    
    Example output: 4f94f677eca2465c96f1de1e2a2d2866-5.14.0-611.49.1.el9_7.x86_64.conf

  4. Edit the file and append initcall_blacklist=algif_aead_init to the line beginning with options:

    cat /boot/loader/entries/4f94f677eca2465c96f1de1e2a2d2866-5.14.0-611.49.1.el9_7.x86_64.conf | grep blacklist
    
    Example output:
    options root=UUID=f1288107-83ee-4e38-b174-ba337f646214 ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M rd.md.uuid=8c97a527:8b2a18f2:a1311f1f:fa9d2d0b rd.md.uuid=d18e8ef3:8baca3c3:69484d1e:5766d252 systemd.unified_cgroup_hierarchy=0 ixgbe.allow_unsupported_sfp=1 initcall_blacklist=algif_aead_init
    

  5. Reboot the machine:

    reboot -h now
    

  6. Test with the Python script.

Fixes for Ubuntu, Debian and SUSE

Distribution Compatibility

The following mitigation only works on distributions where algif_aead is compiled as a dynamically loadable module (.ko). It will fail silently on systems where the module is built directly into the core kernel.

Fix 1: Module Disable

If your distribution supports it, you can disable the module instantly without rebooting. This two-line shorthand creates a persistent rule to prevent the module from loading in the future, and immediately unloads it from the current session.

  1. Run the following commands:

    sudo su -c 'echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf'
    sudo rmmod algif_aead 2>/dev/null || true
    

  2. Test with the Python script.

Service Dependencies

If the rmmod command fails because the module is currently in use, you must stop dependent services before the kernel allows you to unload it, or schedule a reboot for the persistent configuration rule to take effect.