// aud.lc3 · AudioCodecs · ACLC3Decoder::AppendInputData · CVE-2026-112638 // 原语: OOB 写 · 权限受限 · tier 2 // Primitive: OOB write · entitlement-gated · tier 2 // // [zh] LC3 解码器输入缓冲溢出 // memcpy 仅以 mDataByteSize 作为长度,完全不参考输入 vector 的 (begin, end) 容量。27.2 增加 capacity < size 时的拒绝分支。LC3 // 是蓝牙 LE Audio 的编解码器,其实例化受 com.apple.coreaudio.allow-lc3-codec 授权约束,故崩溃发生在系统音频进程内 —— 与公告所称「系统终止」一致。 // // [en] LC3 decoder input buffer overflow // memcpy uses mDataByteSize as its length and never consults the (begin, end) capacity of the input // vector. iOS 27.2 adds a capacity < size rejection. LC3 is the Bluetooth LE Audio codec and its // instantiation is gated by com.apple.coreaudio.allow-lc3-codec, so the crash lands in the system // audio process — matching the advisory's "system termination". // ── 判别 / oracle ── // 这个模块先检查进程是否持有该 entitlement,再尝试构造 LC3 AudioConverter 看内核/框架在哪一层拒绝。无授权时它一定失败,但失败点本身就是有用信息。 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) } }