Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-64561-Kernel-Fix — Linux 内核升级指南 - 修复 CVE-2026-64561 | Kitploit
Tools/GitHubGitHub/chuzhongyun/cve-2026-64561-kernel-fix
Cloud Infrastructure SecurityVulnerability AnalysisLearning & Education
GitHubchuzhongyun/cve-2026-64561-kernel-fix

CVE-2026-64561-Kernel-Fix

Linux 内核升级指南 - 修复 CVE-2026-64561

View Repository
Share
793 months agoNot yet reviewed

中文 | English


中文

升级 Linux Kernel 修复 CVE-2026-64561 教程

声明: 本文仅记录本人服务器环境下的修复过程,并非安全专业分析。如有不当之处,欢迎指正。

一、简介

本文档提供两种方式将 Linux Kernel 升级,用于修复 CVE-2026-64561:ELRepo RPM 安装(推荐)和源码编译。

项目说明
CVE 编号CVE-2026-64561
漏洞组件Linux Kernel KVM/x86
修复方式升级 Linux Kernel(ELRepo RPM 或源码编译)

三、升级方法

本教程提供两种升级方式,可根据环境选择:

方法一:ELRepo RPM 安装(推荐)

适用于能正常访问 ELRepo 仓库的环境,无需编译,操作简单。

方法一原文参考: 魔方云商家可将CentOS系宿主机内核升级至7.1.6以避免CVE-2026-64561漏洞(作者:欢-Huan)

1. 环境信息

系统环境:

项目信息
操作系统CentOS Stream 8
原始内核4.18.0-552.el8.x86_64
目标内核7.1.6-1.el8.elrepo.x86_64
内核来源ELRepo kernel-ml

硬件环境(本文作者环境,仅供参考):

项目信息
CPUAMD Ryzen 9 9950X
用途KVM / LXD 宿主机
网卡Realtek r8126(第三方驱动)

注意: 此为微星主板的网卡驱动,如无需特别驱动即可正常通网的机器无需这步。对应的网卡请找对应的驱动,不是每个人的驱动都是一样的。

查看当前环境:

cat /etc/os-release
uname -r

升级路线:

4.18.0-552.el8
        ↓
7.1.6-1.el8.elrepo
2. 安装 ELRepo 仓库

如果系统已经安装 ELRepo,可以跳过。

# 导入 ELRepo GPG 密钥
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org

# 安装 ELRepo 仓库
dnf install -y https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm

检查:

# 检查 ELRepo 仓库是否已添加
dnf repolist | grep elrepo
3. 查看可用 kernel-ml 版本
# 查看可用的 kernel-ml 版本列表
dnf --enablerepo=elrepo-kernel list kernel-ml --showduplicates

确认存在:

kernel-ml.x86_64  7.1.6-1.el8.elrepo
4. 安装 Linux 7.1.6 内核
# 安装内核本体、核心和模块
dnf --enablerepo=elrepo-kernel install -y \
kernel-ml-7.1.6-1.el8.elrepo.x86_64 \
kernel-ml-core-7.1.6-1.el8.elrepo.x86_64 \
kernel-ml-modules-7.1.6-1.el8.elrepo.x86_64

编译第三方驱动(如需要):

# 安装内核开发包用于编译第三方驱动
dnf --enablerepo=elrepo-kernel install -y \
kernel-ml-devel-7.1.6-1.el8.elrepo.x86_64
5. 确认内核安装成功
# 查看已安装的 kernel-ml 包
rpm -qa | grep kernel-ml

查看 grub:

# 查看 grub 中的内核列表
grubby --info=ALL | grep title
6. 设置默认启动内核
# 查看所有可用内核
grubby --info=ALL | grep kernel

设置:

# 设置默认启动内核
grubby --set-default /boot/vmlinuz-7.1.6-1.el8.elrepo.x86_64

确认:

# 验证默认内核
grubby --default-kernel
7. 检查 grub 保存状态
# 检查 grub 环境保存状态
grub2-editenv list
8. 重启进入新内核
# 重启服务器
reboot

检查:

# 查看当前内核版本
uname -r

预期输出:

7.1.6-1.el8.elrepo.x86_64
9. Realtek r8126 驱动检查

