Linux 内核 “Copy Fail” 漏洞(CVE-2026-31431)是一个高危本地提权漏洞,影响自 2017 年以来的大多数 Linux 内核版本。攻击者仅需普通用户权限,即可稳定提权到 root,并可能实现容器逃逸。公开 PoC 已出现,且已被野外利用。(Xint)

一、漏洞影响范围

受影响核心条件:

  • Linux Kernel 4.14 ~ 7.x

  • 启用了 AF_ALG / algif_aead

  • 使用 authencesn AEAD 加密模块

  • 典型发行版:

    • Ubuntu 20.04/22.04/24.04

    • Debian 11/12

    • RHEL / Rocky / AlmaLinux

    • Amazon Linux 2023

    • SUSE

    • Kubernetes Node / Docker Host

漏洞源于 Linux 内核 algif_aead 的逻辑缺陷,可通过 splice() 修改 page cache,实现任意可读文件的 4-byte 覆写,最终提权。(sysdig.com)


二、官方修复方案(推荐)

方案 1:升级内核(最佳方案)

这是唯一彻底修复方法。

已修复版本(主线)

根据公开信息,目前修复已进入:

  • Kernel 7.0

  • Kernel 6.19.12+

  • Kernel 6.18.22+

部分发行版已开始 backport。(sysdig.com)


Ubuntu 修复

更新系统

sudo apt update
sudo apt full-upgrade -y
sudo reboot

查看是否已修复

uname -r
ubuntu-security-status

检查 Ubuntu 安全公告

Ubuntu CVE-2026-31431 安全公告

Ubuntu 在正式内核补丁发布前,已通过更新 kmod 禁止加载 algif_aead 模块作为缓解措施。(Reddit)


RHEL / Rocky / AlmaLinux 修复

sudo dnf update kernel kernel-core -y
sudo reboot

检查:

rpm -q kernel
uname -r

Red Hat 官方安全页面:

Red Hat Security Center


Debian 修复

sudo apt update
sudo apt install linux-image-amd64
sudo reboot

三、临时缓解方案(无法立即重启时)

如果业务暂时不能升级内核,可先做 mitigation。


方案 2:禁用 algif_aead 模块(强烈建议)

漏洞核心入口:

algif_aead

临时卸载

sudo modprobe -r algif_aead

永久禁用

创建 blacklist:

echo "blacklist algif_aead" | sudo tee /etc/modprobe.d/disable-algif.conf

更新 initramfs:

Ubuntu/Debian:

sudo update-initramfs -u

RHEL:

sudo dracut -f

重启:

sudo reboot

验证:

lsmod | grep algif

应无输出。

CERT-EU 与多个安全厂商均建议此缓解方案。(cert.europa.eu)


四、Kubernetes / 容器环境修复

此漏洞对 K8s 特别危险,因为:

  • container 与 host 共用 kernel

  • 可实现 container escape

  • CI/CD Runner 风险极高

(Microsoft)


Kubernetes 建议

1. 升级所有 Node Kernel

重点:

  • Worker Node

  • GPU Node

  • Jenkins Runner

  • GitLab Runner


2. 禁止特权容器

检查:

kubectl get pods -A -o json | jq '.items[] | select(.spec.containers[].securityContext.privileged==true)'

3. 使用 seccomp

禁止 AF_ALG:

{
  "defaultAction": "SCMP_ACT_ALLOW",
  "syscalls": [
    {
      "names": ["socket"],
      "action": "SCMP_ACT_ERRNO",
      "args": [
        {
          "index": 0,
          "value": 38,
          "op": "SCMP_CMP_EQ"
        }
      ]
    }
  ]
}

其中:

AF_ALG = 38

4. AppArmor / SELinux

限制:

  • AF_ALG

  • splice

  • keyctl


五、检测系统是否存在风险

检查模块

grep algif_aead /proc/modules

或:

lsmod | grep algif

检查是否允许 AF_ALG

cat /proc/crypto | grep authencesn

检查内核版本

uname -a

如果:

  • 4.14+

  • 且未安装发行版补丁

则大概率受影响。


六、安全加固建议

建议同时实施

1. 开启内核锁定

sudo sysctl kernel.kptr_restrict=2

2. 限制普通用户 shell

减少本地提权面。


3. 审计异常 splice 行为

auditd:

-a always,exit -F arch=b64 -S splice -k splice-monitor

4. EDR 检测

重点检测:

  • AF_ALG

  • splice

  • page cache overwrite

  • setuid binary tamper

Microsoft Defender、Sysdig 已发布相关检测规则。(Microsoft)


七、企业级应急建议

建议优先级:

优先级 操作
P0 升级 Kernel
P0 禁用 algif_aead
P1 修复 K8s Node
P1 CI/CD Runner 隔离
P2 增加 seccomp
P2 增加 auditd 监控

八、官方参考

(Xint)

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