> Detect, contain, and defenses against two Linux page-cache-corruption local pri
> escalations — DirtyClone (C) and pedit COW (C) — on hosts and
> containers.




This is an educational, defensive security kit. It explains how both work at the
syscall level and ships hardening, detection, , and seccomp tooling — plus a
harness that proves the tooling works on real kernels. **It contains no exploit, shellcode, or
target offsets, by design.**
---
---
Both CVEs let an unpri local user become root by corrupting the page cache (the RAM
copy) of a setuid-root binary such as /usr/bin/su — without e the file on disk. That
makes them stealthy: file-integrity monitoring stays green, disk forensics find nothing, and the
corruption clears on reboot.
Patching the kernel is the real fix. But during the rollout window — and as defense-in-depth
afterward — you need to **close the attack paths, watch for the attack chain, and your
posture**. That is what this kit provides, with every control mapped back to a documented step of the
exploit chain so you can see _why_ it works.
Both bugs are the same defect class: **the kernel writes to a buffer it believes is private while
that buffer is still backed by shared, file-backed page-cache memory.** Two structural gates govern
every of both chains:
| Gate | What it is | Strength as a control |
|------|------------|-----------------------|
| 1. Capability path | CAP_NET_ADMIN obtained user namespaces (unshare(CLONE_NEWUSER\|CLONE_NEWNET)) | Robust chokepoint — *every* must pass here, known and unknown. Close it first. |
| 2. Module surface | modules: act_pedit, esp4/esp6, rxrpc, xt_TEE, nf_dup_ipv4/nf_dup_ipv6 | Defense-in-depth — removes *known* primitives only; a novel sink would bypass it. |
Fixed upstream in stable point-releases (DirtyClone ≥ 6.12.91 / 7.0.10; pedit COW 6.12.94 / 7.0.13) plus backports; mainline 7.1 is final. Confirm your kernel against your distro's tracker — see docs/analysis.md §8.
> Linux hosts only. These scripts read and write real kernel state. Run hardening on a host you
> control; run the destructi harness on a disposable VM. See Requirements.
For containers, apply the seccomp o
(kit/seccomp-pagecache-lpe.json):
New here? Read START-HERE.md — a guided, lecture-style walkthrough from
the root cause to a full run.
| Component | Role |
|-----------|------|
| docs/analysis.md | Source of truth: root cause, beha attack chains, detection engineering, hardening, comparati. |
| docs/HARDENING-GUIDE.md | Layered containment for hosts, systemd units, Docker/Podman, and Kubernetes. |
| kit/ | The four deli. Copy this directory to a host to defend it. |
| testkit/ | Reproducible on real kernels (local Docker + disposable EC2), and SHOWCASE.md — an honest assessment of what the tests do and don't prove. |
harden, ): a Linux host with bash, sysctl, modprobe,unshare. Root for hardening; run the probe as a non-root user.detect-pagecache-lpe.bt): root, bpftrace ≥ 0.16, and kernel BTF/sys/kernel/btf/). Some kprobes may be inlined on a gi — the script's headertestkit/): a disposable Linux VM — it writes real config and unloadsjq; no SSH is used (transport is AWSTLP:CLEAR — public, unrestricted distribution. This repository is **detection and pre
only**. It deliberately includes:
…and deliberately excludes:
The honest limits of this approach — what the does and does not prove — are documented intestkit/SHOWCASE.md §8. **Use only on systems you own or are authorized to
test. Hardening is containment, not a cure: patch your kernel.**
START-HERE.md — the guided walkthrough (start here)docs/analysis.md — the full technical analysisdocs/plain-language-summary.md — aIssues and pull requests are welcome — see CONTRIBUTING.md. Because the controls
are mirrored across several files (the module list, the userns knobs, the detection bitmap), please
read the sync in in that guide before changing the attack surface.
Licensed under the Apache License 2.0.
开发语言:Shell
Star 数:3
该项目属于防护思路方向的开源资源,代码结构清晰,适合安全研究人员学习参考。项目围绕Educational, defensive kit for two Linux page-cache-corruption LPEs (DirtyClone CVE-2026-43503, pedit COW CVE-2026-46331): hardening, detection, verification, seccomp + validation harness. Detection and prevention only — no exploit code. TLP:CLEAR.展开,提供了可运行的实现,对理解相关安全机制、工具原理与攻防技术具有较高的研究价值。
从技术实现角度看,此类项目的核心在于对底层原理的深入理解与工程化落地。开发者在研究过程中可以结合官方文档与社区讨论,梳理项目的初始化流程、核心模块职责与数据流转,逐步掌握其中的技术细节与设计思路。
1. 下载源码压缩包,解压到本地环境。
2. 根据项目类型准备对应的运行环境与依赖。
3. 按照 README 中的步骤完成配置与部署。
4. 在隔离的测试环境中运行验证,避免影响生产系统。
本资源来源于开源社区,仅供安全研究、技术学习与合法授权范围内的攻防演练使用,请勿用于任何非法或侵害他人权益的用途。使用本项目产生的一切后果由使用者自行承担。
| 资源标题 | pagecache-lpe-containment-kit - Educational, defensive kit for two Linux page-cach |
| 所属分类 | 防护思路 |
| 发布作者 | admin |
| 发布时间 | 2026-10-06 00:18:08 |
| 下载权限 | 免费下载 |
| 附件数量 | 2 个下载链接 |
| 浏览次数 | 221 |
| 讨论数量 | 0 |
| 主题状态 | 正常讨论中 |