60 lines
2.9 KiB
Swift
60 lines
2.9 KiB
Swift
// cm.fdleak · CoreMedia · mediaplaybackd.bytestream.xpc · CVE-2026-112706
|
|
// 原语: 信息泄露 · 系统进程 · tier 1
|
|
// Primitive: info leak · system process · tier 1
|
|
//
|
|
// [zh] CoreMedia bytestream XPC 跨沙盒文件描述符获取
|
|
//
|
|
// [en] CoreMedia bytestream XPC cross-sandbox file descriptor acquisition
|
|
// The launchd service com.apple.coremedia.mediaplaybackd.bytestream.xpc is reachable from any sandboxed
|
|
// third-party app, checks no entitlement and raises no permission prompt. Its FigXPC memory-origin
|
|
// handshake (.rp1 → .rp2 → .org) returns status 0 for an unprivileged client; the subsequent 'Curl'
|
|
// create message carries a client-chosen absolute file:// path in CreationURL, and the daemon opens
|
|
// that path with its own credentials without checking either that it lies inside the requesting app's
|
|
// container or that the requester can read it. The reply's ByteStreamDetails dictionary carries a
|
|
// live FileDescriptor. The app dups it and preads — descriptor-level I/O is not subject to the client
|
|
// sandbox's path checks, so the full contents of a file the app's own open() returns EPERM for land
|
|
// in the app container.
|
|
// ── 判别 / oracle ──
|
|
// 变体 cm.fdleak.boundary: 跨沙盒可读域边界测绘
|
|
|
|
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) }
|
|
}
|
|
|
|
/*
|
|
// cm.fdleak.boundary · CoreMedia · mediaplaybackd.bytestream.xpc · CVE-2026-112706
|
|
// 原语: 探测 · 系统进程 · tier 2
|
|
// Primitive: probe · system process · tier 2
|
|
//
|
|
// [zh] 跨沙盒可读域边界测绘
|
|
//
|
|
// [en] Cross-sandbox readable domain boundary mapping
|
|
// Fifteen high-value targets are each given a 'Curl' probe and the daemon's server-side error code
|
|
// is recorded, fixing the primitive's actual readable domain. Three outcomes are distinguished: opens,
|
|
// exists but denied (-12203), does not exist (-17913). The value of this pass is that it leaves
|
|
// the negative results on record — a target that was refused and a target that was never tested are
|
|
// entirely different conclusions.
|
|
*/
|
|
|
|
|
|
|