44 lines
1.9 KiB
Swift
44 lines
1.9 KiB
Swift
// mdl.usda · Model I/O · libusd_ms · CVE-2026-112485
|
|
// 原语: OOB 读 · 进程内 · tier 2
|
|
// Primitive: OOB read · in-process · tier 2
|
|
//
|
|
// [zh] USDA 声明嵌套深度
|
|
// Model I/O 的修复载体为 libusd_ms 24.1.30 → 24.1.32:经 64 位检查的图像分配、Ptex log2 与页保护、USDA 声明嵌套上限、SdfZipFile
|
|
// 尺寸检查。ModelIO.dylib 自身不含任何修复。
|
|
//
|
|
// [en] USDA declaration nesting depth
|
|
// The fix carrier for Model I/O is libusd_ms 24.1.30 → 24.1.32: 64-bit checked image allocation,
|
|
// Ptex log2 and page guards, a USDA declaration nesting cap, and SdfZipFile size checks. ModelIO.dylib
|
|
// itself carries none of the fix.
|
|
// ── 判别 / oracle ──
|
|
// 2000 层嵌套的 def Xform。27.2 会在嵌套上限处拒绝,27.0 递归下去。
|
|
//
|
|
// 种子构建器(python,可直接运行): CVE-2026-112485/CVE-2026-112485.py
|
|
// runnable python seed builder: CVE-2026-112485/CVE-2026-112485.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) }
|
|
}
|
|
|
|
|
|
|