注意: 此为微星主板的网卡驱动,如无需特别驱动即可正常通网的机器无需这步。对应的网卡请找对应的驱动,不是每个人的驱动都是一样的。

# 查看 r8126 驱动版本信息
modinfo r8126 | grep vermagic

如果不是:

7.1.6-1.el8.elrepo.x86_64

需要重新编译。

10. 重新编译 r8126

注意: 此为微星主板的网卡驱动,如无需特别驱动即可正常通网的机器无需这步。对应的网卡请找对应的驱动,不是每个人的驱动都是一样的。

# 进入驱动源码目录
cd /root/qudong_backup/r8126-10.016.00

# 清理旧编译产物
make clean

# 编译驱动
make

# 安装驱动
make install

# 重新生成模块依赖
depmod -a

# 加载驱动
modprobe r8126

检查:

# 确认驱动已加载
lsmod | grep r8126
11. KVM 与 CVE-2026-64561 检查

7.1.x 内核包含新版 KVM/MMU:

CONFIG_KVM_GUEST_MEMFD=y
CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
CONFIG_KVM_MM_U_LOCKLESS_AGING=y
CONFIG_KVM_EXTERNAL_WRITE_TRACKING=y
CONFIG_KVM_MAX_NR_VCPUS=4096
12. 升级失败回滚
# 查看所有可用内核
grubby --info=ALL | grep kernel

恢复旧内核:

# 设置旧内核为默认启动项
grubby --set-default /boot/vmlinuz-4.18.0-552.el8.x86_64
13. 升级总结

升级路径:

CentOS Stream 8
        ↓
Linux 4.18
        ↓
ELRepo kernel-ml 7.1.6

结果:

✅ 升级到 Linux 7.1.6
✅ KVM/MMU 子系统更新
✅ 支持更多新硬件
✅ 保留旧内核回滚能力

注意:

  • 第三方驱动(例如 r8126)升级前必须确认兼容
  • 生产环境建议保留旧内核
  • KVM 宿主机建议检查 nested virtualization

方法二:源码编译

适用于无法访问 ELRepo 仓库,或需要使用 kernel.org 官方 stable 版本的环境。具体步骤见下方。

1. 环境信息
项目信息
系统CentOS Stream 8
架构x86_64
虚拟化KVM Intel
原始内核6.18.8-1.el8.elrepo.x86_64
已运行内核7.1.3
最终内核7.1.7

查看当前环境:

cat /etc/os-release
uname -r

由于本人服务器环境中:

  • ELRepo Kernel RPM 仓库无法稳定拉取;
  • 当前环境已经通过 CVE-2026-53359-Kernel-Fix 教程中的 方法二:源码编译 方式升级内核;
  • CVE-2026-64561 涉及 Linux Kernel KVM/x86 组件;

因此采用:

kernel.org 官方 stable 源码编译方式升级内核。

说明:

该方案仅为本人服务器环境下的解决方法,不代表所有环境必须使用源码编译。

2. 下载内核源码
# 进入源码目录
cd /usr/src

# 下载 Linux 7.1.7 源码
wget https://cdn.kernel.org/pub/linux/kernel/v7.x/linux-7.1.7.tar.xz

# 解压源码
tar -xf linux-7.1.7.tar.xz

# 进入源码目录
cd /usr/src/linux-7.1.7

# 确认源码完整
ls Makefile

预期输出:

Makefile
3. 迁移原内核配置

由于源码编译安装的 7.1.3 内核未生成:

/boot/config-7.1.3

因此使用之前编译时保存的配置:

# 检查旧配置是否存在
ls -lh /usr/src/linux-7.1.3/.config

确认存在:

/usr/src/linux-7.1.3/.config
# 复制旧配置到新内核目录
cp /usr/src/linux-7.1.3/.config /usr/src/linux-7.1.7/.config
4. 更新内核配置
# 进入新内核源码目录
cd /usr/src/linux-7.1.7

# 基于旧配置生成新配置
make olddefconfig

预期输出:

#
# configuration written to .config
#
5. 确认 KVM Intel 配置
# 检查 KVM 相关配置项
grep -E "CONFIG_KVM|CONFIG_KVM_INTEL" .config

预期输出:

CONFIG_KVM_X86=m
CONFIG_KVM=m
CONFIG_KVM_INTEL=m

说明:

  • KVM 核心模块已启用;
  • x86 KVM 支持已启用;
  • Intel KVM 模块已启用。

满足当前 KVM Intel 环境要求。

6. 编译内核
# 查看 CPU 核心数
nproc

# 使用全部 CPU 编译(根据实际核心数调整)
make -j$(nproc)

# 编译完成后验证内核镜像
ls -lh arch/x86/boot/bzImage

预期输出:

-rw-r--r-- 1 root root xxM arch/x86/boot/bzImage

表示内核镜像生成成功。

7. 安装内核模块
# 安装内核模块
make modules_install

# 验证模块安装
ls /lib/modules/

预期输出:

7.1.7
# 检查 KVM 模块
find /lib/modules/7.1.7 -name "kvm*"

预期输出:

/lib/modules/7.1.7/kernel/arch/x86/kvm/kvm.ko
/lib/modules/7.1.7/kernel/arch/x86/kvm/kvm-intel.ko
/lib/modules/7.1.7/kernel/arch/x86/kvm/kvm-amd.ko

确认:

  • KVM 模块生成成功;
  • Intel KVM 模块生成成功。
8. 安装新内核
# 安装内核
make install

# 检查安装结果
ls -lh /boot | grep 7.1.7

预期输出:

initramfs-7.1.7.img
System.map-7.1.7
vmlinuz-7.1.7
9. 更新启动项
# 生成 GRUB 配置
grub2-mkconfig -o /boot/grub2/grub.cfg

# 设置默认启动内核
grubby --set-default /boot/vmlinuz-7.1.7

# 验证默认内核
grubby --default-kernel

预期输出:

/boot/vmlinuz-7.1.7
10. 重启服务器
# 重启服务器
reboot
11. 升级验证
# 查看当前内核版本
uname -r

预期输出:

7.1.7

✅ 已运行 Linux 7.1.7

# 查看 KVM 模块
lsmod | grep kvm

预期输出:

kvm_intel
kvm
irqbypass

✅ KVM Intel 正常加载

# 查看 KVM 模块来源
modinfo kvm_intel | grep filename

预期输出:

filename: /lib/modules/7.1.7/kernel/arch/x86/kvm/kvm-intel.ko

✅ 当前使用的是 7.1.7 编译生成的 KVM Intel 模块

12. 回滚

重要: 旧内核不应立即删除。

# 列出可用内核
grubby --info=ALL | grep kernel

如果新内核有问题,设置旧内核:

# 设置旧内核为默认启动项
grubby --set-default /boot/vmlinuz-7.1.3

# 重启生效
reboot
13. 最终修复结果
项目修复前修复后
Linux Kernel7.1.37.1.7
KVM Intel 模块7.1.37.1.7
CVE-2026-64561存在风险已通过升级内核修复
KVM 功能正常正常
14. 当前服务器状态

最终运行:

CentOS Stream 8
x86_64

Kernel:
7.1.7

KVM:
kvm_intel
kvm
irqbypass

修复完成。

15. 后续建议
保留旧内核

暂时保留:

7.1.3
6.18.8-1.el8.elrepo.x86_64
4.18.x

用于异常情况下回滚。

# 查看可用内核
grubby --info=ALL | grep kernel
保存当前配置

以后继续升级时建议保存:

# 保存当前内核配置
cp /usr/src/linux-7.1.7/.config /boot/config-7.1.7

后续升级:

# 复制配置到新内核目录
cp /boot/config-7.1.7 新内核源码目录/.config

即可继续复用配置。



English

Upgrading Linux Kernel to Fix CVE-2026-64561

Disclaimer: This repository only documents my personal fix process on a specific server environment. It is not a professional security analysis. Corrections are welcome.

I. Introduction

This guide provides two methods to upgrade Linux Kernel for fixing CVE-2026-64561: ELRepo RPM installation (recommended) and building from source.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    786
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    506
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    429
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    345
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    262
  • 6

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    256

Explore all tools

Browse our collection of tools

View all tools →