// kext.iohid · IOKit.framework · IOHIDEventAppendEvent · CVE-2026-65385 // HID event tree append entry point probe // C twin of the Swift POC: dlopens IOKit and dlsyms the event-tree entry points // (create/append/serialize/type/vendor-defined) the unbounded append lives behind. // Build: clang -O2 -o cve-2026-65385 CVE-2026-65385.c // Run: ./cve-2026-65385 #include #include #include int main(void) { const char *syms[] = { "IOHIDEventCreateCopy", "IOHIDEventAppendEvent", "IOHIDEventCreateData", "IOHIDEventGetType", "IOHIDEventCreateVendorDefined", }; void *h = dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", RTLD_NOW); if (!h) { printf("x IOKit cannot be dlopened\n"); return 1; } printf("ok IOKit\n"); for (size_t i = 0; i < sizeof syms / sizeof syms[0]; i++) { printf(" %s: %s\n", syms[i], dlsym(h, syms[i]) ? "resolved" : "missing"); } printf("CVE-2026-65385 · IOHIDEvent append surface probed\n"); return 0; }