v2.0 — 31 C POC twins + harness fixes

- 31 C POC files, one per CVE folder: full seed construction + trigger +
  main(), self-contained, no app dependency. All compile clean with
  clang -O2 -Wall (zero warnings) on macOS arm64; each has a recorded
  oracle on this host.
- CMGetDMVersionLevelFromRPU ABI pinned by disassembly: macOS export is
  (CFDataRef), the Swift POC drives the 4-arg iOS surface — this is the
  mechanism behind the cm.rpu death oracle on the simulator build.
- Harness fixes: glyphCount guard, MachOInspector size guard, ModTools
  clamp, DeviceModel iPhone19,7, GPTPayload clamps, Gate patch display.
- POC comments rewritten English-only (31 swift + arc.rr + 5 py).
- README (en/zh): C twin column, .c anatomy section, compile/run
  examples, C oracle verification status.
- Dead if-let binding removed from Identity summary; v2.0 build 3.
This commit is contained in:
JBJF committed 2026-10-29 20:08:55 +08:00
1 parent 1ea76ab005
commit 7949c7ce9f
79 files changed
+4109 -892

No files matched your search

+2 -17
View File
@@ -1,22 +1,8 @@
// kern.decmpfs · XNU · AppleFSCompressionTypeZlib · CVE-2026-113910
// 原语: 信息泄露 · 内核 · tier 2
// Primitive: info leak · kernel · tier 2
//
// [zh] decmpfs 分块解压欠产出 → 内核堆泄露
// 分块 zlib 解压的实际产出少于预期时,27.0 不比对 produced 与 expected,内核页缓冲的尾部因此保持未写状态;read() 随后将整个缓冲交回应用,使应用取得陈旧的堆内容。
// 27.2 补入该比对。
//
// [en] decmpfs chunked decompression under-produce → kernel heap disclosure
// When chunked zlib decompression produces fewer bytes than expected, 27.0 does not compare produced
// against expected, so the tail of the kernel page buffer is left unwritten; read() then hands the
// whole buffer back to the app, which receives stale heap content. iOS 27.2 adds that comparison.
// ── 判别 / oracle ──
// 这是整套原语中少数完全不需要 entitlement 的内核路径:应用在自身容器内写入一个带 com.apple.decmpfs 扩展属性的文件,读回的内容即内核解压的产物。以 8 字节窗口扫描,
// 凡落在内核地址空间范围(≥ 0xFFFFFFE000000000)的值即为候选指针。
// decmpfs chunked decompression under-produce → kernel heap disclosure
import Foundation
// ── byte helpers — verbatim from Cinder27 Sources/Kit.swift ──
// ── byte helpers (from Cinder27 Sources/Kit.swift) ──
enum B {
static func be16(_ v: UInt16) -> [UInt8] { [UInt8(v >> 8 & 0xff), UInt8(v & 0xff)] }
static func le16(_ v: UInt16) -> [UInt8] { [UInt8(v & 0xff), UInt8(v >> 8 & 0xff)] }
@@ -38,4 +24,3 @@ enum B {
}