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

+35
View File
@@ -0,0 +1,35 @@
// probe.hid · IOKit.framework / GameController.framework · CVE-2026-112515
// HID event path reachability probe
// C twin of the Swift POC: dlopens IOKit and GameController, dlsyms the HID entry
// points the CVE lives behind, and reports which resolve in this process.
// Build: clang -O2 -o cve-2026-112515 CVE-2026-112515.c
// Run: ./cve-2026-112515
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
static void probe(const char *lib, const char **symbols, int n) {
void *h = dlopen(lib, RTLD_NOW);
if (!h) {
printf("x %s\n", lib);
return;
}
printf("ok %s\n", lib);
for (int i = 0; i < n; i++) {
printf(" %s: %s\n", symbols[i], dlsym(h, symbols[i]) ? "resolved" : "missing");
}
}
int main(void) {
const char *iokit_syms[] = {
"IOHIDManagerCreate", "IOHIDDeviceGetProperty", "IOHIDEventCreateCopy",
"IOHIDEventSystemClientCreate", "IOHIDEventCreateData",
};
const char *gc_syms[] = {"GCController", "GCHIDEventSource", "GCExtendedGamepad"};
probe("/System/Library/Frameworks/IOKit.framework/IOKit", iokit_syms, 5);
probe("/System/Library/Frameworks/GameController.framework/GameController", gc_syms, 3);
printf("CVE-2026-112515 · HID path probed\n");
return 0;
}
+3 -18
View File
@@ -1,22 +1,8 @@
// probe.hid · IOHIDFamily · caps 表查找 · CVE-2026-112515
// 原语: OOB 读 · 外设 · tier 2
// Primitive: OOB read · peripheral · tier 2
//
// [zh] IOHIDFamily 预解析数据表索引
// 记录中的有符号 int32 索引被直接以 ×0x14 加至 caps 表基址,仅存在 32 位乘法溢出陷阱,缺少索引与计数的比较。负索引读到表下方,超界索引读到相邻内核堆;读出的 u32 进入元素/事件数据,
// 构成内核内存泄露。27.2 补入 cmp idx,count、NULL 守卫与 64 位索引运算。
//
// [en] IOHIDFamily preparsed data table index
// A signed int32 index from the record is scaled by 0x14 straight into the caps table base with only
// a 32-bit multiply-overflow trap and no comparison against the count. Negative indices read below
// the table, over-range indices read adjacent kernel heap, and the u32 that comes back enters element/event
// data — a kernel memory disclosure. iOS 27.2 adds cmp idx,count, a NULL guard and 64-bit index arithmetic.
// ── 判别 / oracle ──
// 入口是内核侧序列化的 \"hid \" 预解析容器。应用侧能不能把这样的数据推进去,本身就是这一步要回答的问题。
// probe.hid · IOHIDFamily · caps-table lookup · CVE-2026-112515
// IOHIDFamily preparsed data table index
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 {
}