Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket
This rule detects potential exploitation of CVE-2026-31431, a Copy Fail vulnerability in the Linux kernel, via AF_ALG socket abuse, by correlating non-root AF_ALG-class socket or splice events with a subsequent process execution where the effective user is root but the login user remains non-root, indicating a privilege escalation attempt.
CVE-2026-31431, dubbed Copy Fail, is a Linux kernel vulnerability that allows an attacker to write controlled bytes into the page cache of a readable file by abusing the authencesn AEAD path through AF_ALG and splice(). Public exploitation targets setuid-root binaries such as /usr/bin/su, then executes the corrupted in-memory copy to gain root. The vulnerability lies in the shared host page cache, making container-originated activity a possible node-compromise attempt. This exploit leverages the AF_ALG interface, which, while uncommon for unprivileged users, may be used in specific environments like kernel crypto testing or HSM integrations. Defenders should prioritize patching vulnerable kernels and restricting AF_ALG socket creation for untrusted workloads to mitigate this risk.
Attack Chain
- An unprivileged user initiates multiple AF_ALG socket creation events (auditd.data.syscall == “socket” and auditd.data.a0 == “26”) or splice operations.
- The attacker leverages the vulnerability to corrupt the page cache of a setuid-root binary, such as
/usr/bin/su. - The attacker executes the targeted setuid-root binary (e.g.,
/usr/bin/su). - Due to the corrupted page cache, the executed binary behaves in an unexpected manner, leading to a privilege escalation.
- The process transitions to a root UID, indicating successful privilege escalation.
- A root shell is spawned, providing the attacker with elevated privileges.
- The attacker performs actions requiring root privileges, such as creating persistence mechanisms or accessing sensitive credentials.
- The attacker potentially compromises the entire host or node, especially in containerized environments.
Impact
Successful exploitation of CVE-2026-31431 leads to privilege escalation, allowing attackers to gain root access on the affected Linux system. This can result in complete system compromise, data exfiltration, and the ability to install malware or create persistent backdoors. In containerized environments, a compromised container can lead to node compromise, affecting other containers running on the same host. The vulnerability affects systems running vulnerable kernel versions, potentially impacting a wide range of servers and workstations.
Recommendation
- Deploy the Sigma rule “Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket - Socket Creation Burst” to detect initial exploitation attempts based on AF_ALG socket activity.
- Deploy the Sigma rule “Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket - Privilege Escalation” to detect privilege escalation attempts by monitoring executed processes with an effective user ID of root.
- Immediately patch the kernel with the vendor fix for CVE-2026-31431 to eliminate the underlying vulnerability.
- Until patching is possible, consider blocking
algif_aeadmodule loading or restricting AF_ALG socket creation via seccomp for untrusted workloads. - Add audit rules for
socket,splice, andbindevents as described in the rule’s Setup instructions to ensure comprehensive monitoring of AF_ALG related syscalls.
Detection coverage 2
Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket - Socket Creation Burst
mediumDetects a burst of non-root AF_ALG socket creation events, potentially indicating the initial stage of CVE-2026-31431 exploitation.
Potential Copy Fail (CVE-2026-31431) Exploitation via AF_ALG Socket - Privilege Escalation
highDetects a process execution with an effective user ID of root but a non-root user ID, following potential socket creation, suggesting privilege escalation.
Detection queries are kept inside the platform. Get full rules →