CVE-2026-112652 - iOS 27.0.1 SecPolicyCreateWithProperties 인증서 검증 우회: 근본 원인 분석, 차등 PoC 하네스 및 빌드 도구
Security.framework의 인증서 검증 우회iOS 27.0.1 → 27.2 인증서 검증 수정에 대한 근본 원인 분석으로, 차분 검증된 증명과 재현 가능한 하네스를 포함합니다.
| CVE | CVE-2026-112652 |
| CWE | CWE-295 — 부적절한 인증서 검증 |
| CVSS 3.1 | 5.5 MEDIUM — AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N |
| 구성 요소 (Apple) | Security |
| 구성 요소 (실제) | Security.framework (사용자 공간) → SecPolicyCreateWithProperties |
| 영향받는 정책 클래스 | 1.2.840.113635.100.1.62 — Apple 고정 정책(SecPolicyCreateApplePinned) |
| 수정 버전 | iOS 27.2 · iPadOS 27.2 · macOS 15.8.2 / 26.7.2 / Golden Gate 27.2 · visionOS 27.2 |
| 보안 공지 | HT149230 |
| 보고자 | Aditya Kumar |
| CISA KEV | 미등록 · 알려진 악용 사례 없음 |
이 저장소의 어떤 것도 미리 빌드된 산출물이 아닙니다. 모든 바이너리, 인증서 및 펌웨어 이미지는
make에 의해 로컬에서 생성됩니다. 빌드를 참조하세요.
SecPolicyCreateWithProperties()은 호출자가 제공한 속성 딕셔너리로부터 SecPolicy를
생성합니다. iOS 27.0.1에서는 정책에 필요한 입력 중 단 하나만 검증했습니다.
kSecPolicyPolicyName 및/또는 kSecPolicyLeafMarkerOid를 생략해도 여전히
non-NULL 정책을 반환했습니다 — 호출자가 요청한 제약 조건이 빠진 정책을 —
거부하는 대신에 말입니다. iOS 27.2는 누락된 두 가지 존재 여부 검사, 전용
kSecPolicyErrorMissingProperties 오류, 그리고 실패를 보고하는 새로운
SecPolicyCreateWithPropertiesWithError API를 추가했습니다.
Apple의 자체 설명은 *"향상된 상태 관리로 로직 문제가 해결되었습니다"*입니다: 정책 객체가 생성 시점에 거부되는 대신 부분적으로 초기화된 채 신뢰 평가로 전달되었습니다.
iOS 27.0.1 — 고정 클래스에 대한 디스패치 분기는 세 가지 값을 검사하며,
그 중 어느 것도 kSecPolicyPolicyName 또는 kSecPolicyLeafMarkerOid이 아닙니다:
0x187f11f8c: add x1, x1, #0x640 ; OID 1.2.840.113635.100.1.63
0x187f11f94: bl 0x188140ec0 ; CFEqual(policyIdentifier, OID)
0x187f11f98: cbz w0, loc_187f12000 ; not this class -> next
0x187f11f9c: cbz x19, loc_187f12040 ; SecPolicyPolicyName missing
0x187f11fa0: ldr x1, [sp, #0x18] ; value of SecPolicyName
0x187f11fa4: cbz x1, loc_187f12040 ; SecPolicyName missing
0x187f11fa8: cbz x25, loc_187f12040 ; SecPolicyLeafMarkerOid missing
0x187f11fb8: bl _SecPolicyCreateAppleSSLPinned
iOS 27.2 — 동일한 브랜치, 두 개의 존재 확인 추가:
0x187e88318: ldr x8, [sp, #0x10] ; SecPolicyPolicyName value
0x187e8831c: cbz x8, loc_187e88440 ; MISSING -> error <-- ADDED
0x187e88320: cbz x22, loc_187e88440 ; SecPolicyIntermediateMarkerOid MISSING <-- ADDED
0x187e88324: cbz x24, loc_187e88440 ; SecPolicyLeafMarkerOid MISSING <-- ADDED
0x187e88334: bl _SecPolicyCreateApplePinned
두 개의 새로운 실패는 새로운 헬퍼로 흘러들어가며, 이 헬퍼는 errSecParam과
NULL을 반환합니다:
0x187e884c4: bl _SecPolicyErrorMissingProperties
...
0x187e87d18: mov w0, #0xffffffce ; errSecParam = -50
0x187e87d20: bl _SecError
0x187e87d24: mov x22, #0 ; return NULL
그리고 공개 API가 새로운 구현을 가리키도록 다시 지정되었습니다:
_SecPolicyCreateWithProperties:
0x187e8feb0: mov x2, #0 ; CFErrorRef *out = NULL
0x187e8feb4: b _SecPolicyCreateWithPropertiesWithError
하네스는 123개 정책 식별자 × 5개 속성 부분집합 = 618개 케이스를 순회하며, 취약한 iPhone 18 Pro Max에서 실행하고 고정된 macOS와 비교했습니다:
| iOS 27.0.1 (취약) | macOS 26.7.2 (수정됨) | |
|---|---|---|
CONTROL anchored-basic-x509 | ACCEPT | ACCEPT — 하네스 검증됨 |
policy=OK | 579 | 555 |
policy=NULL | 39 | 63 |
| 양쪽 모두에서 구현된 클래스 | 347 | 347 |
수정은 세 개의 정책 클래스에 영향을 줍니다 —
1.2.840.113635.100.1.62(Apple pinned),.68(IDS),.47(Apple Server Authentication) — 그리고 취약한 빌드에서는 그중 두 개가 불충분하게 지정된 딕셔너리를 수용합니다:.47 (Apple Server Auth): full=OK no-leafmarker=OK no-policyname=OK name-only=OK .68 (IDS): full=OK no-leafmarker=OK no-policyname=OK name-only=OKmacOS 26.7.2는 동일한 값을 반환하는데, 이는 해당 분기들의 구현이 iOS 27.2의 구현과 다르다는 것을 증명합니다 — 따라서 macOS는 수정이 영향을 주는 바로 그 클래스들에 대해서는 잘못된 기준입니다. 나머지 24개의 상이한 행은 macOS가 전혀 구현하지 않는 다섯 개 클래스에 속합니다.
예측: iOS 27.2에서는 그 여섯 개 행이
policy=NULL로 뒤집힙니다. 이것이 결정적인 측정이며, 27.2를 실행하는 iPhone이 필요합니다 — 참조:docs/FINDINGS.md§3.
수정은 정적으로 그리고 정확하게 위치가 파악됩니다: 1.2.840.113635.100.1.62
(Apple pinned) 분기에서 27.2는 kSecPolicyPolicyName,
kSecPolicyIntermediateMarkerOid 그리고 kSecPolicyLeafMarkerOid을 요구하며,
단순한 NULL 대신 errSecParam + kSecPolicyErrorMissingProperties를
반환합니다.
전체 분석은 docs/IMPACT.md에 있습니다. 요약하면:
이것은 기기 침해가 아닙니다. dyld 공유 캐시 심볼 테이블에서 도출한 도달 가능성:
SecPolicyCreateWithProperties는 CFNetwork, Accounts,
StoreServices, CloudServices에 의해서만 임포트됩니다.1.2.840.113635.100.1.62은 전체 캐시에서 정확히 하나의
이미지, 즉 Security에만 나타납니다. 어떤 시스템 구성 요소도 이를 요청하지 않습니다.따라서 어떤 권한 경계도 넘지 않습니다. 악의적인 인증서를 신뢰하려는 앱은
이 버그가 필요하지 않습니다 — SecPolicyCreateBasicX509()와
SecTrustSetAnchorCertificates()만으로도 이미 그렇게 할 수 있습니다. 현실적인 피해는
개발자가 의도한 피닝 제약이 조용히 사라지는 것입니다: API는 성공하고,
개발자는 이를 알아챌 방법이 없습니다.
이것은 TrollStore와 관련이 없습니다. TrollStore의 핵심 버그는 installd / amfid의
엔타이틀먼트 및 코드 서명 검증입니다
(CVE-2022-26766, CVE-2022-29967). 이 버그는 Security.framework의
신뢰-정책 구성입니다. 동일한 CWE 클래스이지만, 다른 바이너리, 다른 권한
경계, 다른 결과입니다. 호출자가 제어하는 신뢰 정책에서 서명이나 엔타이틀먼트
결정으로 이어지는 경로는 없습니다.
연구로서의 가치: 명령어 수준까지 근본 원인이 입증되고, 실제 하드웨어에서
차등 검증되었으며, 재사용 가능한 툴킷까지 갖춘, Apple이 실제로 부여한 CWE-295입니다.
더 가치 있는 작업은 27.2 수정의 우회를 찾는 것 — 새롭고 아직 수정되지 않은 CVE로
가는 유일한 경로 — 과 CFNetwork의 호출 지점을 감사하는 것입니다.
docs/IMPACT.md §5를 참조하세요.
docs/
ROOT_CAUSE.md the proof: disassembly, string resolution, the exact defect
FINDINGS.md the measured differential and the attack chain
IMPACT.md reachability, attacker gain, the TrollStore question
METHODOLOGY.md how every conclusion was reached, and the pitfalls
EVIDENCE.md how to read the captured reports
RESEARCH-PLAN.md the A-Z plan this work followed
analysis/ the reusable tooling
resolve_cfstring.py resolves CFString constants inside a dyld shared cache
compare_code.py byte-level Mach-O section comparator
compare_frameworks.py userspace dylib comparator
extract_fn.sh splits a function body out of a disassembly dump
regen-artifacts.sh re-downloads the firmware and regenerates everything
cve/ the CVE record
CVE-2026-112652.md
fetch-records.sh pulls the public NVD and MITRE JSON
diff/ kernelcache diff 27.0.1 -> 27.2
analyze.py, report.md, *.csv
poc/ the reproducible harness
build.sh one command: certs -> embed -> verify -> build
PoC/ the iOS app (Run button, 618-case matrix)
macos-cli/ the same matrix as a macOS command-line tool
Certs/regen.sh generates the throwaway CA and leaf
embed_certs.py inlines the generated DER into the sources
check-embedded-certs.py asserts the inlined bytes match
compare_reports.py differential analyser for two device reports
evidence/ captured device reports
미리 빌드된 것은 아무것도 커밋되어 있지 않습니다. 모든 것을 직접 생성합니다.
python3 3.9+opensslblacktop/ipsw v3.1+ — 펌웨어 분석 입력을 재생성할 때만 필요git clone https://github.com/FAHAD21313/cve-2026-112652-secpolicy-research
cd cve-2026-112652-secpolicy-research
make # generate the certs, embed them, verify
make macos # build the macOS command-line harness
make ios # build the iOS app (macOS + Xcode)
make는 다음을 순서대로 수행합니다: