Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-46242 — 用于 CVE-2026-46242“Bad Epoll”的 Aarch64 概念验证检查器,触发 Linux 内核 epoll close-vs-close 释放后使用(use-after-free)竞态,以验证本地权限提升。 | Kitploit
工具/GitHubGitHub/binarymasc/cve-2026-46242
权限提升漏洞分析漏洞利用二进制利用
GitHubbinarymasc/cve-2026-46242

CVE-2026-46242

用于 CVE-2026-46242“Bad Epoll”的 Aarch64 概念验证检查器,触发 Linux 内核 epoll close-vs-close 释放后使用(use-after-free)竞态,以验证本地权限提升。

查看仓库
4天前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

CVE-2026-46242 — “Bad Epoll”

该仓库是一个基于已存在的 x86 漏洞利用的 aarch64 内核 Bad Epoll 验证器。

通过 epoll 释放后使用(Use-After-Free)竞态条件实现的 Linux 内核本地权限提升

字段详情
CVECVE-2026-46242
别名Bad Epoll
类型通过竞态条件导致的释放后使用(UAF)
CVSS7.8(高危)
影响本地权限提升 → root
受影响内核5.10 – 6.11(LTS 与 COS)
子系统fs/eventpoll.c(ep_remove() / 关闭路径)

漏洞概述

在 Linux 内核的 epoll 子系统中,当被监视的文件描述符和监视用的文件描述符并发执行 close() 操作时,存在一个竞态条件。当两条关闭路径同时执行时:

  1. 一条路径通过 ep_remove() 释放 eventpoll 对象。
  2. 另一条路径待处理的 hlist_del_rcu() 写入落在了已被释放的内存上。

这会触发释放后使用(Use-After-Free),破坏被回收 eventpoll 的 refs 链表,并在存活的 epoll 等待者中留下悬空的 epi->ffd.file 指针——这是完整漏洞利用链的基础。


漏洞利用流程

root@kitploit:~
┌─────────────────────────────────────────────────────────┐
│ 1. KASLR Leak       (prefetch side-channel via libxdk)  │
├─────────────────────────────────────────────────────────┤
│ 2. Race Trigger      (close-vs-close UAF on eventpoll)  │
│    ├─ Adaptive timer: stat/exec phases calibrate ahead  │
│    ├─ False-sharing:  dup()+close() widens race window  │
│    └─ Oracle:         EPOLL_CTL_ADD depth-3 → ELOOP?    │
├─────────────────────────────────────────────────────────┤
│ 3. Reclaim           (freed eventpoll → ep_uaf_target)  │
│    └─ Dangling epi->ffd.file in ep_uaf_waiter           │
├─────────────────────────────────────────────────────────┤
│ 4. Cross-Cache       (filp slab → buddy → pipe_buffer)  │
│    ├─ Drain per-CPU partial list                        │
│    ├─ Free enclosing objects → slab page freed          │
│    └─ Reclaim as pipe pages (256 × 4 KiB)              │
├─────────────────────────────────────────────────────────┤
│ 5. Constrained AAR   (fdinfo ino:/sdev: as read oracle) │
│    ├─ Fake file spray tiles forged struct file in pipe  │
│    ├─ 8B read: ino: ← i_ino at controlled offset       │
│    ├─ 4B read: sdev: ← sigaltstack(sas_ss_sp) cursor   │
│    └─ Walk: init_task → find exploit task → resolve     │
│       files → fdt → fd[] → pipe_buffer → struct page   │
├─────────────────────────────────────────────────────────┤
│ 6. RIP Control       (f_op→poll hijack → JOP → ROP)    │
│    ├─ Forge f_op = virt, f_count = virt - 1             │
│    ├─ JOP pivot chain lands rsp on controlled page      │
│    └─ libxdk ROP: commit_creds(init_cred) + ns switch  │
├─────────────────────────────────────────────────────────┤
│ 7. Ret2Usr           execve("/bin/bash") as root        │
└─────────────────────────────────────────────────────────┘

构建

root@kitploit:~
# aarch64 (交叉编译或本机编译)
aarch64-linux-gnu-gcc -O2 -Wall -pthread -march=armv8-a \
    race_check_aarch64.c -o race_check

使用方法

root@kitploit:~
./race_check [timeout_seconds]   # 默认:300 秒(5 分钟)
./race_check 120                 # 2 分钟超时

退出码

代码含义
0竞态获胜——内核存在漏洞
1超时——未检测到竞态(可能存在漏报,不能证明内核已修补)

参考资料

  • 原始 PoC(J-jaeyoung)
  • NVD — CVE-2026-46242

⚠️ 免责声明: 本仓库仅供教育和授权安全研究目的使用。未经授权将此漏洞利用用于你不拥有或未经明确许可测试的系统是违法的。

下载工具